emojicode / emojicode

πŸ˜€πŸ˜œπŸ”‚ World’s only programming language that’s bursting with emojis

Home Page:https://emojicode.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong real number to string conversion

praxidike97 opened this issue Β· comments

When I execute

πŸ˜€ πŸ”‘ πŸ”‹1.0❗5❗❗

-1.00000 is correctly printed. But when I change it to

πŸ˜€ πŸ”‘ πŸ”‹0.9❗5❗❗

it prints 0.90000. There seems to be something wrong with the πŸ”‘ ❗method, it always loses the '-' when the real number is smaller than 1.0

commented

Thanks for reporting that. This was caused by a comparison of -0.0 against 0, where -0.0 apparently is not considered to be smaller in C++.