POV-Ray : Newsgroups : povray.general : POV Parsing : Re: POV Parsing Server Time
9 Aug 2024 13:24:38 EDT (-0400)
  Re: POV Parsing  
From: Warp
Date: 4 Sep 2000 05:23:20
Message: <39b36a08@news.povray.org>
Peter J. Holzer <hjp### [at] sikituwsracat> wrote:
: There is only one type, so the user doesn't have to think about whether
: automatic type conversion will do the right thing or whether he must
: insert casts. 

  Not exactly.
  Yes, the user defined numbers can only be doubles, but povray handles these
numbers as integers in some places. When you give povray a non-integer value
in one of these places, povray just converts it to an integer.
  This might have undesired results sometimes. For example, if you for one
reason or another give it a value of, eg. 1.5 povray will round it (I don't
know if it just rounds it to 1 or to the nearest integer value; if the latter,
the result is even worse since it may depend on the system whether it rounds
it to 1 or to 2). If you want to be absolutely sure that povray will get
the right value, you'll have to "cast" the value :)

: For some applications a double FP isn't precise enough. int_64 and long
: double (80 bit on Intel, up to 128 bit on some other architectures) have
: good HW support, but also finite precision and range.

  It's not possible to define a hardware-supported int_64 in ANSI C if the
default value of int is 32 bits long. In some 64-bit systems the long int
type is 64 bits, but not in any 32-bit system (at least not any I know).
  Some systems (such as linux and solaris) support the type long long, which
makes a 64-bit variable. However, this type is not part of the ANSI C.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.