how do i enable negative results in the lcm function?

C

Cyberscryed

Please i need to know how to enable these negative values from teh lcm
function because all i get is 0 and its obvious that its not
 
D

Dav

As I understand it it is not designed to work with negative numbers, as
if you put in 2 -3 -6 12 would the answer be 12 or 36 or ?

Regards

Dav
 
C

Cyberscryed

maybe i should be alot clearer in my question alot more clearer its like this
ive got a bunch of values that are really really really small and i need to
find there lcm i know what the lcm is but i have to actually calculate it the
numbers arent whole but decimals and so oon i need the lcm function to give
me a negative single (decimal number) not a integer hope that helps
 
P

pouch

purely from a mathematical point of view you cannot have a negative lc
as there will always be a lower multiple. For example if you did manag
to obtain a lcm of -30 then -27000 (-30x-30x-30) making this a new lc
and this process can be repeated infinitel
 
C

Cyberscryed

o k i have found out that it is not a negative number tahtr im looking for in
the lcm but im actually looking for a decimal number for the lcm outcome can
anyone help ?
 
D

Dav

By definitions the LCM is an interger so will not work on decimal
fractions

You need to multiply all of your values by a larger number to make them
all intergers thendo LCM then divide the result back down to your
decimal form.

But I should say the same logic as for negative numbers applies eg the
LCM of 0.5 is not 0.5 as 0.5*0.5=0.25 etc so your only hope is to try
and turn everything into integers and there could be problems there

Regards

Dav
 
C

Cyberscryed

yes great input there made me relook at what i was doing and i didnt need a
negative number i needed a decimal value for my result for example i need a
number like 1.654634353534E-19 ro occur as my lcm any ideas
 
Top