This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes BigDecimal in JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "BigDecimal in JavaScript" Watch "BigDecimal in JavaScript" New topic

BigDecimal in JavaScript

dinesh chanchlani

Joined: Jul 20, 2007
Posts: 6

I am adding two BigDecimal numbers and storing the result in variable declared(var object) inside Java Script.The addition result can be as large as 999999999999999999.99.But such large value is not getting stored properly in JavaScript variable,it gets rounded off.Is there a way to store numbers of precision(18,2) in JavaScript variables?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10747

Dinesh please carefully choose the forum.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63348

There is no BigDecimal in JavaScript. That's a Java class.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: BigDecimal in JavaScript
It's not a secret anymore!