This is from the JSON-LD spec.
ActivityPub / ActivityStream are based on JSON-LD.
I think it was a very bad idea for JSON-LD to define "number" this way!
It makes it so numbers with fractional values are inexact & lossy.
This include values that are common for money.
For example, neither 0.10 and 0.20 can be represented exactly. So, 0.10 + 0.20 does NOT equal 0.30!
It should have used FIXED-point numbers rather than FLOATING-point.
![number
In the JSON serialization, a number is similar to that used in most programming languages, except that the octal and hexadecimal formats are not used and that leading zeros are not allowed. In the internal representation, a number is equivalent to either a long or double, depending on if the number has a non-zero fractional part (see [WEBIDL]).](https://files.mastodon.social/media_attachments/files/116/115/532/009/836/539/original/5d2ac605cf834ed1.png)