3 ms·
Looking at "Core Language" I was dismayed not to find any builtin floating point data type. In "Phix vs Conventional Languages" I'm told that "1/2 is always 0.
by Elrac 7y ago
Looking at "Core Language" I was dismayed not to find any builtin floating point data type.
In "Phix vs Conventional Languages" I'm told that "1/2 is always 0.5". And "Library Routines" / "Math" includes sin, cos and tan. What's going on here?
- jorams 7y agoThe type "atom"[1], is described in "Core Language" as follows: > An atom can hold a single floating point numeric value, or an integer I don't know why it isn't called "number", but it exists. The page on atom also mentions: > It can also hold a raw pointer, such as allocated memory or a call_back address, but that is typically only used when interfacing to external code in a .dll or .so file. [1]: http://phix.x10.mx/docs/html/atom.htm http://phix.x10.mx/docs/html/atom.htm
- Elrac 7y agoYou're right, I missed that. But that still leaves the ASCII tree diagram agreeing with the sentence "Phix has just five builtin data types:" while showing (and describing, in the following bullet point list) five data types that don't include "number" or a floating-point type. So what's left is a minor but consistently repeated error in the doc, on the "Core Language" page.
- deleted 7y ago[deleted]