Go to Post Part of FRC and design/engineering is perseverance. Keep your chin up, your thoughts positive, and have respect for your work and the work of your teammates. - Nathan_Fraser [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #16   Spotlight this post!  
Unread 14-12-2012, 17:16
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: numerical computation contest

Quote:
Originally Posted by Christopher149 View Post
Mathematica Code
Code:
Clear[t, h, r, c, a]
c = 5280
a = 5281
t = t /. 
  FindRoot[a/(2 t) * Sin[t] == c/2, {t, 1.8}, 
   AccuracyGoal -> 100000, PrecisionGoal -> 100000, 
   WorkingPrecision -> 500]
r = a/(2 t)
FindRoot[r == c^2/(8 h) + h/2, {h, 100}, AccuracyGoal -> 100000, 
 PrecisionGoal -> 100000, WorkingPrecision -> 500]
Here's Maxima code:
Code:
fpprec: 600$
L:5280$ eps:1$
y: x/sin(x)-(L+eps)/L$
a: bf_find_root(y,x,1/1000,4/100);
h: (L/2)*(1-cos(a))/sin(a);
Quote:
EDIT: I can get more decimal places ...
So can I
Code:
Maxima 5.27.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.

(%i1) fpprec: 600$
L:5280$ eps:1$
y: x/sin(x)-(L+eps)/L$
a: bf_find_root(y,x,1/1000,4/100);
h: (L/2)*(1-cos(a))/sin(a);

4.4498455019100799254554160016733598949968964352229561211688059554658168\
699956051975334723610652925014422691969000110577445163659978002373921158891281\
961079122339560352790946889732641412850383528339799280892308107161666785352632\
556370781259728977129034979416624799668990733212350734392869697893501318891119\
435591779774054312719121214164103632340254095275303249287104781014962478813559\
412501235222884006058879524106347465534347539833791041297948729285690841569378\
338955156536796873312602070842136063260258182278201500825791387457906343098887\
9258590281352783951539842610751922916884732140489864979154825b1
(%i7)
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi