|
-
Dec 29th, 2002, 02:25 PM
#1
Thread Starter
Hyperactive Member
-
Dec 29th, 2002, 02:34 PM
#2
Fanatic Member
The slope of the sine curve at (0,0) is about 1, for radians. This means that the sine of a very small number is approximately the number itself. The difference can be neglected, depending on the degree of precision you want.
For degree values you need to divide the number by pi / 180 first, of course
-
Dec 29th, 2002, 02:37 PM
#3
Thread Starter
Hyperactive Member
I'm kind of hoping for a way to calculate it to any desired accuracy, and without using pi, because I'd like to use the result in a calculation to get pi . I'm not sure if this is possible or not, so I came here since I know there are people here who will be able to tell me .
-
Dec 29th, 2002, 02:54 PM
#4
Re: Calculating SINs of very small numbers?
-
Dec 29th, 2002, 02:56 PM
#5
Addicted Member
You could use the taylor expansion of the sine function:
sin x = x - x3/3! + x5/5! - x7/7! + ...
Thing is it's for radians, so you would need to multiply whatever answer you get from using as many terms as the accuracy wants, by pi/180 like the other guy said.
Not at all related to sheep...
-
Dec 29th, 2002, 04:38 PM
#6
Thread Starter
Hyperactive Member
-
Dec 29th, 2002, 05:32 PM
#7
Guru
Code:
sin x
lim ----- = 1
x -> 0 x
For really small numbers, the best approximation is sin x = x. The smaller you get, the more accurate the approximation is. (It is, of course, most accurate for x = 0.)
This isn't a very common way to calculate Pi.
A common way is to calculate Arctan(1) - the result is Pi/4.
Two ways I can currently think of to calculate this:
1) The series: 1/1 - 1/3 + 1/5 - 1/7 + 1/9...
2) The integral,
Code:
1
1
§ ------- dx
1 + x^2
0
is equal to Arctan(1) = Pi/4 and can be approximated using Simpson's rule.
-
Dec 29th, 2002, 05:37 PM
#8
Guru
Almost forgot: Assuming you use VB (which is a bad assumption) you can use 4 * Atn(1) to get VB's approximation.
In ANSI C, you can use atan() which is in math.h.
In Intel's FPU there is an instruction, FLDPI (Opcode: D9 EB), which pushes the FPU's definition of Pi into the floating point stack.
-
Dec 29th, 2002, 11:56 PM
#9
Fanatic Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|