Talk:Munchausen numbers: Difference between revisions

From Rosetta Code
Content added Content deleted
Line 3: Line 3:
: This changes the output only for the number 0 which is not between 1 and 5000 (the task's requirement) --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 19:16, 23 September 2016 (UTC)
: This changes the output only for the number 0 which is not between 1 and 5000 (the task's requirement) --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 19:16, 23 September 2016 (UTC)
:: True, it would only be an issue if anyone tried to extend this to the next Munchausen number (438 579 088 - also the last known one it seems). --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 21:12, 23 September 2016 (UTC)
:: True, it would only be an issue if anyone tried to extend this to the next Munchausen number (438 579 088 - also the last known one it seems). --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 21:12, 23 September 2016 (UTC)
:: Also, if you are using an algorithm where the digits are already split up (so not derived by using mod and division), you don't have to worry about leading zeros e.g. 0030 is "Munchausen" if 0^0 = 1. The non-standard 0^0 = 0 simplifies things. --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 21:55, 23 September 2016 (UTC)

Revision as of 21:55, 23 September 2016

0 to the power 0 is considered as 0 for Munchausen numbers

...according to the Wikipedia page - might be worth mentioning in the task as it is normally 1 according to mathematicians. --Tigerofdarkness (talk) 18:25, 23 September 2016 (UTC)

This changes the output only for the number 0 which is not between 1 and 5000 (the task's requirement) --Walterpachl (talk) 19:16, 23 September 2016 (UTC)
True, it would only be an issue if anyone tried to extend this to the next Munchausen number (438 579 088 - also the last known one it seems). --Tigerofdarkness (talk) 21:12, 23 September 2016 (UTC)
Also, if you are using an algorithm where the digits are already split up (so not derived by using mod and division), you don't have to worry about leading zeros e.g. 0030 is "Munchausen" if 0^0 = 1. The non-standard 0^0 = 0 simplifies things. --Tigerofdarkness (talk) 21:55, 23 September 2016 (UTC)