473,698 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I need a decimal arithmetics library

Hi all,

We are developing a PoS application for Linux and are in need of a LGPL'ed
og other 'free'-licensed library
that can do exact decimal arithmetics for us.

It should be similar or according to the specs at
http://www2.hursley.ibm.com/decimal/

Somebody pointed my to the GNU Multiple Precision library, but that still
uses binary floating points.
I really need a library that can handle e.g. 0.1 exactly... at any
precision...

Anyone know of such a library?

--
Rein Anders Apeland
MIVU Solutions DA
Jul 22 '05 #1
1 1558
Rein Anders Apeland wrote:

Hi all,

We are developing a PoS application for Linux and are in need of a LGPL'ed
og other 'free'-licensed library
that can do exact decimal arithmetics for us.

It should be similar or according to the specs at
http://www2.hursley.ibm.com/decimal/

Somebody pointed my to the GNU Multiple Precision library, but that still
uses binary floating points.
I really need a library that can handle e.g. 0.1 exactly... at any
precision...

Anyone know of such a library?


Google is your friend

http://www.google.com
Search phrase: C++ exact arithmetic library

The second link it comes up with:
http://www.informatik.uni-trier.de/iRRAM/

seems like something that does what you want
--
Karl Heinz Buchegger
kb******@gascad .at
Jul 22 '05 #2

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

Similar topics

17
6143
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number. "Decimal Number" sometimes serves to distinguish Base 10 numbers, eg "15", from Base 2 numbers, Eg "1111". At other times "Decimal Number" serves to differentiate a number from an integer. For the rest of this post I shall only use either...
6
3191
by: Newbee Adam | last post by:
I have been reading in help how I need to use decimal becuase currency does not exist like I used in vb6. I had a difficult time on google and msdn finding how or if I can take the value of text box as decimal or do I just have to make another decimal variable .. So I took a guess hoping CDec would come up blue if I type it in with no squigglies on the line. But is this actually converting it to decimal. Next if so, I do not like the...
21
2024
by: Milan Èermák | last post by:
Hi all, I'm about to write an arithmetics object library. It should contain classes like ShortInteger (for 32-bit longs), Double and Float as standard numeric type wrappers and LongInteger (really long numbers, not only 64-bit) and Fraction (to express high precission). All these classes may inherit from abstract class Number. I got stuck on following point. I'm not sure how to implement basic arithmetic operations. What the result type...
1
1480
by: bigcjr44 | last post by:
I have an assignment do tonite and I can not get it started. We are learning about recursion. This is my assignment, and this is what I have written, could someone please tell me what I am doing wrong.................THANK YOU....... ASSIGNMENT: Demonstrate to the instructor the successful completion of each program output. Have this sheet ready for instructor to sign. Hand to instructor
3
3901
by: Jonas Ernst | last post by:
Hi, Can somebody give me some hints how to do a line interpolation without using floating point arithemtics? The function shall do a linear interpolation between 2 points (line interp?) and it shall return the y value to any x value given. e.g. p1: (0,0) p2 (1000,50) y value to calculate at x=600
3
2185
by: Artek | last post by:
Hello, after installing .net 1.1, ASP.NET works fine, but there is a problems with extra zeros added to the numbers at the end. In Sql 2000 SP3a there is for example a table with one column col1. Col1 is type of money ( four digits after decimal point). Table has one row with data : col1=5.2. In .Net 1.0 the following code Response.Write("<input type=text size=3 maxlenght=4 name=test class=box value='" + dt.DefaultView + "' >");
2
6504
by: Piotr | last post by:
Hi I'm working with Datagrid containg decimal (editable) numbers. The user-entered numbers are read by decimal.Parse() method. However, Datagrid formats some decimals as "1", but some as (eg) "1.00" - depends on what the user had entered. The page has DISABLED viewstate. So, let someone explain me why the number 1 is not the same as 1.0 or 1.000? I cannot find any property to set the precision.
6
2445
by: Dennis | last post by:
I am trying to align a column in DataGrid so the decimal's match up (not using fixed fonts). Is there anyone who has code for doing this using StringFormat or something else. Thanks. -- Dennis in Houston
8
10053
by: Dreadknought | last post by:
I'm new to Python I'm trying to create a program that converts decimal to binary but am having trouble. I understand the arithmetics of it, but I was wondering how I can add the remainders onto each other using strings. So for example, the binary of 6 would be 110. The first remainder computed would be 0, 1, and then finally 1. How do I put those three numbers together to create 110 as a string. I apologize but I hope this is a bit...
0
8678
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...

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.