mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2005-01-17, 22:07   #12
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

19·397 Posts
Default

Ernst (and Guillermo),

Have you tried the QD double-double package? I've just switched it and the results have been good thusfar.

I had to switch because x86-64 does not support the 80-bit x87 FPU instructions - so I had to reimplement all that assembly language setup code.
Prime95 is offline   Reply With Quote
Old 2005-01-18, 03:47   #13
ben
 
Jan 2005

11 Posts
Default

Quote:
Originally Posted by ewmayer
Boy, this compiler really dislikes 'long long' - looks like you'll need to change all occurrences of {64-bit const}ull to ...ul - luckily, all such occurrences are in just 2 files, qfloat.h and qfloat.c .
I modify:
types.h: line 48, line 49: long long => long
util.c: line 97, line 166: long long => long
qfloat.h, qfloat.c: ...ull => ...ul
then:
$ cc -o Mlucas *.c -lm
$ Mlucas
ERROR 14 in util.c
$
ben is offline   Reply With Quote
Old 2005-01-18, 17:05   #14
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

19·613 Posts
Default

Quote:
Originally Posted by ben
I modify:
types.h: line 48, line 49: long long => long
util.c: line 97, line 166: long long => long
qfloat.h, qfloat.c: ...ull => ...ul
then:
$ cc -o Mlucas *.c -lm
$ Mlucas
ERROR 14 in util.c
$
If you look at ERROR 14 in util.c, you see that it implies that you are not getting 64 bits in you int64 types (i.e. sizeof(int64) != 8). So this compiler doesn't like 'long long' for ints, but just using 'long' appears to only give a 32-bit int. Is there a 64-bit compile option? If the SCO compiler simply doesn't support 64-bit ints (which I would find highly surprising), you're going to have to haver to use your gcc build.

Quote:
Originally Posted by Prime95
Have you tried the QD double-double package? I've just switched it and the results have been good thusfar.
Have not tried it, though I've heard of it. The thing is, my hand-rolled qfloat-emulation functions need only one not-100%-guaranteed-by-the-C-language-standard thing - a 64-bit int type, which doesn't even need to be hardware-supported (i.e. it can be emulated), since these routines don't need to be fast. That seems not so much to ask.

Last fiddled with by ewmayer on 2005-01-18 at 17:06
ewmayer is offline   Reply With Quote
Old 2005-01-19, 09:02   #15
ben
 
Jan 2005

11 Posts
Default

Quote:
Originally Posted by ewmayer
Is there a 64-bit compile option? If the SCO compiler simply doesn't support 64-bit ints (which I would find highly surprising), you're going to have to haver to use your gcc build.
Yes, SCO compiler simply doesn't support 64-bit ints. No 64-bit compile option.

$ cat sizeof.c
#include <stdio.h>
#define PR(x) printf("sizeof("#x")\t= %d\n", sizeof(x))
main()
{
PR(void *);
PR(char);
PR(short);
PR(int);
PR(long);
PR(long long);
PR(float);
PR(double);
PR(long double);
}
$ gcc -o sizeof-gcc sizeof.c
$ sizeof-gcc
sizeof(void *) = 4
sizeof(char) = 1
sizeof(short) = 2
sizeof(int) = 4
sizeof(long) = 4
sizeof(long long) = 8
sizeof(float) = 4
sizeof(double) = 8
sizeof(long double) = 12
$ cc -o sizeof-cc sizeof.c /* delete PR(long long); line */
$ sizeof-cc
sizeof(void *) = 4
sizeof(char) = 1
sizeof(short) = 2
sizeof(int) = 4
sizeof(long) = 4
sizeof(float) = 4
sizeof(double) = 8
sizeof(long double) = 12
$
thus, in cc compiler long is 4 bytes.
ben is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
128-bit OS'es and GIMPS? ixfd64 Software 22 2011-10-31 22:23
GIMPS on PS3 flouran Hardware 202 2010-04-30 09:06
GIMPS uses only 1 cpu Unregistered Information & Answers 7 2009-01-10 20:01
Why do you run GIMPS ? Prime Monster Lounge 12 2003-11-25 19:04
Yet another GIMPS FAQ Prime Monster Lounge 9 2003-04-12 12:12

All times are UTC. The time now is 07:58.


Fri Aug 6 07:58:45 UTC 2021 up 14 days, 2:27, 1 user, load averages: 2.02, 2.22, 2.40

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.