Ghica
March 14, 2026, 4:28pm
1
Today it is Pi day. So I thought it would be fun to make an AppInventor app to calculate decimals of Pi. I asked ChatGpt to help me out.
It gave me a 10 page document on how to do it. Then I asked to make an .aia for it, in the hope it had improved since the last time I asked for an .aia a few months ago. No luck.
Maybe I will retry later. Anyone has a good idea about how to let ChatGpt (or some other) do the work for you?
Peter
March 14, 2026, 5:17pm
2
I tried Aptly but it doesn’t work anymore.
Peter
March 14, 2026, 5:21pm
3
This time it worked. It made this.
Here is the aia.
PiDay.aia (2.6 KB)
I got this warning.
Halo! It is certainly possible to code mathematical functions with ChatGPT or any other AI.
I made this function (Ramanujan's Pi estimation) using AI:
This is the result, it generates upto 5 decimal points.
1 Like
Here is another function that uses MachinPi (also created by AI):
func MachinPi(terms) = {
local arctan1 = 0
local arctan2 = 0
for (k: 0 .. terms - 1) {
local sign = if (k % 2 == 0) 1 else -1
local exp = 2 * k + 1
arctan1 = arctan1 + sign * (1 / (5 ^ exp)) / exp
arctan2 = arctan2 + sign * (1 / (239 ^ exp)) / exp
}
16 * arctan1 - 4 * arctan2
}
println(MachinPi(10))
You can paste these codes in https://falcon.ekita.me/ to get the blocks.
Ghica
March 14, 2026, 9:31pm
7
This is of course awesome. What I wanted however, was to calculate pi the old fashioned way as invented by Archimedes.
Too late for today now, I will look at the other replies later.
Taifun
March 14, 2026, 10:12pm
8
4 years ago we already had a Pi day challenge...
In a few days it will be Pi Day again.
So here is the challenge. Show how you can calculate Pi in the most beautiful, ugliest, smallest, biggest, etc, etc way possible with App Inventor.
Here you have some examples:
[image]
Now it is up to you.................
Maybe you can make a game around calculating Pi. Maybe you can also tell the history of Pi.
Where would we be without pie..... huh Pi
[image]
Taifun
2 Likes