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

Home » Public Forums » archive » Re: why is 1/8 =0 ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: why is 1/8 =0 ? [message #2062] Sat, 21 May 1994 11:41
olsen is currently offline  olsen
Messages: 5
Registered: March 1994
Junior Member
In article j42@news.service.uci.edu, vshvetsk@fourier.oac.uci.edu (Victor Shvetsky) writes:
> I am justr wondering- I just found out after trying to debug the program for three hours
> that: 1/8 gives 0 in IDL unless you say: 1/8.0
> Is it such a well-known fact?
...
> Victor
>

Well known to fortran programmers, anyway - integer divide gives the CORRECT
integer result - if you want floats, you need to 'declare' them so.

rc olsen
nps
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: why is 1/8 =0 ?
Next Topic: Generating .mpeg-files from Animations

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

Current Time: Fri Oct 10 01:19:21 PDT 2025

Total time taken to generate the page: 0.87954 seconds