Share your repls and programming experiences

← Back to all posts
π in Fortran
AmazingMech2418 (1039)

@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:
Forth -
Python and Node.js (Node is linked in post) -
C -

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 (184)

i heard that official fortran support may be added soon

LizFoster (648)

56 pings since last evening T~T

Good work!

AmazingMech2418 (1039)

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

LizFoster (648)

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

DynamicSquid (4629)

print *, "3.14159265359..."

AmazingMech2418 (1039)

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

TheForArkLD (763)

Fortran is really cool forever!


strange lang

SixBeeps (5067)

So you're also saying π=4