[Info-vax] Roadmap

Dave Froble davef at tsoft-inc.com
Tue Jan 8 03:53:13 EST 2019


On 1/5/2019 1:48 PM, John Reagan wrote:
> On Saturday, January 5, 2019 at 2:15:15 AM UTC-5, Dave Froble wrote:
>> On 1/4/2019 10:40 PM, John Reagan wrote:
>>> D_float?!?  Ugh. The DtoT sequence is the longest.  Depending on your floating operations, it could be 10x slower than just using native T_float.
>>>
>>> Why use D?  Do you have binary data you are using?
>>>
>>
>> We use Basic ...
>>
>> OPTION SIZE = ( INTEGER WORD , REAL DOUBLE )
>>
>> As far as I know, the above used D_FLOAT.
>>
>> We have historical data files, with data from VAX, Alpha, and itanic.
>> We never have done any conversions, and so I'm assuming that we're still
>> using D_FLOAT, or, we've been screwed up for years ....
>>
>> --
>> David Froble                       Tel: 724-529-0450
>> Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
>> DFE Ultralights, Inc.
>> 170 Grimplin Road
>> Vanderbilt, PA  15486
>
> Ok, so I just learned something else that I think BASIC does wrong.
>
> The default for /REAL_SIZE is essentially "give me the best single-precision format for this platform".  F on VAX and Alpha, S on Itanium.
>
> The confusion is that the qualifier is used to provide BOTH the size of a real (single precision vs double precision) AND the format.
>
> I assumed that if you explicitly say /REAL_SIZE=SINGLE, it would mean the same as the default, namely I want REALs to be single-precision, compiler's choice on best format.
>
> I also assumed that if you explicitly say /REAL_SIZE=DOUBLE (or the equivalent OPTION SIZE directive), you would get "I want REALs to be double-precision, compiler's choice on the best format".
>
> Alas, nope.
>
> The HELP file was the first hint that I was wrong.
>
>        The format of the REAL_SIZE qualifier is as follows:
>
>           /REAL_SIZE={SINGLE}
>                      {DOUBLE}
>                      {GFLOAT}
>                      {SFLOAT}
>                      {TFLOAT}
>                      {XFLOAT}
>
> I said to myself, "where are the explicit FFLOAT or DFLOAT keywords?"
>
> So Dave's "OPTION SIZE = ( INTEGER WORD , REAL DOUBLE )" which was originally used to say "I want extra precision on my REALs" locks into you Dfloat on Itanium.
>
> What a horrible design decision.  So people who didn't say anything on Itanium, get fast Sfloat but the moment you want more precision and blindly say "REAL DOUBLE", you get your extra precision (but no extra range) and a performance hit.
>
> Another item for my "time machine" list.
>

It's 3:48 AM, and I think I just fried my brain ...

Might work Ok now, huh?

John, there are two Basic functions that map a real to a string, and a 
string to a real.  This is used to store data as a string, and retrieve 
the data.

CVTF$() takes a real and produces an 8-byte string
CVT$F() takes a string from above and returns the real number

So now the question.  Do there functions work for any real, or just 
D_FLOAT?  I'm thinking it might be just D_FLOAT.


-- 
David Froble                       Tel: 724-529-0450
Dave Froble Enterprises, Inc.      E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list