increased machine precision for FreeBSD apps?

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Jul 14 01:57:17 PDT 2004


In message <1089567603.746.45.camel at athlon>, Jay Sern Liew writes:
>Hello guys,
>
>	This is probably more of an organizational issue than an architectural
>one. In the event of running applications with heavy floating point
>arithmetic (e.g. scientific computation apps for one, encryption
>algorithms, compression, .. etc ), would it be a good idea to decrease
>rounding errors by increasing the data type size? 
>e.g. When a programmer declares a floating point variable, the
>compiler/assembler allocates twice(or a multiple of) the space needed,
>hence increasing the precision(and better approximation?).

Most floating point is done in hardware so we are stuck with what
the hardware offers mostly.

That said "long double" to the extent it is implemented will be enough
for any use inside the current physical model of reality.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list