Something for π day

Today is π day, so feel free to enjoy some smart stuff from Dr. Holly Krieger:

If this inspires you to explore the wonders of the Mandelbrot set on your own, there are plenty of programs to do so, e.g.:

https://xaos-project.github.io/

I can also recommend the classic book by Heinz Otto Peitgen, which, back in the day, sparked public interest in fractals and truly boosted the development of modern computer graphics:

Last, but not least, but only if you understand German, some more π fun:

4 Likes

Speaking of math and people talking about it on YouTube:

This is one of the many many streams made by Xah Lee.

He is one of my most favourite YouTubers. He is an extreme math nerd and talks a lot about math and often combines it with Computer Science.

3 Likes

My only problem with Xah Lee is that he always makes me feel really dumb.

4 Likes

Thanks for sharing that, I had no idea this existed, but now have book marked the site and looking forward to celebrating so many important days such as…
6 may !
I’ll drink to that !

1 Like

So called “Pi Day” only makes sense if you’ve got your date formatting all arse about…

e.g. YYYYMMDD makes the most sense, but even DDMMYYYY still makes more sense than MMDDYYYY, why would you put the middle most (or middle least) significant number at the start? It should always be MSB or LSB… it’s really crap if you want to sort on those strings too…

There I go again, next thing I’ll start ranting about the merits of the Metric system VS the shitty pre-renaissance Imperial / AF system - and Centigrade vs Fahrenheit :smiley:

4 Likes

Xah Lee actually mentions in his video a topic, I originally wanted to address in the original post, but then forgot:

Precision in numeric calculations

Fractal generation, namely drawing the Mandelbrot set, is a nice little project if you’re learning a new (or your first) programming language. As you zoom into the set, you will soon start to realise that typical precisions of 64 or 128 bit per floating point number will not take you very far.

As mentioned by Xah Lee, Mathemetica avoids this problem by using symbolic calculations. However, Mathematica is neither easy to learn nor is it free and open source.

So, if you want to test your own programming skills, you can either find your own way of dealing with the precision issue or you will have to use language extensions which allow for arbitrarily exact numbers:

For C++, the Boost library offers such a functionality:

https://www.boost.org/doc/libs/1_59_0/libs/numeric/odeint/doc/html/boost_numeric_odeint/tutorial/using_arbitrary_precision_floating_point_types.html

For JavaScript, you have BigFloat

For Perl, the package is also called BigFloat:

https://perldoc.perl.org/Math::BigFloat

Last, but not least, Rust, has the rug crate for that:

https://docs.rs/rug/0.6.0/rug/

Happy coding!

2 Likes

You’re so right: I always thought, the US-Americans had their days wrong. However, “pi day” in DDMMYYYY gives you the 31st April. Bummer!

This is an issue, we do not even need to discuss. No person of sound mind would ever consider the imperial system to be more useful than metric.

Just don’t get me started on paper formats…

2 Likes

This is what I hate since ever! It’s not only the parsing thing, but it’s just the lack of any logic in that system that bothers me the most!

I always write dates like yyyy/MM/dd if possible. The separator may be variable, but the point is: go from highest to lowest. This is also the way most ISO dates take.

I just cannot understand and neither can I stand when dates are written like MM/dd/yyyy, because it just does not make any sense!

What makes this even worse: sometimes you cannot be sure if someone used one way or the other and then you have a date like 11/03/2020 and you ask yourself, if the one typing out that dates is talking about March or November!

I wish the whole idea of MM/dd/yyyy would just get erased from the mind of every single person on earth.

1 Like

Don’t get me started on that - I just had to do a monitoring blackout in our monitoring system - and it accepts the start and end dates in the correct format - but then displays them mm/dd/yyyy :grimacing:… not so bad today as 03/15/2021 is obvious… But I did one in February for the 04/02/2021 - and it showed it as 02/04/2021 - and I’m thinking (actually swearing out loud) “But I want it in f–king Feburary not f–king April!!!” :grimacing:

The other thing that annoys me a bit about things like this, e.g. 20/04, is that’s marijuana day, and all that "May the Fourth Be With You) on 04/05 - but by the time all those meme flood in here to Oz - it’s ALREADY the following day… seen a bunch of Pi Day memes in social media this morning, but it’s already 3.15 here downunder!!!

And don’t get me started on eveyone assuming it’s Winter across the whole planet (well it’s Spring in the North now, I guess, and Autumn here)…
– edit –
And yes, I’m a grumpy old man :smiley:

1 Like

Funnily enough, it is always the US-Americans who create such illogical ways of dealing with data:

I have been doing a lot of professional work with parsing and analysing financial and accounting data: With (and only with) American counterparties, you never knew what you were going to get. Date strings from all over the world were consistent in one way or the other - not with Americans, even within the same company, they used all kind of different formats in electronic communication:
Months in front, days in front, years in front, no years, two digit years, four digit years, separators, no separators, leading zeroes, no leading zeros…

And pricing: All over the world, prices are quoted with decimals. Not for US Bonds… According to market specifications, they are given in 1/32, 1/64 or 1/128, often changing over time:

So, a price of 104.12 (electronically) can mean (depending on market, day in history, counterparty, internal department):
104 + 12/32
104 + 12/64
104 + 12/128
but also
104 + 4/32, because 104 + 4/32 = 104 + 1/8 = 104.125 = (in their logic) 104.12|5 cut after the second digit.

However, 104.125 may also mean 104 + 12.5/32 … It’s madness.

It seems, they just adore making things complicated.

Not everyone: I have family in Argentina and South Africa.

Funnily enough, 20th April was once a holiday in Germany: Führer’s birthday…
I like the dope day better.

1 Like

Funny that I should know that (Hitler’s birthday)… Funny? Sad? Tragi-comic?

I did recently read a rather “epic” non-fictoin book by a European writer “John Vincent Palatine” - called “Little Drummer Boy - From Bismark to the Beer Hall Putsch”… the blow by blow events leading up to the putsch were riveting reading… That was one e-book I was able to buy as a PDF with DRM removed!

Leading up to WW2 - my dad’s aunt used to write (and receive) letters (in English) to/from her distant cousins still living in Germany (Dusseldorf I think?) - and one of her cousins (mine too, a few times removed, I guess) who’s parents had moved to Switzerland a generation before, then he moved back to Germany, ended up marrying into a German family, and he was forced to join the Nazi party to get married to a fraulein (and provide proof there was no non-Aryan ancestry lurking in his geneology).

1 Like

Boy, do I feel dumb. Here I sit, trying to decide between apple and pumpkin pie.

1 Like

On date format perhaps we are looking at this wrongly and need to ask Steve and bill for help …

After all Microsoft and Apple know better than Linux?

So was 1900 a leap year or not … remember the maths around the calculation

And you thought we could solve dd or mm issues

In my opinion, “Maths” is too big a word for such basic arithmetics.

However, the way the Gregorian calendar is constructed leads to some surprising non-trivial corrollaries, like:

The 13th of each month falls more often on a Friday than on every other day of the week.

2 Likes

1900 wasn’t a leap year, but 2000 was… I was working in IT doing Y2K “mitigation” - didn’t find a single bug - until the 29th of February 2000 - someone had written a home loan management system for one of my customers in VB and assumed that the first year of a century wasn’t a leap year, but forgot the first year of a millennium is a leap year - and the application and SQL backend assumed the day after 28.02.2000 was 01.03.2000…

1 Like

Actually, it’s not. The first year of every other millenium is a leap year (Years being a multiple of 400 are leap years).

1 Like

I am planning now for the turn of 9999 to what comes next ?
Imagine we could make a small fortune 're writing systems to cope with 5 digit year dates
Perhaps by then the bugs (design features) in Windows 10 may be fixed

1 Like

Warning!!! You are calling the flat earthers!!!
In their opinion, the metric system is just another measure to control the world, suppress Christianism and spread the Satanic belief. :laughing: (No joke!)
That’s why they strictly only use Imperial measurement systems. Even if they repeat something that was initially measured in metres, they will still strictly convert it to Imperial units.

I think that also says a lot about the Imperial system in itself… :laughing:

Precisely. I will never get over the whole Imperial measurements crap. To me, it seems like a bunch of Irish emigrants sat in a pub, discussing the weirdest measurements possible, then decided on the Imperial units and then they emigrated to America causing the chaos the USA has now with Imperial units…

Sounds pretty hipster to me. :laughing:

Holy crap, didn’t even know that. This reminds me of the whole “we are driving northbound” thing, where Americans say where they are driving to by mentioning a cardinal point… Never made sense to me and still does not make sense. Just tell me which city/street/place you are driving to. Do not tell me what cardinal point you are driving along… This sounds like they are trying to be the protagonist in a novel with a pirate setting.

bUt mUh fReEdOm

I remember many years ago, when someone told me that people celebrate the 20th April, but I didn’t know why. Then I looked up the date on a search engine and I’m like “why do people celebrate the Führer’s birthday?” :rofl:

This sounds like perfect material for a Historical love story novel. :grin:

Did you know people too, that got out of school and said “math at school was hard” and you just thought “math at school is not “math”, it’s just calculating numbers”. :laughing:

1 Like