[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lcm(0,n) gives 0 which should be changed.
From: |
Dildar Sk |
Subject: |
lcm(0,n) gives 0 which should be changed. |
Date: |
Sat, 24 Mar 2018 10:29:39 -0700 (MST) |
In MATLAB,
>> lcm(0,1)
Error using lcm (line 16)
Input arguments must contain positive integers.
>> lcm(0,11)
Error using lcm (line 16)
Input arguments must contain positive integers.
So, MATLAB chooses to make produce error for other numbers than Integer.
In Octave,
>> lcm(0,1)
ans = 0
>> lcm(0,10)
ans = 0
So Octave gives lcm(0,n) 0. So like this any number x,y should produce lcm
to be 0.
lcm(x,y) = 0 will be always true in this sense. And lcm(x,y) is divisible by
both x and y but we know 0/0 undefined or NaN(Octave uses). Please correct
me so that I can learn.
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html
- lcm(0,n) gives 0 which should be changed.,
Dildar Sk <=