[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Nick Craig-Wood wrote:
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I'm using GMPY (see code).
[snip]
If you are using gmpy you might as well do it like this.
gmpy.pi() uses the Brent-Salamin Arithmetic-Geometric Mean formula
for
Nick Craig-Wood wrote:
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Nick Craig-Wood wrote:
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I'm using GMPY (see code).
[snip]
If you are using gmpy you might as well do it like this.
gmpy.pi() uses the Brent-Salamin
Tim Roberts wrote at 22:05 4/16/2005:
Dick Moores [EMAIL PROTECTED] wrote:
# Reading/writing Python source often gives me the impression of
# reading/writing a poem!
# Layout, indentation, rythm, I like the look and feel!
# What does this tiny program do? It is not a sonnet, even not a
#
M.E.Farmer wrote at 23:18 4/14/2005:
Using the GNU bc utility:
$ bc -l
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation,
Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
scale = 3000# number of output places
Dick Moores wrote:
M.E.Farmer wrote at 23:18 4/14/2005:
Using the GNU bc utility:
$ bc -l
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation,
Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
scale = 3000# number
On Sun, 17 Apr 2005 01:00:46 -0700, Dick Moores [EMAIL PROTECTED] wrote:
M.E.Farmer wrote at 23:18 4/14/2005:
Using the GNU bc utility:
$ bc -l
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation,
Inc.
This is free software with ABSOLUTELY NO WARRANTY.
Roel Schroeven wrote at 01:45 4/17/2005:
Dick Moores wrote:
M.E.Farmer wrote at 23:18 4/14/2005:
Using the GNU bc utility:
$ bc -l
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation,
Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type
Dick Moores [EMAIL PROTECTED] writes:
C:\cygwin\bin\bc -l pi12.txt
But how or when do you enter the lines
scale = 3000
obase = 12
print 4 * a(1)
You could put them into a file, say pi.bc. Then run
bc -l pi.bc
--
http://mail.python.org/mailman/listinfo/python-list
Bengt Richter wrote at 02:26 4/17/2005:
Could someone remind me how to get the output of bc -l into a text file
on Windows? (I've tried employing pi3003.txt in various ways) OR,
how to copy and paste from the command line window, or whatever that
window is called? (Sorry for the OT question.)
To
Paul Rubin wrote at 02:35 4/17/2005:
Dick Moores [EMAIL PROTECTED] writes:
C:\cygwin\bin\bc -l pi12.txt
But how or when do you enter the lines
scale = 3000
obase = 12
print 4 * a(1)
You could put them into a file, say pi.bc. Then run
bc -l pi.bc
OK, now that I've got Textpad trained to
PS. Redirecting with from a script whose interpreter was started by
windows extension association
doesn't work on some version of windows. To be safe, invoke the
interpreter explicitly, e.g.,
python myscript.py [whatever args here] pi3003.txt
Thanks very much for this.
What kind of args
Dick Moores [EMAIL PROTECTED] wrote:
# Reading/writing Python source often gives me the impression of
# reading/writing a poem!
# Layout, indentation, rythm, I like the look and feel!
# What does this tiny program do? It is not a sonnet, even not a
# pi-sonnet, but it surely produces Pi!
It
Dick Moores [EMAIL PROTECTED] wrote:
M.E.Farmer wrote at 23:18 4/14/2005:
Nice collection of unix tools, Cygwin not needed.
http://unxutils.sourceforge.net/
Thank you!
But a question. I've download both UnxUtils.zip and UnxUpdates.zip. I'm
planning to put the contents of UnxUtils.zip in a
Dick Moores wrote:
Paul Rubin wrote at 18:20 4/13/2005:
Dick Moores [EMAIL PROTECTED] writes:
I need to figure out how to compute pi to base 12, to as many
digits
as possible. I found this reference,
http://mathworld.wolfram.com/Base.html, but I really don't
understand it well
M.E.Farmer wrote at 23:18 4/14/2005:
Nice collection of unix tools, Cygwin not needed.
http://unxutils.sourceforge.net/
Thank you!
But a question. I've download both UnxUtils.zip and UnxUpdates.zip. I'm
planning to put the contents of UnxUtils.zip in a directory and then move
the contents of
Sounds good should work fine ;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
[Dan]
Now you've got me curious. Why would an artist want the first 3003
digits of pi to the base 12?
[Dick]
He says,
Do you know how I can get base12 pi?
Because the chromatic scale is base12.
c c# d d# e f f# g g# a a# b
He should read Douglas Adams' fictional essay Music and Fractal
He says,
Do you know how I can get base12 pi?
Because the chromatic scale is base12.
c c# d d# e f f# g g# a a# b
Dick
It might feel more natural to do this with 'e' (2.718...)
--greg
--
http://mail.python.org/mailman/listinfo/python-list
[Doug Schwarz]
The chromatic scale is based on one twelfth powers of two, i.e., if
the frequency of a note in the scale is f(n), then the frequency of
the next note is given by f(n+1) = f(n) * 2^(1/12)
This easy view of things has been known for a long time, but has only
been popular
[Bengt Richter]
It might also be interesting to keep a running sum of the base 12
values and use sum % 88 to select piano keys, to let it walk intervals
outside of a single octave ;-)
The generated would then run from the low octaves to high octaves
monotically, then start over again and
On 13 Apr 2005 19:05:01 -0700, Paul Rubin
http://phr.cx@nospam.invalid wrote:
Dick Moores [EMAIL PROTECTED] writes:
I don't believe GNU bc is available for Windows, is it?
I don't know. It probably works ok under Cygwin at least.
bc definitely works on cygwin, and is available at
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I'm using GMPY (see code).
[snip]
If you are using gmpy you might as well do it like this.
gmpy.pi() uses the Brent-Salamin Arithmetic-Geometric Mean formula for
pi IIRC. This converges quadratically, and it will calculate you a
million places
Steve Holden wrote at 22:29 4/13/2005:
Dick Moores wrote:
Steve Holden wrote at 19:12 4/13/2005:
Dick Moores wrote:
Dan wrote at 18:02 4/13/2005:
On Wed, 13 Apr 2005 03:27:06 -0700, Dick Moores [EMAIL PROTECTED]
wrote:
I'm just trying to help an artist acquaintance who needs (I just
learned) the
Dick Moores wrote at 18:40 4/14/2005:
Sorry about that. http://www.kenjikojima.com/
I just listened to Kojima's
NEW
Chorus Pi (Japanese) / 2:28
Chorus: MacinTalk Voices. The music was created from the constant PI.
on that page. The vocal is singing the digits of base-10 pi.
ten is . or decimal
I need to figure out how to compute pi to base 12, to as many digits as
possible. I found this reference,
http://mathworld.wolfram.com/Base.html, but I really don't understand
it well enough. Could someone show me how to do what I need?
Thanks,
Dick Moores
[EMAIL PROTECTED]
--
On Wed, 13 Apr 2005 02:06:11 -0700, Dick Moores [EMAIL PROTECTED] wrote:
I need to figure out how to compute pi to base 12, to as many digits as
possible. I found this reference,
http://mathworld.wolfram.com/Base.html, but I really don't understand
it well enough. Could someone show me how to
Bengt Richter wrote at 03:19 4/13/2005:
On Wed, 13 Apr 2005 02:06:11 -0700, Dick Moores [EMAIL PROTECTED] wrote:
I need to figure out how to compute pi to base 12, to as many digits as
possible. I found this reference,
http://mathworld.wolfram.com/Base.html, but I really don't understand
it well
# [EMAIL PROTECTED] / 2005-04-13 03:27:06 -0700:
Bengt Richter wrote at 03:19 4/13/2005:
This is not homework, nor am I a student, though I am trying to learn
Python. I'm just trying to help an artist acquaintance who needs (I just
learned) the first 3003 digits of pi to the base 12.
Dick Moores wrote:
I need to figure out how to compute pi to base 12, to as many digits
as
possible. I found this reference,
http://mathworld.wolfram.com/Base.html,
but I really don't understand it well enough.
How many stars are in *?
You probably answered 25. This
Dan Bishop wrote at 04:07 4/13/2005:
(3) A function for converting numbers to their base-12 representation.
For integers, this can be done with:
DIGITS = 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
def itoa(num, radix=10):
is_negative = False
if num 0:
is_negative = True
num = -num
In article [EMAIL PROTECTED],
Dan Bishop [EMAIL PROTECTED] wrote:
But there's no reason other than tradition why you should arrange them
into groups of 10.
Well, it is traditional for people to have 10 fingers :-)
Other fun things to think about are negative bases. For example, 3(10) =
Dick Moores wrote:
Dan Bishop wrote at 04:07 4/13/2005:
...
For a floating-point number x, the representation with d decimal
places count be found by taking the representation of int(round(x *
radix ** d)) and inserting a . d places from the right.
But I'm sorry, but I can't follow you. I do
Roy Smith wrote:
In article [EMAIL PROTECTED],
Dan Bishop [EMAIL PROTECTED] wrote:
But there's no reason other than tradition why you should arrange them
into groups of 10.
Well, it is traditional for people to have 10 fingers :-)
Other fun things to think about are negative bases. For
Scott David Daniels [EMAIL PROTECTED] wrote:
If you think those are fun, try base (1j - 1)
Get real. I can't imagine using anything so complex.
--
http://mail.python.org/mailman/listinfo/python-list
On 13 Apr 2005 12:06:26 -0400, Roy Smith [EMAIL PROTECTED] wrote:
Scott David Daniels [EMAIL PROTECTED] wrote:
If you think those are fun, try base (1j - 1)
Get real. I can't imagine using anything so complex.
+1 QOTW
--
Kristian
kristian.zoerhoff(AT)gmail.com
zoerhoff(AT)freeshell.org
Scott David Daniels wrote:
Roy Smith wrote:
In article [EMAIL PROTECTED],
Dan Bishop [EMAIL PROTECTED] wrote:
But there's no reason other than tradition why you should arrange
them
into groups of 10.
Well, it is traditional for people to have 10 fingers :-)
Other fun things to
On 2005-04-13, Dan Bishop [EMAIL PROTECTED] wrote:
Pi has an interesting representation in bases between 0 and 1,
exclusive. There are a finite number of digits after the radix point,
but an infinite number _before_ it.
You really oughtn't make me think so hard right after lunch.
--
Grant
On Wed, 13 Apr 2005 03:27:06 -0700, Dick Moores [EMAIL PROTECTED] wrote:
Bengt Richter wrote at 03:19 4/13/2005:
On Wed, 13 Apr 2005 02:06:11 -0700, Dick Moores [EMAIL PROTECTED] wrote:
I need to figure out how to compute pi to base 12, to as many digits as
possible. I found this reference,
Bengt Richter wrote at 14:52 4/13/2005:
import sys
def main():
k, a, b, a1, b1 = 2L, 4L, 1L, 12L, 4L
while 1:
p, q, k = k*k, 2L*k+1L, k+1L
a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1
d, d1 = a/b, a1/b1
while d == d1:
output(d)
a, a1 =
On 13 Apr 2005 12:06:26 -0400, [EMAIL PROTECTED] (Roy Smith) wrote:
Scott David Daniels [EMAIL PROTECTED] wrote:
If you think those are fun, try base (1j - 1)
Get real. I can't imagine using anything so complex.
Well said. :-)
Dan
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 13 Apr 2005 03:27:06 -0700, Dick Moores [EMAIL PROTECTED]
wrote:
I'm just trying to help an artist acquaintance who needs (I just
learned) the first 3003 digits of pi to the base 12.
Now you've got me curious. Why would an artist want the first 3003
digits of pi to the base 12?
Dan
Dan wrote at 18:02 4/13/2005:
On Wed, 13 Apr 2005 03:27:06 -0700, Dick Moores [EMAIL PROTECTED]
wrote:
I'm just trying to help an artist acquaintance who needs (I just
learned) the first 3003 digits of pi to the base 12.
Now you've got me curious. Why would an artist want the first 3003
digits
Dick Moores [EMAIL PROTECTED] writes:
I need to figure out how to compute pi to base 12, to as many digits
as possible. I found this reference,
http://mathworld.wolfram.com/Base.html, but I really don't
understand it well enough. Could someone show me how to do what I need?
Using the GNU bc
Hi All--
Dick Moores wrote:
Dan wrote at 18:02 4/13/2005:
On Wed, 13 Apr 2005 03:27:06 -0700, Dick Moores [EMAIL PROTECTED]
wrote:
I'm just trying to help an artist acquaintance who needs (I just
learned) the first 3003 digits of pi to the base 12.
Now you've got me curious. Why
Paul Rubin wrote at 18:20 4/13/2005:
Dick Moores [EMAIL PROTECTED] writes:
I need to figure out how to compute pi to base 12, to as many digits
as possible. I found this reference,
http://mathworld.wolfram.com/Base.html, but I really don't
understand it well enough. Could someone show me how
Dick Moores [EMAIL PROTECTED] writes:
I don't believe GNU bc is available for Windows, is it?
I don't know. It probably works ok under Cygwin at least.
--
http://mail.python.org/mailman/listinfo/python-list
Dick Moores wrote:
Dan wrote at 18:02 4/13/2005:
On Wed, 13 Apr 2005 03:27:06 -0700, Dick Moores [EMAIL PROTECTED]
wrote:
I'm just trying to help an artist acquaintance who needs (I just
learned) the first 3003 digits of pi to the base 12.
Now you've got me curious. Why would an artist want the
Dan wrote:
On 13 Apr 2005 12:06:26 -0400, [EMAIL PROTECTED] (Roy Smith) wrote:
Scott David Daniels [EMAIL PROTECTED] wrote:
If you think those are fun, try base (1j - 1)
Get real. I can't imagine using anything so complex.
Well said. :-)
Oh, no, now we're sunk
three-holes-in-the-ground-ly
In article [EMAIL PROTECTED],
Dick Moores [EMAIL PROTECTED] wrote:
Dan wrote at 18:02 4/13/2005:
On Wed, 13 Apr 2005 03:27:06 -0700, Dick Moores [EMAIL PROTECTED]
wrote:
I'm just trying to help an artist acquaintance who needs (I just
learned) the first 3003 digits of pi to the base
Doug Schwarz wrote at 20:14 4/13/2005:
In article [EMAIL PROTECTED],
Dick Moores [EMAIL PROTECTED] wrote:
Dan wrote at 18:02 4/13/2005:
On Wed, 13 Apr 2005 03:27:06 -0700, Dick Moores [EMAIL PROTECTED]
wrote:
I'm just trying to help an artist acquaintance who needs (I just
learned) the
On Thu, 14 Apr 2005 03:14:51 GMT, Doug Schwarz [EMAIL PROTECTED] wrote:
In article [EMAIL PROTECTED],
Dick Moores [EMAIL PROTECTED] wrote:
Dan wrote at 18:02 4/13/2005:
On Wed, 13 Apr 2005 03:27:06 -0700, Dick Moores [EMAIL PROTECTED]
wrote:
I'm just trying to help an artist
On Thu, 14 Apr 2005 11:05:17 +1000, John Machin [EMAIL PROTECTED] wrote:
On Wed, 13 Apr 2005 08:28:29 -0400, Roy Smith [EMAIL PROTECTED] wrote:
In article [EMAIL PROTECTED],
Dan Bishop [EMAIL PROTECTED] wrote:
But there's no reason other than tradition why you should arrange them
into groups
On 13 Apr 2005 18:20:06 -0700, Paul Rubin http://[EMAIL PROTECTED] wrote:
Dick Moores [EMAIL PROTECTED] writes:
I need to figure out how to compute pi to base 12, to as many digits
as possible. I found this reference,
http://mathworld.wolfram.com/Base.html, but I really don't
understand it
53 matches
Mail list logo