jeudi 9 novembre 2017

Ruby on rails big decimal value format not correct

Big Decimal not showing value in numbers

a = BigDecimal.new("100.55")
a = * a * a
puts "big decimal #{a}"

output

big decimal [#<BigDecimal:ad5a6e8,'0.101103025E5',18(45)>]

How i can display it in proper format just like 12345.236

Aucun commentaire:

Enregistrer un commentaire