Post Reply 
newRPL - build 1255 released! [updated to 1299]
10-03-2018, 01:18 PM (This post was last modified: 10-03-2018 01:20 PM by Claudio L..)
Post: #286
RE: newRPL - build 1089 released! [update:build 1111]
(10-03-2018 03:02 AM)Claudio L. Wrote:  
(10-02-2018 08:04 PM)okkama Wrote:  integrate cos(x^x) from x=4 to 5
Degrees correct 0.073558
Radians incorrect -0.05813825 vs 0.0017302449 (wolframalpha & maxima)

I'll have to investigate. I think the adaptive algorithm might be stopping too early because of the oscillatory nature of the function. Thanks for reporting!

The result seems to be correct, depending on your requested error threshold. This particular case since it's about thousands of additions cancelling each other you just need to request additional precision and be patient...
I tried 0.00001 and not surprisingly I got 0.00099 as an answer. Gave it 4 more zeros and got 0.0014, 3 more zeros and... 0.001732449205, but I had to wait over 5 minutes to get that answer. It's just that the extremely high frequency of this function means your step needs to be exponentially smaller to get any meaningful result out of it.
Why does it work better in degrees? Because the frequency is much lower! 5^5 = 3125, and dividing by 360 is a relatively small number versus dividing by 2PI.
EDIT: Basically, when dealing with periodic functions, make sure your step is such that the algorithm won't skip over a bunch of cycles.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL - build 1001 released! - pier4r - 12-16-2017, 08:03 AM
newRPL - on Hp 39gs - Martin Hepperle - 06-05-2019, 06:51 AM
RE: newRPL - build 1001 released! - pier4r - 12-23-2017, 10:16 AM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 09:42 AM
t - Claudio L. - 01-01-2018, 03:06 PM
RE: newRPL - build 1001 released! - pier4r - 01-01-2018, 03:41 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 04:54 PM
RE: newRPL - build 1001 released! - pier4r - 01-02-2018, 06:58 PM
RE: newRPL - build 1089 released! [update:build 1111] - Claudio L. - 10-03-2018 01:18 PM
newRPL - brickviking - 10-05-2018, 06:01 AM
How to participate? - erazor - 12-13-2019, 07:12 AM



User(s) browsing this thread: 2 Guest(s)