[Community Puzzle] Number formatting

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @jddingemanse,validated by @_O-MEGA,@Saphir123 and @NE0dymium.
If you have any issues, feel free to ping them.

Can you show me in a condition where it is written that in the number 0.* 0 is ignored, or that if there are no digits at all, then it is 0.
Here I have a question for the people who approved this puzzle(@NE0dymium @_O-MEGA @Saphir123), do you think this is normal, for example, when your friends invited you to play a board game, let you familiarize yourself with the rules, and here you are sitting, playing, and a game situation arises, and you act according to the rules that you read earlier, and suddenly your friends tell you: no, you are acting incorrectly, because this situation is exceptional and in case of it, you need to act differently. DO YOU THINK THIS IS NORMAL?!

I feel lucky that you are going berserk on the approvers instead of me :sweat_smile:.

But nice remark. I guess it is a matter of interpreting All positions not used are represented with x.. I interpret this as all leading and tracing zeros to be replaced by x. A number 01.10 would be x1.1x, so (in my humble opinion) the number 00.00 would become xx.xx. Ergo xxx,xxx,xxx.xxx.xxx must be 0.

  1. When I started solving puzzles, I expressed dissatisfaction with the puzzle to the author of the puzzle, but recently it dawned on me, the author cannot be to blame if the puzzle has an error/inaccuracy/not enough tests. The puzzle becomes publicly available only after three people vote for the puzzle. All claims should be directed to these three people, they are the ones who did not notice the inaccuracies/errors in the puzzle.
  2. The description must be clear and unambiguous.

Fair point.

The description states All positions not used are represented with x. Not used must imply ‘leading’ or ‘tracing’ zeros (000000001.100000 is written as xxx,xxx,xx1.1xx.xxx). Having xxx,xxx,xxx.xxx.xxx implies all positions are not used, ie there were only leading and tracing zeros, nothing else. Can you explain to me how xxx,xxx,xxx.xxx.xxx being 000000000.000000 ie 0 is ambiguous?

The puzzle uses decimal digits/math (division)/representation and tell me how many examples in school/university/real life where 0 (literally 1 digit denoting zero) would not be written in examples like -1+1=0, or for example 1/2=.5 (US only as i understood but I would ignore it because they use the imperial system of measures/Fahrenheit/mm/dd/yyyy notation - that’s what immediately comes to mind)

The fact that leading zeros and zeros at the end of a decimal fraction are not written is a generally accepted practice, one might say a rule of mathematics.

Description should mention that the x are always appeared as leading in a continuous manner before the decimal point (first 9 digits or 11 characters) and trailing after the decimal point (last 6 digits or 7 characters)

As in cases like these should not be taken into account of

x45,16x,3xx.123.321

xxx,xxx,169.x50.1xx

OTOH, the output format should be specified more clearly , as in x should be treated as trailing and leading zeros && the input string should be considered a valid floating point number representation after removal of x (leading && trailing zeros) , corresponding with issues mentioned above

Form the condition:
All positions not used are represented with x.

(highlighted by me)