
1. Re: CPU radianbased calculation
kevin_intel Nov 20, 2013 8:51 AM (in response to masudyo)1 of 1 people found this helpfulHi masudyo,
Let me find some more information and I will be back soon with updates.

2. Re: CPU radianbased calculation
masudyo Nov 23, 2013 12:50 AM (in response to masudyo)example of error was printed as follows,
=sin(radians(X))+sin(radians(X+120))+sin(radians(X+240))
calculated with cell A2 (repeated autofill) as X value on OpenOffice 4.01/Windows 7Pro 64bit
03600 degree (0.1 increment), 36005800 (1 increment) 58006400 (2 increment) 64007000 (5 increment)
error occurs mainly at around 150, 300, 450, 600, 750, 900 ...
18003600, 3600above shows similar patterns, although above 3600 degree shows wider error ranges.
thus error occurs 1800 angle degree on certain value ranges (though fifth and sixth peaks are wider than else). Wider error starts from 1800 angle degree to 3600 and appearance of error came spread.
Same pattern could be obtained with AMD chipset (athlon tested), and Excel. I have no RISCbased unix nor 68based ApplePC, I could not test the situation differences.
As Kevin wrote below, I have recalculated 01440 degrees (1 increment) in OpenOffice.org (Win7 64 bit), with original sin(radians()) way.
dot blue : sin(radians(x))+sin(radians(x+120))+sin(radians(x+240))
dot orange : sin(x*PI()/180)+sin((x+120)*PI()/180)+sin((x+240)*PI()/180)
where x is A2 to A1442 (value 0 to 1440)
the result:
orange is worse than blue, thus radian exchange is not equal in radians formula to PI()/180 on CPU loading because the results are different (attached sin_recalc.png).
Thus Kevin, "trusted ways of calculation of ordinal highvoltage line shortcircuit" failed to proof zerovalue in the range of plus to minus 180 degree range whatsoever on the x86based systems (P4=32bit, U3400=64bit, athlon=32bit). I have no chance to know whether RISC (IRIX, Solaris etc) or 68based old Mac. It truely failed to give. As one of chemists, I wonder if this error value (although it would be 0.1ppb order) affects like ancient floating point defect (that gave ocasionally ppmorder error though). And as a chemist, I know sin() function handles radians not degrees (thus converting radians to degree by using radians() function inside.
first error value could be obtained in 1 increments from 0 is 112, sin(radians(112))+sin(radians(232))+sin(radians(352))=5.82867087928207E016
Kevin's PI() method gave first error at 110 (error value was 7.49400541621981E016), but at 112 the error was 5.82867087928207E016 (same as above). Followed was 116, 117, 119, 120, 121, 122, 125, 126, till 180 angle degree (Kevin's way gave additional 113, 118, 128, 132 angle degrees, but all radians() error angles gave error values with sometimes different value (closely twice, but not exactly twice).
sin(radians(A2*sin(A2))) like floating values also give some error values similar to those in 0.1 increments.
# if you missed to give radians() function or PI()/180, you would obtain at x=0 sin(0)+sin(120)+sin(240)=1.5260563391. It is not an error level from zero :)

sin_recalc.png 22.4 K


3. Re: CPU radianbased calculation
kevin_intel Nov 22, 2013 5:50 AM (in response to masudyo)1 of 1 people found this helpfulHi masudyo,
The Excel Sin() function expects the input to be in Radians, but you appear to be using Degrees. You must therefore convert your Degrees to Radians by multiplying by Pi/180.
Assuming your ‘x’ value is in cell e2, using the formula:
=SIN(E2*PI()/180)+SIN((E2+120)*PI()/180)+SIN((E2+240)*PI()/180) works. It always evaluates to 0 no matter what value you put in cell e2.