473,378 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Math beyond double precision

Hello everyone

I'm building an adaptive quiz system that uses some non-trivial math
formulas, and I would like to figure out the most widely supported way of
handling arbitrary-precision math (or at least "ridiculous precision" math).
It appears that the "decimal" type is not supported by the Math class (e.g.
you can't extract the square root of a decimal without first converting it
to a Double). The Java SDK has a class called BigDecimal that handles those
calculations in an unwieldy manner (i.e. you have to call methods instead of
using operators), but it's better than nothing. I don't care much about
elegance at this point. All I want to do is "git-R-done".

Thanks,
Artem

Oct 21 '08 #1
0 1279

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

89
by: Radioactive Man | last post by:
In python 2.3 (IDLE 1.0.3) running under windows 95, I get the following types of errors whenever I do simple arithmetic: 1st example: >>> 12.10 + 8.30 20.399999999999999 >>> 1.1 - 0.2...
1
by: limelight | last post by:
I have discovered a math error in the .NET framework's Log function. It returns incorrect results for varying powers of 2 that depend on whether the program is run from within the IDE or from the...
6
by: damian birchler | last post by:
I wrote a function that should test if a given number is a palindrom, but when I ran it in a little testprogram it behaves strange. #include <stdio.h> #include <math.h> ...
7
by: Wernfried Schwenkner | last post by:
I've found the discussion about Math.Log and the error with Math.Log(8,2) on Google. Unfortunatly the full thread isn't on my news server, so I can't reply. The problem doesn't only depend...
6
by: ng_mr | last post by:
No, not a question about "banker's rounding" or whatever it's called. I want to round a double to the nearest 100th, so I perform the following: // original is a double double result =...
2
by: mbelew | last post by:
I'm seeing a very strange behavior with double precision subtraction. I'm using csUnit for testing. If I run the test by itself, the test passes. When I run the batch of tests, the test fails. ...
6
by: Justin | last post by:
I am trying to add dollar amounts together and add sales tax but everthing after the decimal point is being cut off in the dollar amounts. Here is my code: if (Adults != "") { AdultTotal =...
110
by: Gregory Pietsch | last post by:
I'm writing a portable implementation of the C standard library for http://www.clc-wiki.net and I was wondering if someone could check the functions in math.h for sanity/portability/whatever. I'm...
15
by: Chris | last post by:
>>from math import * 0.0 1.2246063538223773e-016 -2.4492127076447545e-016 1.0 -1.0 1.0 The cosine function works fine, but I'm getting weird answers for sine. Is this a bug? Am I doing...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.