Jump to content

Recommended Posts

Posted (edited)

Hi everybody,

 

I am converting some excel formulas to Visual Lisp.

 

I found a difference between results of a same follwing formula:

(I changed cells to numbers to simplify the problem.)

 

in Excel:                  

=0.6*2400*1.15*1170*1.1/100000 ---> result: 21.31272
 

In AutoLISP:           

(/(* 0.6 2400.0 1.15 1170.0 1.1) 100000.0) ---> result: 21.3127

 

While AutoLISP isn't as correct as Excel.

 

Any help to get a result like Excel is appreciated.

 

 

Edited by Ahankhah
Posted

 (rtos (/(* 0.6 2400.0 1.15 1170.0 1.1) 100000.0) 2 10)
"21.3127200000"

  • Like 1
Posted

myloverflyer,

 

thanks a lot for your favor. 😀😊

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...