+ Reply to Thread
Results 1 to 8 of 8

how do i enable negative results in the lcm function?

Hybrid View

  1. #1
    Cyberscryed
    Guest

    how do i enable negative results in the lcm function?

    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

  2. #2
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    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

  3. #3
    Cyberscryed
    Guest

    Re: how do i enable negative results in the lcm function?

    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

    "Dav" wrote:

    >
    > 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
    >
    >
    > --
    > Dav
    > ------------------------------------------------------------------------
    > Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
    > View this thread: http://www.excelforum.com/showthread...hreadid=564177
    >
    >


  4. #4
    Registered User
    Join Date
    07-24-2006
    Posts
    2
    purely from a mathematical point of view you cannot have a negative lcm as there will always be a lower multiple. For example if you did manage to obtain a lcm of -30 then -27000 (-30x-30x-30) making this a new lcm and this process can be repeated infinitely

  5. #5
    Cyberscryed
    Guest

    Re: how do i enable negative results in the lcm function?

    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

    "pouch" wrote:

    >
    > purely from a mathematical point of view you cannot have a negative lcm
    > as there will always be a lower multiple. For example if you did manage
    > to obtain a lcm of -30 then -27000 (-30x-30x-30) making this a new lcm
    > and this process can be repeated infinitely
    >
    >
    > --
    > pouch
    > ------------------------------------------------------------------------
    > pouch's Profile: http://www.excelforum.com/member.php...o&userid=36695
    > View this thread: http://www.excelforum.com/showthread...hreadid=564177
    >
    >


  6. #6
    N Harkawat
    Guest

    Re: how do i enable negative results in the lcm function?

    How about
    lcm(abs(a1:a100)) array entered (ctrl + shift + enter)



    "Cyberscryed" <[email protected]> wrote in message
    news:[email protected]...
    > 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




  7. #7
    Cyberscryed
    Guest

    Re: how do i enable negative results in the lcm function?

    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 ?


    "N Harkawat" wrote:

    > How about
    > lcm(abs(a1:a100)) array entered (ctrl + shift + enter)
    >
    >
    >
    > "Cyberscryed" <[email protected]> wrote in message
    > news:[email protected]...
    > > 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

    >
    >
    >


  8. #8
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1