On processors for D (Was: Re: std.date proposal)

Nic Tiger g_tiger at progtech.ru
Tue Apr 4 22:30:58 PDT 2006


Georg Wrede wrote:
> Walter Bright wrote:
>> Double has another problem when used as a date - there are embedded 
>> processors in wide use that don't have floating point hardware. This
>> means that double shouldn't be used in core routines that are not 
>> implicitly related to doing floating point calculations.
> 
> Ignoring the issue of date, I have a comment on processors:
> 
> IIRC, D will never be found on a processor less than 32 bits. Further, 
> it may take some time before D actually gets used in something embedded.
> 
> By that time, IMHO, it is unlikely that a 32b processor would not 
> contain a math unit.
> 

I have developed for UltraSparc (Sparc V8) CPUs (in millions of PowerTV 
boxes), that doesn't have FPU unit (or, what much worse, have damaged 
FPU unit due to faulty manufacturing process).

We had to force software FP implementation when compiled code with GCC, 
otherwise it could just hang at first FP instruction encountered.

and since we talk of double (64-bit), I think 64-bit integer whould be 
enough to pack time with microseconds accuracy for at least year 137438
I we need another (higher) accuracy, general time/date format is useless 
anyway



More information about the Digitalmars-d-announce mailing list