* floating point busted on 21164 ( 164LX ) ?
@ 1997-11-06 19:38 Uncle George
0 siblings, 0 replies; 5+ messages in thread
From: Uncle George @ 1997-11-06 19:38 UTC (permalink / raw)
This is a multi-part message in MIME format.
--------------6B30FF1A7A57BFAC8565B82C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
it seems that the noname, and a linux 486 seem to think that the floating point
operation
associated with the following pgm are the same. When it comes to the 164LX, this
result is always 0 ( ie 0x000000000000000000, the 486/noname have a 0x01 )
I am unable to get the alpha to trap ( I put printk's in the kern ), and
apparently there is another mechanism that is shafting this operation.
Any Idea's as to why the processors behave differently??????
gat
--------------6B30FF1A7A57BFAC8565B82C
Content-Type: text/plain; charset=us-ascii; name="a.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="a.c"
/* cc -mieee -O0 -o a a.c
/******* a.c ***********/
static double MIN = 1.42345678901234567e-45;
static union
{
double zd;
float zf;
long zl;
char *zp;
} z;
main()
{
static float a;
a = (float) MIN;
/* why is a not the smallest single precision number
* why dont I get an arith trap ( the kern has been "printk'ed ")
* this does not fail on the noname/axp pci33
* it does not work on the 164LX
*/
z.zf = a;
printf("%f\n", a);
printf("%p\n", z.zp);
}
--------------6B30FF1A7A57BFAC8565B82C--
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: floating point busted on 21164 ( 164LX ) ?
@ 1997-11-07 19:30 Wes Bauske
0 siblings, 0 replies; 5+ messages in thread
From: Wes Bauske @ 1997-11-07 19:30 UTC (permalink / raw)
Uncle George wrote:
>
> it seems that the noname, and a linux 486 seem to think that the floating point
> operation
> associated with the following pgm are the same. When it comes to the 164LX, this
> result is always 0 ( ie 0x000000000000000000, the 486/noname have a 0x01 )
If you mean 0x00000001, isn't that an unnormalized floating point
number?? I always thought 0x00000000 would be the smallest number
correctly represented with IEEE single precision floating point
with the implied bit on. Out of curiosity, what sort of application
worries about that sort of number? Why not just switch to double
precision??
No answer, but I do lot's of single precision floating point and
I usually just want the numbers to underflow gracefully to zero.
If the algorithm is unstable with single precision, I normally
switch to double precision.
--
Regards,
Wes
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: floating point busted on 21164 ( 164LX ) ?
@ 1997-11-07 21:11 Uncle George
0 siblings, 0 replies; 5+ messages in thread
From: Uncle George @ 1997-11-07 21:11 UTC (permalink / raw)
interestingly enough there is enough of a worry that DEC has a toggle bit in the FPCR
( floating point controll register ) of the 21164. on the underflow, u can set the
hardware to either plug in a 0x00, or a denormal number. The 21064 does not have this
feature.
Linux, the kern, does not care too much about the FPCR, and doesn't even bother with
the new bits in the FPCR that controll this behavior. ergo u get what ever someone
else has set if u dont bother to ( or know how to) change the FPCR register to suit ur
application.
thanks for the interest.
PS, the denormal is used by the solaris/java/alpha port of java 114. a true zero is
detected, and rejected by the java compile scripts as unacceptable!!!!!! a denormal, I
should say a IEEE denormal is needed.
Wes Bauske wrote:
> Uncle George wrote:
> >
> > it seems that the noname, and a linux 486 seem to think that the floating point
> > operation
> > associated with the following pgm are the same. When it comes to the 164LX, this
> > result is always 0 ( ie 0x000000000000000000, the 486/noname have a 0x01 )
>
> If you mean 0x00000001, isn't that an unnormalized floating point
> number?? I always thought 0x00000000 would be the smallest number
> correctly represented with IEEE single precision floating point
> with the implied bit on. Out of curiosity, what sort of application
> worries about that sort of number? Why not just switch to double
> precision??
>
> No answer, but I do lot's of single precision floating point and
> I usually just want the numbers to underflow gracefully to zero.
> If the algorithm is unstable with single precision, I normally
> switch to double precision.
>
> --
>
> Regards,
>
> Wes
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: floating point busted on 21164 ( 164LX ) ?
[not found] <346383F9.25160866@voicenet.com>
@ 1997-11-08 6:30 ` Michal Jaegermann
0 siblings, 0 replies; 5+ messages in thread
From: Michal Jaegermann @ 1997-11-08 6:30 UTC (permalink / raw)
Uncle George wrote:
>
> Linux, the kern, does not care too much about the FPCR, and doesn't even bother with
> the new bits in the FPCR that controll this behavior.
Look what is in an include file named fpu.h. A mentioned there function
ieee_set_fp_control() should be in your library.
--mj
p.s. Can you write your postings on a somwhat narrower colum. They
are very unreadable.
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: floating point busted on 21164 ( 164LX ) ?
@ 1997-11-08 11:51 Uncle George
0 siblings, 0 replies; 5+ messages in thread
From: Uncle George @ 1997-11-08 11:51 UTC (permalink / raw)
Looked at that - u should know that these bits controll whether or not the TRAPPED
FP errors should be returned back to the user as a SIGFPE.
That is all software FP traps. If u dont trap, these bits are meaningless.
They als do not controll the FPCR. on the 21064, float errors are traped to the kern for
its disposition. with the new 21164, u can set the hardware to take care of most traps,
and
report the rite results without the kern ever knowing what happened.
1 of those traps was underflow, and the hardware choice was
either return 0.0, or a denormal. I just got the wrong ( not expected answer ) and wanted
to
know why.
Michal Jaegermann wrote:
> Uncle George wrote:
> >
> > Linux, the kern, does not care too much about the FPCR, and doesn't even bother with
> > the new bits in the FPCR that controll this behavior.
>
> Look what is in an include file named fpu.h. A mentioned there function
> ieee_set_fp_control() should be in your library.
>
> --mj
>
> p.s. Can you write your postings on a somwhat narrower colum. They
> are very unreadable.
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1997-11-08 11:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <346383F9.25160866@voicenet.com>
1997-11-08 6:30 ` floating point busted on 21164 ( 164LX ) ? Michal Jaegermann
1997-11-08 11:51 Uncle George
-- strict thread matches above, loose matches on Subject: below --
1997-11-07 21:11 Uncle George
1997-11-07 19:30 Wes Bauske
1997-11-06 19:38 Uncle George
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox