octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lcm(0,n) gives 0 which should be changed.


From: Dildar Sk
Subject: Re: lcm(0,n) gives 0 which should be changed.
Date: Sun, 25 Mar 2018 22:48:15 -0700 (MST)

Jordi Gutiérrez Hermoso-2 wrote
> I suppose you can argue that 0 is always the lcm of any two
> nonnegative integers and the output of lcm should positive to rule out
> 0. I think it makes more sense to return something here since one of
> the inputs is zero, instead of erroring out.

Forgive me, but lcm of x,y lcm(x,y) must be divisible by x and y.
But if lcm(0,n) produces 0 that means 0 is divisible by 0.But 
0/0 is undefined.



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]