Movepath enumeration (perft) record breaker (?)

Discussion of chess software programming and technical issues.

Moderator: Ras

Uri Blass
Posts: 10903
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Movepath enumeration (perft) record breaker (?)

Post by Uri Blass »

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
gladius
Posts: 568
Joined: Tue Dec 12, 2006 10:10 am
Full name: Gary Linscott

Re: Movepath enumeration (perft) record breaker (?)

Post by gladius »

Uri 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?
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 issues ;).
hMx
Posts: 61
Joined: Wed Mar 08, 2006 9:40 pm
Location: Germany, Berlin

Re: Totally out of control

Post by hMx »

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!
Sure, bignums are fun!
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