Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23529 - Float operations (sprintf, number_format, etc..) fail in mod_php-4.3.2
Summary: Float operations (sprintf, number_format, etc..) fail in mod_php-4.3.2
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-26 07:04 UTC by Antonio Navarro Navarro
Modified: 2003-06-27 00:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Navarro Navarro 2003-06-26 07:04:28 UTC
Some float point operations seem to fail under a IBM e-server Pentium IV.

Reproducible: Always
Steps to Reproduce:
<?
  $num = 57.4523;    
  echo "1 : $num<br>";   
  echo "2 : ".sprintf("%2.02f", $num)."<br>";   
  echo "3 : ".number_format($num,2,'.',',');   
?>

Actual Results:  
1 : 57.4523
2 : i.00
3 : i00 

Expected Results:  
1 : 57.4523
2 : 57.45
3 : 57.45

I have tried the float point operations in Perl in the same machine and it 
works Fine.

perl -e 'printf("%2.3f", 334.38452);' 
334.385

Also have tried mod_php-4.3.2-r1 and r2
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-06-26 15:29:37 UTC
could you please include your 'emerge info' output?
Comment 2 Antonio Navarro Navarro 2003-06-26 23:32:08 UTC
Solved. I have changed the arch in CFLAGS to pentium3.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-06-27 00:04:12 UTC
pentium4 cflags strikes again.