Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline overlord  
#1 Posted : 08 March 2021 02:10:25(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Here some ellipse perimeter calculation methods through history.
These methods are based on approximation mostly.
I have also added integral method and infinite series method.
Some methods are more accurate when ellipse ratio is bigger and some are not.
Yet I have to tell, Ramanujan is not mere man. That man is a beast.

Regards.

ellipse.sm (81kb) downloaded 51 time(s).

ellipse.pdf (148kb) downloaded 31 time(s).

ellipse_Page_1.png

ellipse_Page_2.png

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 08 March 2021 04:28:07(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
ellipse Faster.sm (17kb) downloaded 27 time(s).
Offline overlord  
#3 Posted : 08 March 2021 15:27:57(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Well your file is a different file which has relation only on integral calculation with my sample.
It has only ellipse perimeter calculation with integral functions, nothing more.

If you want a faster version of my file download it below.
Creating 10 different graphic data for 40 different ratio is time consuming.
Yet original file is slow only due to graphic of infinite serie.
If you disable it calculation will be much faster.

ellipse_without infinite.sm (80kb) downloaded 15 time(s).

ellipse_faster.png
Offline Razonar  
#4 Posted : 08 July 2021 21:29:07(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: overlord Go to Quoted Post
...
Yet original file is slow only due to graphic of infinite serie.
...


Hi overlord. You can speed up the series calculation using only one eval() in the entire document as pointed. I guess that without rounding errors because the result it's an integer. With that, you can increase the summation limit to 200 or 300 increasing the time only by one or two seconds, given a better approximation to the true percentage of Ramanujan's alien DNA.

Clipboard01.jpg


Best regards.
Alvaro.
Offline overlord  
#5 Posted : 08 July 2021 22:03:39(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Originally Posted by: Razonar Go to Quoted Post
Hi overlord. You can speed up the series calculation using only one eval() in the entire document as pointed. I guess that without rounding errors because the result it's an integer. With that, you can increase the summation limit to 200 or 300 increasing the time only by one or two seconds, given a better approximation to the true percentage of Ramanujan's alien DNA.

Best regards.
Alvaro.

Your suggestion really make it faster. Thanks.
I am gonna save the file respect to your correction.
Though after j>133 the eval() hits the border of max number allowed.
Or without using eval(), product gives the error above. Doesn't matter.
By setting the upper limit of product to 133 of infinite serie, error percentage is 0.08.
My brain can't comprehend how the hell Ramanujan found that formula.

Regards

2021-07-08_22-02.png
Offline Razonar  
#6 Posted : 08 July 2021 23:09:39(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: overlord Go to Quoted Post
...
Though after j>133 the eval() hits the border of max number allowed.
Or without using eval(), product gives the error above. Doesn't matter.
...


Not in my SMath ( Win 32 bits, appVersion(4)="0.99.7822.147" ). I can put 500 as upper limit without problems. Here the plot with a limit of 200:

Clipboard01.jpg

Best regards.
Alvaro.

Offline overlord  
#7 Posted : 08 July 2021 23:39:00(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Originally Posted by: Razonar Go to Quoted Post
Not in my SMath ( Win 32 bits, appVersion(4)="0.99.7822.147" ). I can put 500 as upper limit without problems. Here the plot with a limit of 200:
Best regards.
Alvaro.

The result of P8 shall be same with P12 after j>133.
K couldn't be calculated for P8 and K of P12 shall be assigned to P8.
If you add an additional Clear(K) after P8 calculation you will see what I meant.

Regards.

Edited by user 09 July 2021 00:05:13(UTC)  | Reason: Not specified

thanks 1 user thanked overlord for this useful post.
on 09/07/2021(UTC)
Offline Razonar  
#8 Posted : 09 July 2021 02:41:20(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: overlord Go to Quoted Post
Originally Posted by: Razonar Go to Quoted Post
Not in my SMath ( Win 32 bits, appVersion(4)="0.99.7822.147" ). I can put 500 as upper limit without problems. Here the plot with a limit of 200:
Best regards.
Alvaro.

The result of P8 shall be same with P12 after j>133.
K couldn't be calculated for P8 and K of P12 shall be assigned to P8.
If you add an additional Clear(K) after P8 calculation you will see what I meant.

Regards.


Hi. Thanks, you're right, calculation continues even though they have reached an error, and then they are replaced by the values of the other calculation. Funny that there is no error message when the overflow occurs.

Best regards.
Alvaro.
Offline loha  
#9 Posted : 11 July 2021 15:02:29(UTC)
loha


Rank: Advanced Member

Groups: Registered
Joined: 13/09/2011(UTC)
Posts: 63
Location: Kolkata

Was thanked: 9 time(s) in 9 post(s)
Ramanujan is a poet! No one understands how he found his beautifully simple and accurate formulas!

Originally Posted by: overlord Go to Quoted Post
Here some ellipse perimeter calculation methods through history.
These methods are based on approximation mostly.
I have also added integral method and infinite series method.
Some methods are more accurate when ellipse ratio is bigger and some are not.
Yet I have to tell, Ramanujan is not mere man. That man is a beast.

Regards.

ellipse.sm (81kb) downloaded 51 time(s).

ellipse.pdf (148kb) downloaded 31 time(s).

ellipse_Page_1.png

ellipse_Page_2.png


Offline Jean Giraud  
#10 Posted : 11 July 2021 17:03:01(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: loha Go to Quoted Post
Ramanujan is a poet !

... a Mathematician as well !!!
Here is the exact arc length of the ellipse in Smath.
Cheers ... Jean.

Circle_Ellipse_Parabola [Ellipse ArcLength].sm (21kb) downloaded 23 time(s).

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.