[ quantlib-Feature Requests-824364 ] The Real typedef should be used throughout

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ quantlib-Feature Requests-824364 ] The Real typedef should be used throughout

SourceForge.net
Feature Requests item #824364, was opened at 2003-10-15 13:18
Message generated for change (Comment added) made by danncorbit
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=362740&aid=824364&group_id=12740

Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Dann Corbit (danncorbit)
Assigned to: Nobody/Anonymous (nobody)
Summary: The Real typedef should be used throughout

Initial Comment:
You have a typedef of real like so:

typedef double Real;

but throughout the code, you use ordinary doubles all
over the place.  Hence, the typedef is basically useless.

If (on the other hand) throughout the code you used
Real parameters and Real automatic variables, then I
would be able to use the system with other data types
such as Moshier's Qfloat, Scott's MIRACL, etc. by making
my own typedef as follows:

typedef qfloat Real;

or similar to that.

We need to compute with 100 digits of accuracy, so a
double simply won't do.


----------------------------------------------------------------------

>Comment By: Dann Corbit (danncorbit)
Date: 2003-10-24 00:43

Message:
Logged In: YES
user_id=887860

> Hi,
>     I have to admit that I even forgot about the Real
typedef...
> We'll see what we can do. Does a textual replace of all
> "double" to "Real" work for you?

I think probably so.  If not, it would make it a heck of a lot
easier for me.

> And just out of curiosity, 100 digits? What kind of financial
> application needs that accuracy?

I write database systems.  Someone can be computing the
interest on the national debt.  Someone might be doing a
summation of a billion quadwords. (There is at least one
application where this is a fact -- a database of all the road-
tolls ever taken in one of the states of the US).

We cannot anticipate what sort of data they may throw at
the system.  But no matter what it is, we must compute the
right answer.

We also handle exponents that are quite large.


----------------------------------------------------------------------

Comment By: Luigi Ballabio (lballabio)
Date: 2003-10-24 00:32

Message:
Logged In: YES
user_id=75450

Hi,
    I have to admit that I even forgot about the Real typedef...
We'll see what we can do. Does a textual replace of all
"double" to "Real" work for you?

And just out of curiosity, 100 digits? What kind of financial
application needs that accuracy?

Bye,
        Luigi


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=362740&aid=824364&group_id=12740