(phixonline)-->
requires("1.0.4") -- (mpfr_get_fixed() busted in 1.0.2|3)
include mpfr.e
mpfr_set_default_precision(-20) -- ensure accuracy to at least 20 d.p.
mpfr total_price = mpfr_init("4000000000000000"),
tmp = mpfr_init("5.5"),
tax = mpfr_init("0.0765"),
total = mpfr_init()
mpfr_mul(total_price,total_price,tmp)
mpfr_set_str(tmp,"2.86")
mpfr_mul_si(tmp,tmp,2)
mpfr_add(total_price,total_price,tmp)
mpfr_mul(tax,total_price,tax)
mpfr_add(total,total_price,tax)
printf(1,"Total before tax:%26s\n",{mpfr_get_fixed(total_price,2,comma_fill:=true)})
printf(1," Tax:%26s\n",{mpfr_get_fixed(tax,2,comma_fill:=true)})
printf(1," Total:%26s\n",{mpfr_get_fixed(total,2,comma_fill:=true)})