Sorry for being out of topic but
I wonder if it is possible to use big exact numbers in the C language.
I do not like double because double is not exact and I would like to have
numbers like
1234553455.34455555532 as exact number
and sin(1.333213425243245345678) with 20 or 30 significant digits
for another programming task.
Dann Corbit suggested me to collect the qfloat package in
http://www.moshier.net/qlibdoc.html but I have no idea how to use it.
Is there some links that gives step by step instruction how to have functions that caluclate things like it in visual C++2008?
Uri
Movepath enumeration (perft) record breaker (?)
Moderator: Ras
-
- Posts: 10903
- Joined: Thu Mar 09, 2006 12:37 am
- Location: Tel-Aviv Israel
-
- Posts: 568
- Joined: Tue Dec 12, 2006 10:10 am
- Full name: Gary Linscott
Re: Movepath enumeration (perft) record breaker (?)
Yup, you just have to use a class that implements that type of functionality. For example: http://mattmccutchen.net/bigint/ is an easy to use library. It is also in the public domain, so no sticky license issuesUri Blass wrote:Is there some links that gives step by step instruction how to have functions that caluclate things like it in visual C++2008?

-
- Posts: 61
- Joined: Wed Mar 08, 2006 9:40 pm
- Location: Germany, Berlin
Re: Totally out of control
Sure, bignums are fun!Zach Wegner wrote:256? All I can say is DAMN! Did that really take just 15 minutes to calculate?
That's when Lisp integers can come in real handy!
I just wrote a small script in Tcl 8.5, which confirms the numbers for 256 in just 50 seconds (Sempron 2500). Tcl 8.5 also has bignums built in.
The speed is the result of simple memoization.
Cheers,
Heiner