comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: rounding numbers
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: rounding numbers [message #82926 is a reply to message #82925] Wed, 23 January 2013 14:02 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
Since those are the same numbers, I'm not sure when to round up or round down. But I would try something like this:

num = 61825
base = 1000

diff = num MOD base

IF roundUp THEN roundedNum = num + base - diff
IF roundDown THEN roundedNum = num - diff

There are other ways to do it of course, but this would work.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: rounding numbers
Next Topic: Re: CgWindow and multiple plots

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 15:41:33 PDT 2025

Total time taken to generate the page: 0.47917 seconds