Subject: Re: conversion u_int64_t -> double
To: None <eeh@netbsd.org>
From: Andrei Petrov <and@genesyslab.com>
List: port-sparc64
Date: 02/14/2001 13:10:15
On 13 Feb 2001 eeh@netbsd.org wrote:

> 
> 	Here is a test:
> 
> 	#include <stdio.h>
> 	main()
> 	{
> 		unsigned long int i1 = 1;
> 		double c1;
> 
> 		c1 = i1;
> 
> 		printf("%g\n", c1);
> 	}
> 
> 
> 	I got 4.94066e-324. Not good. Too little:-).
> 
> 	Is that known problem? Is there known remedy to it?
> 
> 	int64_t -> double works.
> 
> That does not appear to be a problem on my machine.
> Try upgrading to the latest -current snapshot and 
> rebuilding the toolchain.

Upgrade didn't help.
What is your machine? Could you please send me 
assembler output for the test above, it could give me some
pointers.
BTW the problem is very noticable on my machine:
vmstat,iostat,gprof print [Inf] or [NaN] all the time.

Thanks,
	Andrey