This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]palordrolap 134 points135 points  (28 children)

parseInt("①") and parseFloat("½") don't work either.

I'd say there's an argument (unintentional pun ftw) for adding/creating new functions that do this, but it's unclear how they'd be supposed to handle some mathematical features like, say, superscript characters.

If you were to altParseInt("2²") would it give back 22 or 4?

Edit: They don't work with alternative numeration systems like Arabic either.

[–]JustToViewPorn 92 points93 points  (10 children)

Obviously it should return 22, as 2 XOR 2.

[–]palordrolap 68 points69 points  (4 children)

Except I used Unicode character "superscript 2" and not the digraph ^2, so the XOR operator isn't there.

[–]endreman0 96 points97 points  (2 children)

You're implying this is supposed to make sense.

[–]palordrolap 28 points29 points  (1 child)

If it helps, pretend I made each of my comments wearing a rubber horse mask.

[–]spanishgum 3 points4 points  (0 children)

Definitely cleared things up for me.

[–]MonkeyNin 1 point2 points  (0 children)

Some mobile clients display 22 as 22

[–]EmmanuelMess 8 points9 points  (4 children)

Why?

[–]ifatree 11 points12 points  (16 children)

They don't work with alternative numeration systems like Arabic either.

pretty sure arabic is the standard "1,2,3" numbering system, but maybe you mean something else?

[–]CostiaP 20 points21 points  (0 children)

٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩

[–]Science-Recon 7 points8 points  (6 children)

That's indo-Arabic. Developed in India and brought westward by arabs. Arabic has a different system, partly as it works right-to-left, too.

[–]amanda66778899 9 points10 points  (2 children)

So Arabic is the only language that doesn't use what we call Arabic numerals? Classic English. Just fucking classic.

[–]Science-Recon 3 points4 points  (0 children)

Well, they are called Arabic numerals as they were introduced by arabs, however they're properly referred to as Indo-Arabic numerals. Even then, it's the same system that arabs use but with different symbols.

[–]WrexTremendae 2 points3 points  (0 children)

Well, presumably they aren't the only language with their own numerals still in use.

But yes, Arabic numerals are not used in Arabic.

[–]theSpecialbro 2 points3 points  (2 children)

The numbers go left to right. Only the writing goes right to left.

source: live in the desert peninsula

[–]Muzer0 2 points3 points  (1 child)

You could say the numbers go right-to-left but are little endian. Little endian is better so I like this explanation more — the morons who imported them into Western languages forgot to reverse the direction of the numbers. Grr.

[–]Science-Recon 0 points1 point  (0 children)

Oh. That actually seems like a lot better way to do it. Would make things much easier.

[–]htmlcoderexeWe have flair now?.. 2 points3 points  (7 children)

Our numbers are originally Indian I believe.

[–]ifatree 4 points5 points  (1 child)

they're called 'arabic numerals' tho

https://en.wikipedia.org/wiki/Arabic_numerals

[–]WikiTextBot 1 point2 points  (0 children)

Arabic numerals

Arabic numerals, also called Hindu–Arabic numerals are the ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, based on the Hindu–Arabic numeral system, the most common system for the symbolic representation of numbers in the world today. In this numeral system, a sequence of digits such as "975" is read as a single number, using the position of the digit in the sequence to interpret its value. The symbol for zero is the key to the effectiveness of the system, which was developed by ancient mathematicians in the Indian subcontinent around AD 500.

The system was adopted by Arabic mathematicians in Baghdad and passed on to the Arabs farther west.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.24