On Aug 26, 4:59 pm, Piet van Oostrum p...@cs.uu.nl wrote:
Mensanator mensana...@aol.com (M) wrote:
M That's my point. Since the common usage of binary is for
M Standard Positional Number System of Radix 2, it follows
M that unary is the common usage for Standard Positional
M Number System of
On Thu, 27 Aug 2009 10:49:27 -0700, Mensanator wrote:
Fine. I'm over it. Point is, I HAVE encountered plenty of people who
DON'T properly understand it, Marilyn Vos Savant, for example.
I'm curious -- please explain. Links please?
You can't
blame me for thinking you don't understand it
Mensanator mensana...@aol.com (M) wrote:
M That's my point. Since the common usage of binary is for
M Standard Positional Number System of Radix 2, it follows
M that unary is the common usage for Standard Positional
M Number System of Radix 1. That's VERY confusing since such
M a system is
Mensanator wrote:
[ ... ]
If you want your data file to have values entered in hex, or oct, or even
unary (1=one, 11=two, 111=three, =four...) you can.
Unary? I think you'll find that Standard Positional Number
Systems are not defined for radix 1.
It has to be tweaked. If the only
On Aug 26, 10:27 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Wed, 26 Aug 2009 18:53:04 -0700, Erik Max Francis wrote:
In any case, unary is the standard term for what I'm discussing:
http://en.wikipedia.org/wiki/Unary_numeral_system
snip
This really isn't anywhere
Mensanator mensana...@aol.com (M) wrote:
M On Aug 26, 4:59 pm, Piet van Oostrum p...@cs.uu.nl wrote:
Mensanator mensana...@aol.com (M) wrote:
M That's my point. Since the common usage of binary is for
M Standard Positional Number System of Radix 2, it follows
M that unary is the common
On Aug 27, 2:26 pm, Piet van Oostrum p...@cs.uu.nl wrote:
Mensanator mensana...@aol.com (M) wrote:
M On Aug 26, 4:59 pm, Piet van Oostrum p...@cs.uu.nl wrote:
Mensanator mensana...@aol.com (M) wrote:
M That's my point. Since the common usage of binary is for
M Standard Positional Number
On Tue, 25 Aug 2009 11:45:28 -0700, Mensanator wrote:
On Aug 25, 9:14 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Mon, 24 Aug 2009 18:01:38 -0700, Mensanator wrote:
If you want your data file to have values entered in hex, or oct, or
even unary (1=one, 11=two,
On Aug 26, 9:58 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Tue, 25 Aug 2009 11:45:28 -0700, Mensanator wrote:
On Aug 25, 9:14 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Mon, 24 Aug 2009 18:01:38 -0700, Mensanator wrote:
If you want your
On Wed, 26 Aug 2009 10:58:12 -0700, Mensanator wrote:
But I certainly wouldn't call it binary, for fear of confusion with
radix-2 binary.
That's my point. Since the common usage of binary is for Standard
Positional Number System of Radix 2, it follows that unary is the
common usage for
On Thu, 27 Aug 2009 01:34:10 +, Steven D'Aprano wrote:
On Wed, 26 Aug 2009 10:58:12 -0700, Mensanator wrote:
But I certainly wouldn't call it binary, for fear of confusion with
radix-2 binary.
That's my point. Since the common usage of binary is for Standard
Positional Number System
Steven D'Aprano wrote:
On Wed, 26 Aug 2009 10:58:12 -0700, Mensanator wrote:
But I certainly wouldn't call it binary, for fear of confusion with
radix-2 binary.
That's my point. Since the common usage of binary is for Standard
Positional Number System of Radix 2, it follows that unary is the
On Wed, 26 Aug 2009 18:53:04 -0700, Erik Max Francis wrote:
In any case, unary is the standard term for what I'm discussing:
http://en.wikipedia.org/wiki/Unary_numeral_system
although Mathworld doesn't seem to know it.
Psst. That's a hint.
Googling for unary number system (unary
On 25 Aug, 01:25, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Mon, 24 Aug 2009 16:23:06 -0700, James Harris wrote:
Sure but while I wouldn't normally want to type something as obscure as
32rst into a file of data I might want to type 0xff00 or similar. That
is far
On Mon, 24 Aug 2009 18:01:38 -0700, Mensanator wrote:
If you want your data file to have values entered in hex, or oct, or
even unary (1=one, 11=two, 111=three, =four...) you can.
Unary? I think you'll find that Standard Positional Number Systems are
not defined for radix 1.
Of course
On Aug 25, 9:14 am, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Mon, 24 Aug 2009 18:01:38 -0700, Mensanator wrote:
If you want your data file to have values entered in hex, or oct, or
even unary (1=one, 11=two, 111=three, =four...) you can.
Unary? I think you'll
On 24 Aug, 03:49, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
...
Here's another suggested number literal format. First, keep the
familar 0x and 0b of C and others and to add 0t for octal. (T is the
thirdletter of octal as X is thethirdletter of hex.) The numbers
above would be
Scott David Daniels scott.dani...@acm.org (SDD) wrote:
SDD James Harris wrote:...
Another option:
0.(2:1011), 0.(8:7621), 0.(16:c26b)
where the three characters 0.( begin the sequence.
Comments? Improvements?
SDD I did a little interpreter where non-base 10 numbers
SDD (up to base 36)
MRAB wrote:
James Harris wrote:
On 23 Aug, 00:16, Mel mwil...@the-wire.com wrote:
James Harris wrote:
I have no idea why Ada which uses the # also apparently uses it to end
a number
2#1011#, 8#7621#, 16#c26b#
Interesting. They do it because of this example from
J. Cliff Dyer wrote:
I had an objection to using spaces in numeric literals last time around
and it still stands, and it still stands in the new one.
What happens if you use a literal like 0x10f 304? Is 304 treated as
decimal or hexadecimal? It's not clear how you would begin to combine
it.
On 24 Aug, 02:19, Max Erickson maxerick...@gmail.com wrote:
...
It can be assumed however that .9. isn't in binary?
That's a neat idea. But an even simpler scheme might be:
.octal.100
.decimal.100
.hex.100
.binary.100
.trinary.100
until it gets to this anyway:
On Monday 24 August 2009 01:04:37 bartc wrote:
That's a neat idea. But an even simpler scheme might be:
.octal.100
.decimal.100
.hex.100
.binary.100
.trinary.100
until it gets to this anyway:
.thiryseximal.100
Yeah right. So now I first have to type a string, which probably has a
On 24 Aug, 09:05, Erik Max Francis m...@alcyone.com wrote:
...
Here's another suggested number literal format. First, keep the
familar 0x and 0b of C and others and to add 0t for octal. (T is the
third letter of octal as X is the third letter of hex.) The numbers
above would be
James Harris wrote:
On 24 Aug, 09:05, Erik Max Francis m...@alcyone.com wrote:
Here's another suggested number literal format. First, keep the
familar 0x and 0b of C and others and to add 0t for octal. (T is the
third letter of octal as X is the third letter of hex.) The numbers
above would be
James Harris wrote:
On 24 Aug, 02:19, Max Erickson maxerick...@gmail.com wrote:
It can be assumed however that .9. isn't in binary?
That's a neat idea. But an even simpler scheme might be:
.octal.100
.decimal.100
.hex.100
.binary.100
.trinary.100
until it gets to this anyway:
.thiryseximal.100
Hendrik van Rooyen wrote:
I also tried to include an example of a literal with a base of a Googol but I
ran out of both ink and symbols.
:-)
... or particles in the observable Universe, for that matter.
--
Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/
San Jose, CA, USA 37
On 24 Aug, 09:30, Erik Max Francis m...@alcyone.com wrote:
James Harris wrote:
On 24 Aug, 09:05, Erik Max Francis m...@alcyone.com wrote:
Here's another suggested number literal format. First, keep the
familar 0x and 0b of C and others and to add 0t for octal. (T is the
third letter of
On Aug 23, 9:42 pm, James Harris james.harri...@googlemail.com
wrote:
The numbers above would be
0b1011, 0t7621, 0xc26b
Algol68 has the type BITS, that is converted to INT with the ABS
operator.
The numbers above would be:
2r1011, 8r7621, 16rc26b
r is for radix:
James Harris wrote:
On 24 Aug, 02:19, Max Erickson maxerick...@gmail.com wrote:
[ ... ]
int('100', 3)
9
int('100', 36)
1296
This is fine typed into the language directly but couldn't be entered
by the user or read-in from or written to a file.
That's rather beside the point. Literals
J. Cliff Dyer j...@sdf.lonestar.org wrote:
I had an objection to using spaces in numeric literals last time around
and it still stands, and it still stands in the new one.
Or, we can use U+00A0 NO-BREAK SPACE, once we already have unicode
variable names :-)
(probably some people would find it
Piet van Oostrum wrote:
Scott David Daniels scott.dani...@acm.org (SDD) wrote:
SDD James Harris wrote:...
Another option:
0.(2:1011), 0.(8:7621), 0.(16:c26b)
where the three characters 0.( begin the sequence.
Comments? Improvements?
SDD I did a little interpreter where non-base 10
On 24 Aug, 14:05, Mel mwil...@the-wire.com wrote:
James Harris wrote:
On 24 Aug, 02:19, Max Erickson maxerick...@gmail.com wrote:
[ ... ]
int('100', 3)
9
int('100', 36)
1296
This is fine typed into the language directly but couldn't be entered
by the user or read-in from or
On Mon, 24 Aug 2009 16:23:06 -0700, James Harris wrote:
Sure but while I wouldn't normally want to type something as obscure as
32rst into a file of data I might want to type 0xff00 or similar. That
is far clearer than 65280 in some cases.
My point was that int('ff00', 16) is OK for the
On Aug 24, 7:25 pm, Steven D'Aprano st...@remove-this-
cybersource.com.au wrote:
On Mon, 24 Aug 2009 16:23:06 -0700, James Harris wrote:
Sure but while I wouldn't normally want to type something as obscure as
32rst into a file of data I might want to type 0xff00 or similar. That
is far
On Aug 24, 8:21�pm, Mel mwil...@the-wire.com wrote:
Mensanator wrote:
[ ... ]
If you want your data file to have values entered in hex, or oct, or even
unary (1=one, 11=two, 111=three, =four...) you can.
Unary? I think you'll find that Standard Positional Number
Systems are not
On Sat, 22 Aug 2009 14:54:41 -0700 (PDT), James Harris wrote:
They look good - which is important. The trouble (for me) is that I
want the notation for a new programming language and already use these
characters. I have underscore as an optional separator for groups of
digits - 123000 and
In comp.lang.python James Harris james.harri...@googlemail.com wrote:
On 22 Aug, 10:27, David 71da...@libero.it wrote:
...
What about 2_1011, 8_7621, 16_c26h or 2;1011, 8;7621, 16;c26h ?
They look good - which is important. The trouble (for me) is that I
want the notation for a new
garabik-news-2005...@kassiopeia.juls.savba.sk writes:
Why not just use the space? 123 000 looks better than 123_000, and is
not syntactically ambiguous (at least in python). And as it already
works for string literals, it could be applied to numbers, too…
+1 to all this. I think this
I had an objection to using spaces in numeric literals last time around
and it still stands, and it still stands in the new one.
What happens if you use a literal like 0x10f 304? Is 304 treated as
decimal or hexadecimal? It's not clear how you would begin to combine
it The way string
garabik-news-2005...@kassiopeia.juls.savba.sk wrote in message
news:h6r4fb$18...@aioe.org...
In comp.lang.python James Harris james.harri...@googlemail.com wrote:
On 22 Aug, 10:27, David 71da...@libero.it wrote:
...
What about 2_1011, 8_7621, 16_c26h or 2;1011, 8;7621, 16;c26h ?
They
On 23 Aug, 04:38, c...@tiac.net (Richard Harter) wrote:
On Sat, 22 Aug 2009 14:54:41 -0700 (PDT), James Harris
james.harri...@googlemail.com wrote:
On 22 Aug, 10:27, David 71da...@libero.it wrote:
... (snipped a discussion on languages and other systems interpreting
numbers with a
On 23 Aug, 00:16, Mel mwil...@the-wire.com wrote:
James Harris wrote:
I have no idea why Ada which uses the # also apparently uses it to end
a number
2#1011#, 8#7621#, 16#c26b#
Interesting. They do it because of this example from
On 23 Aug, 21:55, James Harris james.harri...@googlemail.com wrote:
...
However for floating point you
need at least three letters because a floating point number has
three parts: the fixed point point, the exponent base, and the
exponent. Now we can represent the radices of the
James Harris wrote:
On 23 Aug, 00:16, Mel mwil...@the-wire.com wrote:
James Harris wrote:
I have no idea why Ada which uses the # also apparently uses it to end
a number
2#1011#, 8#7621#, 16#c26b#
Interesting. They do it because of this example from
James Harris wrote:...
Another option:
0.(2:1011), 0.(8:7621), 0.(16:c26b)
where the three characters 0.( begin the sequence.
Comments? Improvements?
I did a little interpreter where non-base 10 numbers
(up to base 36) were:
.7.100 == 64 (octal)
.9.100 == 100 (decimal)
Scott David Daniels scott.dani...@acm.org wrote in message
news:kn2dnszr5b0bwazxnz2dnuvz_s-dn...@pdx.net...
James Harris wrote:...
Another option:
0.(2:1011), 0.(8:7621), 0.(16:c26b)
where the three characters 0.( begin the sequence.
Comments? Improvements?
I did a little interpreter
bartc ba...@freeuk.com wrote:
Scott David Daniels scott.dani...@acm.org wrote in message
news:kn2dnszr5b0bwazxnz2dnuvz_s-dn...@pdx.net...
James Harris wrote:...
Another option:
It can be assumed however that .9. isn't in binary?
That's a neat idea. But an even simpler scheme might
J. Cliff Dyer wrote:
What happens if you use a literal like 0x10f 304?
To me the obvious thing to do is concatenate them
textually and then treat the whole thing as a single
numeric literal. Anything else wouldn't be sane, IMO.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
Max Erickson maxerick...@gmail.com writes:
At some point, abandoning direct support for literals and just
having a function that can handle different bases starts to make a
lot of sense to me:
int('100', 8)
64
int('100', 10)
100
int('100', 16)
256
int('100', 2)
4
int('100', 3)
James Harris wrote:
I have no idea why Ada which uses the # also apparently uses it to end
a number
2#1011#, 8#7621#, 16#c26b#
Interesting. They do it because of this example from
http://archive.adaic.com/standards/83rat/html/ratl-02-01.html#2.1:
2#1#E8-- an integer
On Sat, 22 Aug 2009 14:54:41 -0700 (PDT), James Harris
james.harri...@googlemail.com wrote:
On 22 Aug, 10:27, David 71da...@libero.it wrote:
... (snipped a discussion on languages and other systems interpreting
numbers with a leading zero as octal)
Either hexadecimal should have been 0h or
51 matches
Mail list logo