Friday, May 2, 2008 - New servers are in! Click-in for more info!
VoyForums

VoyUser Login optional ] [ Main index ] [ Post a new message ] [ Search | Check update time ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 11:01:18 12/14/04 Tue
Author: jpp
Author Host/IP: 57.66.66.138
Subject: Re: involute function
In reply to: Erland 's message, "Re: involute function" on 04:50:05 07/02/04 Fri

the program in python converted to excel VBA :

Public Function arcinvolute(y)
'y in radian

Pi = 3.14159265358979
If (y = 0) Then
arcinvolute = 0
Exit Function
End If

If (y > (Tan(89 * Pi / 180) - 89 * Pi / 180)) Then
arcinvolute = 2 'too big
Exit Function

End If

If (y < 0) Then
arcinvolute = -1 'negative
Exit Function
End If


' calculations
x1 = 0
x2 = 89 * Pi / 180
x = 45 * Pi / 180
f = Tan(x) - x - y

While (Abs(f) > 0.00000000001)
If (f < 0) Then
x1 = x
End If

If (f > 0) Then
x2 = x
End If

x = (x2 + x1) / 2
f = Tan(x) - x - y
Wend

arcinvolute = x

End Function

[ Next Thread | Previous Thread | Next Message | Previous Message ]

VoyUser Login ] Not required to post.
Post a public reply to this message | Go post a new public message
* Notice: Posting problems? [ Click here ]
* HTML allowed in marked fields.
Message subject (required):

Name (required):

  Expression (Optional mood/title along with your name) Examples: (happy, sad, The Joyful, etc.) help)

  E-mail address (required):

Type your message here:


Notice: Copies of your message may remain on this and other systems on internet. Please be respectful.


Forum timezone: GMT-5
VF Version: 2.94, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2008 Voyager Info-Systems. All Rights Reserved.