kalai Posted September 17, 2011 Posted September 17, 2011 (setq L1 1000 L2 1000 L3 1000 L4 1000 L5 1000 ) (setq scount 10) (setq L6 120 H 6) (setq sdist (/ (- (+ L1 L2 L3 L4 L5) (+ L6 (* 2 H))) (- scount 2))) Actually the value of scount =608.5 but it is rounded to 608 How am i to get actual value? Quote
pBe Posted September 17, 2011 Posted September 17, 2011 (setq sdist (/ (float (- (+ L1 L2 L3 L4 L5) (+ L6 (* 2 H)))) (- scount 2))) if you divide a whole number by a whole number you will get ====> YES a whole number Quote
Tharwat Posted September 17, 2011 Posted September 17, 2011 Set the System Variable dimzin to 0 and try again . Quote
David Bethel Posted September 17, 2011 Posted September 17, 2011 Set the System Variable dimzin to 0 and try again . DIMZIN only affects (rtos) & (angtos) calls. Not the actual calculation. (float) is the correct way to fix a division of integer problem. -David Quote
Tharwat Posted September 17, 2011 Posted September 17, 2011 DIMZIN only affects (rtos) & (angtos) calls. Not the actual calculation. (float) is the correct way to fix a division of integer problem. -David Thank you David for the clarifications . Appreciated a lot. Tharwat Quote
Recommended Posts
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.