Floating point calculation in Microblaze

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Dear all,

I am trying to do floating point addition, subtraction, multiplication
and division in Microblaze.

According to the specification, it is possible to do so as EDK
included the required library automatically

But after verifying that the library libc.a, libm.a and libxil.a are
included and math.h is also included in the source C program, I still
cannot perform the calculation.

float a=6.4;
float b=7.2;
float c=3.4;

printf("%f, %f, %f", a,b,c);
c=a+b;
printf("%f, %f, %f", a,b,c);

i can print out the result correctly the first time, but in the second
time, the value of c becomes 0? 00000000...

Is there any more stuff I need to do to solve the problem.

Thanks

Re: Floating point calculation in Microblaze
Hi,

Which version of EDK are you using? The basic floating point support has
been existing for quite some time. I checked with EDK 6.1 SP2 and the
addition mentioned in this email does work.

Sid

King wrote:

Quoted text here. Click to load it


Site Timeline