cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Explorer
Explorer
676 Views
Registered: ‎03-09-2017

How to work out on floating point values on Zynq PS

I have my ZC706 board with dual arm cortex 32bit one. I am trying to run an algorithm over it, as a part of the code it has floating point values.

 

uint32_t int Ts = 69912;
float Ts_pico;
Ts_pico = 20*(10^-12)*Ts;
printf("Time stamp in picoseconds is %f", Ts_pico);

And it prints a value 4272595456.000000 instead of 1.39824*(10^-6)

 

So I tested by printing

printf("The float point value is %f", 1.39824);

It was fine printing out the following value.

 

Next, when i tested by printing

 

double f = 10^-6;
printf("The flloat point value is %f", f);

The value it has printed is -14401872.000000

 

How can I solve the issue with floating point values?

 

0 Kudos
Reply
1 Reply
Observer
Observer
654 Views
Registered: ‎09-09-2016

^ symbol is binary xor,You should use 10e-12 or 10e-6....
0 Kudos
Reply