05-10-2013 03:09 PM - edited 05-10-2013 03:11 PM
@altenbach wrote:
All fractional decimal digits of an integer are zero. Why shouldn't you be able to display them if you want to?
Now it looks a bit better 😉
05-10-2013 03:12 PM
@altenbach wrote:
All decimal digits of an integer are zero. Why shouldn't you be able to display them if you want to?
Sure, that makes sense. Especially for a user meeting your interface for the first time...
In the same vein, why shouldn't I be able to convert an integer into an absolute or relative time either? That's probably why I can.
Now I wonder why I can't give it a unit, but that's probably for another topic.
05-10-2013 03:28 PM
@X. wrote:
@altenbach wrote:
All decimal digits of an integer are zero. Why shouldn't you be able to display them if you want to?
Sure, that makes sense. Especially for a user meeting your interface for the first time...
In the same vein, why shouldn't I be able to convert an integer into an absolute or relative time either? That's probably why I can.
Now I wonder why I can't give it a unit, but that's probably for another topic.
Because integer units seldom make sense. Take 1Deg C for example it equals 273.15 (ish) Kelvin so it would be coerced without warning as an integer. And we need not mention that units have prefixes. Any guess what a Giga-unit Integer or Pico-Unit Integer would behave like?
05-10-2013 03:59 PM
@JÞB wrote:
Any guess what a Giga-unit Integer or Pico-Unit Integer would behave like?
Well, SI formatting is allowed for an integer, so I guess it HAS TO make some sense...
05-11-2013 01:08 PM
@Darin.K wrote:
@altenbach wrote:
All decimal digits of an integer are zero. Why shouldn't you be able to display them if you want to?
Wait. What?
Well, we already know that Altenbach doesn't really understand numbers.
05-11-2013 01:40 PM
@X. wrote:
@JÞB wrote:
Any guess what a Giga-unit Integer or Pico-Unit Integer would behave like?Well, SI formatting is allowed for an integer, so I guess it HAS TO make some sense...
No, it does not need to make sense to you...In the way you want it to make sense/ All I am saying is that is does make sense. Just think like a computer! They are very limited in the operattions they can preform
05-11-2013 02:27 PM
@JÞB wrote:
Just think like a computer! They are very limited in the operattions they can preform
All right, so I want to be able to set the precision of I32 constants to arbitrary digits. How is that to think like a computer?
Oh, but wait, I can:
And BTW, the same constant reads like so in Absolute Time format:
and like this in relative time format:
My turn to play tricks!
05-11-2013 03:09 PM
@crossrulz wrote:
@for(imstuck) wrote:
For the same reason that %d stands for decimal when formatting a string with a number which has no possiblity of having digits after the decimal
disclaimer: I'm sure there is a valid reason for this
Actually, there is a very valid reason. Decimal simply means base 10. Just the same way that Binary means base 2, Octal means base 8, and Hexadecimal (often shortened to Hex) is base 16. All of these are dealing with integers. The %d, %b, %o, and %x have been around at least since C got started. They have nothing to do with the English name of decimal point.
Plus, look at your string<->Number conversions. You will see a Decimal String to Number and Number to Decimal String. Those are just using the %d convension.
Still you have decimals, so why not binals, hexidecimals and octals? Since you can have fractions of decimals you can ofc. have fractions of the other representations? Which leads to teh question: Why haven't there been a system based on the most divisable numer, the perfect number, why isn't there a 60base? Hexadecimal for real!
/Y
05-12-2013 07:04 AM
I think the Mayans, or maybe the Babylonians, used base 60 for some of their astronomical calculations. Most of us do not have enough fingers and toes to use base 60.
Lynn
05-13-2013 09:11 AM
Yet the Mayans were doing some pretty graphical things at the time...