The FIPR instruction is intended for speed rather than accuracy, and therefore the results will differ from those obtained by using a combination of FADD and FMUL instructions. The FIPR execution sequence is as follows:
1) Multiplies all terms. The results are 28 bits long. 2) Aligns these results, rounding them to fit within 30 bits.3) Adds the aligned values. 4) Performs normalization and rounding.
what does 28 bits long and fit within 30 bits mean?
28 bits long
fit within 30 bits
when I'm testing 0x407fffff (3.9999997615814208984375 / 01000000011111111111111111111111) * 1.0 + 0.0 + 0.0 + 0.0, I got 0x407fffff also.
0x407fffff
if I try to fill all the inputs with value 0x3F7FFFD5 (0.999997437000274658203125), I got 0x407FFFAA (3.999979496002197265625), looks like no precision is loss at all.
0x3F7FFFD5
0x407FFFAA
fipr(46.351589, 68.036201, -91.735298, -50.511566, -25.173294, 72.041527, 72.575272, -57.887852);
0x3f66cc00
0x3f66c9ea
To best support you on this you will need to submit a Technical Support ticket by going to our support portal from the following link: https://en-support.renesas.com
You will need to sign in with your company email address, and if you don't have an account you will need to register with one. https://www.renesas.com/register
Best regards, Cindy, Renesas Online Applications Support Engineer