Is it possible to improve the precision of floating point arithmetic with gcc?

some kind of program in C in which extensive floating-point calculations get the correct results in the pc linux window, but the wrong results on the processor's SPE cells, but not on the PPU cells. I use gcc compilers. I wonder if there is any gcc compilation option to increase the rounding method or a similar method, so I get calculations accurate to float with more precision. I can’t change twice, because on SPE, performance will drastically decrease

thank

+3
source share
1 answer

IBM IEEE 754 SPU, :

  • +0, -0.
  • 2-149 2-126 . , +0.
  • IEEE Inf NaN. . .
  • (, ) , (FPSCR), .

, SPU IEEE:

XL C/++ , IEEE . -qnostrict, -O3 , IEEE , , . IEEE, :

  • -qfloat = nomaf.
  • , -qfloat = rrm .
  • NaN (NaNS), -qfloat = nans. ( NaN NaN, , -qinitauto .)
  • -O3, -O4 -O5, -qstrict .
+1

Source: https://habr.com/ru/post/1766099/


All Articles