Share your repls and programming experiences

← Back to all posts
π in Fortran

@TheForArkLD recommended that I make a pi approximation in Fortran, so here it is! This is specifically Fortran 90. This is one of my multiple pi approximations in various languages.

Here are the other approximations:
APL - https://repl.it/talk/share/p-in-APL/34888
Forth - https://repl.it/talk/share/p-in-Forth/34652
LOLCODE - https://repl.it/talk/share/p-in-LOLCODE/34421
Python and Node.js (Node is linked in post) - https://repl.it/talk/share/2-Approximations-of-p-In-Only-Four-Lines-of-Code/32773
C - https://repl.it/talk/share/p-Approximations-in-C/33461

I'm also thinking about doing BASIC soon since I've already made Pong and Snake in it and have a good idea on the language now.

Credit to @TheForArkLD , @Warhawk947 , and @LizFoster for inspiring these approximations. Most of these use the Nilakantha Series, although I also use the arctangent method (multiplying the radian arctangent of 1 by 4 to get pi and getting the arctangent with an infinite series) in three of them (Python, Node, and C).

DungeonMaster00 (149)

i heard that official fortran support may be added soon

LizFoster (598)

56 pings since last evening T~T

Good work!

AmazingMech2418 (941)

@LizFoster I'm going to post one in QBasic soon too.

LizFoster (598)

@AmazingMech2418 Oh sweet! I actually used to know how to write in QBasic, though it has been years, ha ha ha.

[deleted]

strange lang

SixBeeps (3221)

So you're also saying π=4

DynamicSquid (4393)

print *, "3.14159265359..."

AmazingMech2418 (941)

@DynamicSquid Then, it wouldn't be the Nilakantha Series...

TheForArkLD (734)

Cool!
Fortran is really cool forever!