Home Ruby on rails big decimal value format not correct
Reply: 0

Ruby on rails big decimal value format not correct

user322
1#
user322 Published in May 21, 2018, 10:33 pm

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

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.388593 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO