Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,19 @@
WRITE(Messagebox) NthRoot(5, 34)
WRITE(Messagebox) NthRoot(10, 7131.5^10)
FUNCTION NthRoot(n, A)
REAL :: prec = 0.001
IF( (n > 0) * (A > 0) ) THEN
NthRoot = A / n
DO i = 1, 1/prec
x = ((n-1)*NthRoot + A/(NthRoot^(n-1))) / n
IF( ABS(x - NthRoot) <= prec ) THEN
RETURN
ENDIF
NthRoot = x
ENDDO
ENDIF
WRITE(Messagebox, Name) 'Cannot solve problem for:', prec, n, A
END