Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ pub fn seven_digit_number_that_is_not_an_armstrong_number_test() {
}

pub fn armstrong_number_containing_seven_zeroes_test() {
let assert True =
let assert False =
armstrong_numbers.is_armstrong_number(
186_709_961_001_538_790_100_634_132_976_990,
Copy link
Contributor

@jiegillet jiegillet Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to butt in, but I'm pretty sure that this number and the following one are Armstrong numbers (see the comments or example sections, or the full list). I suspect that the site you posted screenshots from uses JS to check the number, and numbers that large are always treated as floats and lose precision.
Similarly, having to introduce Floats in the example solution to make it work seems suspicious to me.

Also, in general, the practice exercises all come from a repo common to all the Exercism tracks, so if there is an issue not linked to the specificity of a track language, it should be solved over there so that all tracks can benefit.

Copy link
Contributor Author

@clouby clouby Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your explanation here, I'll take a look further about Armstrong criteria - I'll close it.

)
}

pub fn the_largest_and_last_armstrong_number_test() {
let assert True =
let assert False =
armstrong_numbers.is_armstrong_number(
115_132_219_018_763_992_565_095_597_973_971_522_401,
)
Expand Down
Loading