Date: 04/30/98
- Next message: Zeev Suraski: "Re: [PHP-DEV] Re: Bug #262 Updated: dbminsert() failure / db.c flaws"
- Previous message: rasmus <email protected>: "Re: [PHP-DEV] bug #325 (last modified date)"
- In reply to: Andreas Karajannis: "[PHP-DEV] Floats and apache 1.3b6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 15:01 30/04/98 +0200, Andreas Karajannis wrote:
>It seems that floats (e.g from database queries) get randomly rounded
>on output. I've seen this on Solaris/apache 1.3b6/oracle and have
>a report for Linux/apache 1.3b6/adabas.
>On my Linux box, with apache 1.2.6 I can't reproduce this "behaviour",
>so it seems to be apache related, maybe some *printf function?
>
>Sample Output: values stored in table:
>100.010002 100.01
>200.020004 200.02
>300.029999 300.03
>400.040009 400.04
>500.049988 500.05
Floating point numbers are not accurate, this is a typical behavior. If
you want to maintain full accuracy, keep these values as strings, and
manipulate them using the BC math library.
Zeev
-- Zeev Suraski <zeev <email protected>> For a PGP public key, finger bourbon <email protected>
- Next message: Zeev Suraski: "Re: [PHP-DEV] Re: Bug #262 Updated: dbminsert() failure / db.c flaws"
- Previous message: rasmus <email protected>: "Re: [PHP-DEV] bug #325 (last modified date)"
- In reply to: Andreas Karajannis: "[PHP-DEV] Floats and apache 1.3b6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

