473,407 Members | 2,306 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,407 software developers and data experts.

Setting the default precision in mxNumber

Hi,

I just installed the mxNumber package and looking trough the
documentation I found no means to set the default precision for Float
numbers (I think it is set to 64bits). Does anyone know how the default
precision can be changed, or do I have to use the Float(value,precision)
constructor all the time?

Thanks
T. Chassaing

Jul 18 '05 #1
1 1569
Thomas Chassaing wrote:
... mxNumber package .... do I have to use the Float(value,precision)
constructor all the time?


Why not define your own constructor with a default that you control?
Then your code can happily use FLOAT(value) (for example), while
mxNumber's internals can get what they are used to and expect.

--
-Scott David Daniels
Sc***********@Acm.Org
Jul 18 '05 #2

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

Similar topics

1
by: john smith | last post by:
Hi, I would like to save a stream's output precision and then change the precision and then restore it. One example I found was using ios_base::fixed, and ios_base::floatfield. But on my machine...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
1
by: Joseph Turian | last post by:
Hi, How can I change the default floating point precision for the duration of execution? i.e. that *every* ostream I subsequently create will have this precision? Thanks Joseph
3
by: Matt | last post by:
Does the standard define default values for the format state of an ostream? I would like to be able to put a stream in a standard format state without thinking about how some other routine may...
2
by: utab | last post by:
Dear all, What is the default precision of cout for double types?(I think that was 6 if I am not mistaken) On the same cout statement I got(without any formatting) 0.00245579 ...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
3
by: Boot2TheHead | last post by:
This one cost me a solid half hour yesterday. I'm wondering why on earth the default precision for a decimal type is 18,0. Maybe I'm mistaken. A decimal datatype sort of implies that you'd want...
25
by: Martin Manns | last post by:
Hi, I am starting to use rationals and since I found no batteries included, I tried out the mxNumber package. However, I get strange warnings on comparison operations (which however seem to...
5
by: Benny the Guard | last post by:
Anyone know why the sprintf/printf/frprintf precision defaults to some odd # like 7? Seems that the correct behavior would be to have full precision unless I pass in some specific #. It seems...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.