URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 158 |
Rev 816 |
#include <stdio.h>
|
#include <stdio.h>
|
|
|
main()
|
main()
|
{
|
{
|
float a,b,c;
|
float a,b,c;
|
|
|
a = 0.11;
|
a = 0.11;
|
b = 3.12;
|
b = 3.12;
|
c = a+b;
|
c = a+b;
|
|
|
printf ("Print float, result with 'f' = %f\n", c);
|
printf ("Print float, result with 'f' = %f\n", c);
|
printf ("Print float, result with 'e' = %e\n", c);
|
printf ("Print float, result with 'e' = %e\n", c);
|
printf ("Print float, result with 'E' = %E\n", c);
|
printf ("Print float, result with 'E' = %E\n", c);
|
printf ("Print float, result with 'g' = %g\n", c);
|
printf ("Print float, result with 'g' = %g\n", c);
|
printf ("Print float, result with 'G' = %G\n", c);
|
printf ("Print float, result with 'G' = %G\n", c);
|
|
|
pass ("float");
|
pass ("float");
|
fflush (stdout);
|
fflush (stdout);
|
}
|
}
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.