Saturday, August 1, 2026
HomeC ProgrammingRamanujan Nested Radicals | C For Dummies Weblog

Ramanujan Nested Radicals | C For Dummies Weblog


Issue: ★ ★ ★ ★

Srinivasa Ramanujan was a mathematician of the genius selection in that he did superb issues in his brief lifetime. The person was insanely sensible. The truth is, he struggled to get different mathematicians to know his work as a result of it was so unfamiliar. Anyway, he concocted the factor proven in Determine 1, which is certainly one of many Ramanujan Nested Radicals:

Determine 1. Certainly one of Ramanujan’s extra well-known nested radicals additionally referred to as an infinite idenity.

A nested radical is a radial expression that comprises one other radical expression. A easy and extra understandable instance is proven in Determine 2.

Determine 2. A nested radical.

The unconventional (sq. root) comprises an expression with one other radical (sq. root). However for Ramanujan, the madness simply saved going.

From Determine 1, you see that the sample is so as to add to 1 the sq. root of 1 plus two instances the sq. root of 1 plus three, and so forth to infinity.

The pleasant half is that the results of the nested radical operation is three. Sure, all that nonsense when calculated out to infinity ends in the integer worth 3.0.

I hope you may admire the brilliance of Srinivasa Ramanujan as a result of he was in a position to discern such a contraption in his head and know its consequence with out the help of a pc.

As a C programmer, you have got a pc. And you’ve got in your mind the power to code the Ramanujan Nested Radical instance proven in Determine 1 to show that the result’s 3.0. Sure, this calculation includes recursion. Properly, I suppose you might most likely muster the code to do calculate the worth with out recursion (which I’d like to see), however I used recursion for my resolution. Right here’s the output:

3.000000

Please do that train by yourself earlier than you peek at my resolution, which I’ll publish in every week.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments