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

Home » Public Forums » archive » Re: fractional part of a number
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: fractional part of a number [message #7938 is a reply to message #7935] Thu, 23 January 1997 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Mirko Vukovic writes:

>> How does one get the fractional part of a number? Could not find
>> anything in the manual.

Then Phil Williams answers:

> Do you mean this:
> IDL> n = 5.5
> IDL> print, n mod floor(n)
> 0.500000

And Andy Loughe follows this with:

> number = 5.89
> frac_number = number - fix(number)

BUT, and here is the important question: which is FASTER!


No, no, I was just kidding. I do love these kinds of questions, though. :-)

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Reading Multiple Image TIFFs
Next Topic: Re: idl and pv-wave (GUI differences?)

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

Current Time: Sun Oct 12 17:13:37 PDT 2025

Total time taken to generate the page: 1.35665 seconds