Re: floating point on Nevada cpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Justin Carlson wrote:
> 
> On Wed, 24 Jan 2001, Pete Popov wrote:
> > This simple test fails on a Nevada (5231) cpu:
> >
> > int main()
> > {
> >     float x1,x2,x3;
> >
> >     x1 = 7.5;
> >     x2 = 2.0;
> >     x3 = x1/x2;
> >     printf("x3 = %f\n", x3);
> > }
> >
> 
> Ummm...care to tell *how* it fails?

Looks like there's something more basic that fails here.  This:

#include <stdio.h>
int main()
{
    float x1,x2,x3,x4,x5;

    x1 = 7.5;
    x2 = 2.0;
    x3 = x1/x2;
    x4 = x1*x2;
    x5 = x1-x2;
    printf("x1 %f x2 %f x3 %f x4 %f x5 %f\n", x1, x2, x3, x4, x5);
}


produces this:

sh-2.03# ./fl 
x1 0.000000 x2 0.000000 x3 0.000000 x4 0.000000 x5 0.000000


Pete


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux