#!/usr/bin/perl use warnings; use strict; use Math::BigFloat; my $num = Math::BigFloat->new("-0.000004"); $num->bfround(5); printf "%f\n", $num;