Finding the largest double/float (non-"infinite") number...

Florent Calvayrac fcalvay at aviion.univ-lemans.fr
Sat Apr 21 17:44:10 PDT 2001


> 

>   */
>  while(fpclassify(d) != FP_INFINITE){
>    if(verbose) printf("d[%d] = %21.16e\n",i,d);
>    dold = d;
>    d *= 2.0;

>  
just to be as compulsive as you, I might be wrong but it does not
seem to me that the above piece of code
would work correctly (I mean, totally exactly) 
on a non-power-of-2 based representation .
Look at the program I posted before to find the basis
used on the platform to represent real numbers.


Greetings

-- 
Florent Calvayrac                          | Tel : 02 43 83 26 26 
Laboratoire de Physique de l'Etat Condense | Fax : 02 43 83 35 18
UMR-CNRS 6087         | http://www.univ-lemans.fr/~fcalvay 
Universite du Maine-Faculte des Sciences   |
72085 Le Mans Cedex 9





More information about the Beowulf mailing list