Share your repls and programming experiences

← Back to all posts
##### π in COBOL

Here is a new addition to my series of pi approximations! This one is in COBOL!

Credit to @NoelB33 @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).

This series is mostly over, but if I learn a new programming language that has floating point capabilities, get ready for a new addition! I have learned Assembly (GAS and NASM), BrainF, and Quil, but these ones don't support floating point in an easy-enough way. LOL! Which one should I do next? Let me know what you think!

Also, I'm planning on making a powerful compiled language called Peregrine soon and an object-oriented variant called Falcon and will make pi approximations in both to add to the series!

Ideas for the next ones: Open to suggestions!

Also, thank you to @DynamicSquid for most recently suggesting COBOL on my post in Ada.

hotnewtop
JacobMcPherson1 (239)

You should do one in J

fuzzyastrocat (1867)

Dang I need to make faster progress on Eros so I can get you to do one of these in it xD

Nicely done (though ewww COBOL)!

AmazingMech2418 (1102)

@fuzzyastrocat Thank you! Hey, COBOL is actually pretty cool, I think! LOL!

Yay! Another one in the series :D

Also have you done BASIC? (not QBasic which I know you know, just BASIC)

Edit:

• Applescript
• WASM
• HolyC
AmazingMech2418 (1102)

And I have not done one in normal BASIC, but really the main difference between the two is that BASIC has the GUI, and a pi approximator doesn't really need that...

@AmazingMech2418 ah gotcha (also I updated comment with a few random languages off the top of my head lol)

AmazingMech2418 (1102)

@RayhanADev With AppleScript, I'm pretty sure that's Mac-only, so I don't think I can do it on Repl.it and I can't do it off Repl.it because I don't have a Mac.

WASM is actually one I'm thinking about trying! I need to learn it a little more though.

Judging from a few Google searches, that one only runs on TempleOS...

EpicGamer007 (1752)

@AmazingMech2418 @RayhanADev wasm is a compile target, i think you meant wat. (I dont think AM2418 would want to write machine code lol)

Whippingdot (678)

my brain does not comprehend the words you are speaking oh amazing mech who wants to take over the world of fortnite @AmazingMech2418