Mailinglisten-Archive |
Hi,
> > Mein erster Rechner kannte das Problem nicht, der hat
> > noch mit BCD-Zahlen gewerkelt - anno 1971 - ... ;-)
> und der konnte (1/3)*3 richtig rechnen?
hmm,
warum nicht ?
PHP kann es doch schliesslich auch:
<?
for($i=1; $i<100; $i++) {
$a = "".(str_repeat('1',$i));
$b = "".(str_repeat('3',$i));
echo sprintf('% 2s',$i).'. '.bcdiv(bcmul($a, $b), $b)."\n";
}
?>
Rein IMHO nutzt bcMath auch das BCD-Zahlenformat.
m. b. Gruss Norbert
--------------------
Notruf 0163-3613642
--------------------
e.o.m.
php::bar PHP Wiki - Listenarchive