POV-Ray : Newsgroups : povray.general : Mega-Pov or V3.5? : Re: Mega-Pov or V3.5? Server Time
7 Aug 2024 01:24:44 EDT (-0400)
  Re: Mega-Pov or V3.5?  
From: Warp
Date: 3 Feb 2002 16:48:23
Message: <3c5db027@news.povray.org>
Ben Chambers <bdc### [at] yahoocom> wrote:
: I thought they were 80 bits - at least, on x87 chips they are (which doesn't
: mean anything about the standard!).  Floats are 32bits (with an additional 8
: bit mantissa), and doubles are 64 bits (with an additional 16 bit mantissa),
: making them 40 and 80 bits, respectively.

  The x87 chip (AFAIK) internally handles only 80-bit floats.
  When it reads a 32-bit or 64-bit float, it converts it to a 80-bit float
for its internal representation. When it writes a float to a 32-bit or 64-bit
variable (ie. to RAM), it makes the conversion the other way around.

  x86 code can have 32-bit floats (the 'float' type in C), 64-bit floats
(the 'double' type in C) and 80-bit floats (the 'long double' type in C,
although some compilers might make those 128-bit long for alignment
optimization purposes, with the extra 48 bits just being unused).
  A float takes exactly 32 bits (ie. 4 bytes) and a double takes exactly
64 bits (ie. 8 bytes), no more, no less.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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