That is weird. Well either something is forcing the initial scalar to integer or afterwards forcing the product to integer. I would say Devel::Peek is your friend. Place some Dump calls before and after your multiplication and check for NV, IV, and PV values.
#!/usr/local/bin/perl -wd use Devel::Peek; $v = "21.654"; $w = 2; $x = ""; $x = $w * $v; Dump( $x ); $x = int($x); Dump( $x );
-derby
In reply to Re: 0.123, float or integer
by derby
in thread 0.123, float or integer
by guha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |