use Math::BigFLoat;; $n = Math::BigFloat->new( '3.1415926535897932384626433832795' );; print $n;; 3.1415926535897932384626433832795 $d = 0+$n->bstr;; ##### as a double printf "%.17f\n", $d;; ##### display to full precision 3.14159265358979310 $n -= $d;; ##### substract from the bigfloat print $n;; ##### and display the (bigfloat) result 0.0000000000000032384626433832795 #### 3.1415926535897932384626433832795 - 3.1415926535897931000000000000000 0.0000000000000001384626433832795 which is quite different to the value from above! 0.0000000000000032384626433832795