[Community Puzzle] Decimal numbers to floating numbers - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @JDOnline,validated by @Dr_Meyss,@Eulero314 and @NicolasAlmerge.
If you have any issues, feel free to ping them.

After implementing the algorithm, all tests are passing.
After submitting, two validators are KO, notably validator 4.
Some tips to help me investigate?

Of course, using native C# classes like BitConverter makes everything work perfectly fine, but that defeats the purpose of the game.

Why the last two test cases the same?

And there are no negative test cases.

Indeed twice the same test is a mistake. I just changed it and put it as a negative number.
Thanks for your comments.

Can you show me the result you have on your side to compare and try to help you ?


I have an issue with validator 8, is there any specificity on this one versus the other validators and all IDE tests ?

Thank you

The input to the validator 8 (Scientific notation (2)) is:
[a positive integer greater than 9]e[a negative integer].

Not sure if there is any other specificity.

Ok thank you,
This should be written [dec.unit] e [the index placed in the validator +1]. Anyhow, I’ll check if I have something wrongly managed in this case.

I have not the result of the validator after submitting…or is there a way to get it?

From the RESULTS button to the left of the puzzle statement, click MY REPORT, then DETAILS.

I’ve passed all the test cases but failed Validator 9. Any clues about that validator, please?

I don’t see anything special about Validator 9, except for having 5 decimal places before “e”: the input is in the format of x.xxxxxe+x.

Weird. I’m parsing the number into a Python decimal, so there should be no scope for precision loss. Back to the drawing board… (Great puzzle, by the way)