Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
' version 16-09-2015
|
||||
' compile with: fbc -s console
|
||||
|
||||
Function agm(a As Double, g As Double) As Double
|
||||
|
||||
Dim As Double t_a
|
||||
|
||||
Do
|
||||
t_a = (a + g) / 2
|
||||
g = Sqr(a * g)
|
||||
Swap a, t_a
|
||||
Loop Until a = t_a
|
||||
|
||||
Return a
|
||||
|
||||
End Function
|
||||
|
||||
' ------=< MAIN >=------
|
||||
|
||||
Print agm(1, 1 / Sqr(2) )
|
||||
|
||||
' empty keyboard buffer
|
||||
While InKey <> "" : Wend
|
||||
Print : Print "hit any key to end program"
|
||||
Sleep
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue