Ok . By the way i manage to have a version of cob_mpf_exp that on my pc is between 4 and 5 times faster .
Hi Simon do you want me to integrate the patch for ln an for the ticjer #1206 in my github repo in order to create a pull request (now that i begin to use git & github serioulsy , may ba it would be good to have all in github) Denis
Sine And cosine optimization proposal
Hi Simon After digging , i see only one "solution" : check if angle is "close" to pi/2 . it means adding a test like this " if abs (angle -P/2) is < Epsilon then angle is PI/2" (epsilon = 0,...001) Tell me if you want me to try this solution or we leave as, as, you said it's normal for floatting point to be not 100% accurate . Other : We have to increase the code coverage of the trigonometric functions by adding additional tests In digging i have reshape cos and sin function that appear about 12%...
Hi Going on the test (with no degrees conversion ) regarding the following program and the results , The problems are : - SIN when muliptle of PI ---> should give 0 - COS when multiple of PI/2 ---> should give 0 - TAN when multiple of PI/2 ---> should raise a exception divide by zero when multple of PI ---> should give 0 i tried a simple trick with COB_MPF_PREC = 4096 instead of 2048 --> same results. i'll dig into the way of how cob_mpf_sin compute the angle to be given to the series (as it is used...
Tangent function
yes strange behavior i did a little more test on sinus function . IDENTIFICATION DIVISION. PROGRAM-ID. TESTTRIGONOMETRIC. DATA DIVISION. WORKING-STORAGE SECTION. 01 wRESULT PIC s99v9999999999999999999999999. 01 wRadians PIC s999v999999999999999999999999. PROCEDURE DIVISION. compute wRadians rounded = (90 * FUNCTION PI) / 180 move FUNCTION SIN(wRadians) to wRESULT DISPLAY 'SIN 90: ' wRESULT display 'SIN 90: ' FUNCTION SIN(wRadians) display '---------------------------------' compute wRadians rounded...
Square Root Simplification