Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I may have just realized that exponential notation in hexadecimal isn't exactly usable.
-
A big disadvantage of parser combinators is that it's easy to invent and describe ambiguous syntax and it's really difficult to prove that it's ambiguous.
-
@lbfalvy Uppercase E: Digit, lowercase e: exponent separator.
One more reason to use Uppercase Digits. -
@happygimp0 I would agree but I'm chronically used to typing and reading lowercase colours.
-
@lbfalvy Well, using e for an exponent may not be so a great idea when there are people who use e as a digit.
C printf specifier a uses 0x1.23456p+20, but the 12 is decimal, maybe 0x1.23456p+0x14 will work? -
@happygimp0 I like the p, it solves the problem while also indicating that the system isn't necessarily standard natural notation (e means power of 10 and not power of base if I'm not mistaken).
I specifically want to retain that the exponent is decimal, because that's the most natural system for humans, and the main reason to use other systems is to encode binary values. Informing the programmer that the number is shifted 20 times is more useful in decimal.
Related Rants
What's your idea of a perfect number?
Mine is:
default decimal, prefix for binary, octal, hex
Integers in natural notation with strictly positive exponent
All bases allow natural notation, where the exponent is always a decimal number and represents the power of the base (0b101e3 = 0b101000)
Floats in all bases allow a combination of natural notation and dot notation
Underscores allowed anywhere except the beginning and end for easier reading
rant
langdev
blackjack and hookers
numbers
ideal number representation