### Similar Threads:

1.Forth MP Code? Pi Day.

datajerk < XXXX@XXXXX.COM > writes Re: Forth MP Code? Pi Day.
> Hello Fellow Forth Programmers,
> I am looking for Forth code that does multiprecision math. I've
> written my own, but as a Forth novice I'd like to see what others have
> done.
Your example code leaves 393 on the stack.
FORTH> STORMER A MPPRINT CR 3.
141592653589793238462643383279502884197169399375105820974944592307816406286208
998628034825342117067982148086513282306647093844609550582231725359408128481117
450284102701938521105559644622948954930381964428810975665933446128475648233786
783165271201909145648566923460348610454326648213393607260249141273724587006606
315588174881520920962829254091715364367892590360011330530548820466521384146951
941511609433057270365759591953092186117381932611793105118548074462379962749567
351885752724891227938183011949129833673362440656643086021394946395224737190702
179860943702770539217176293176752384674818467669405132000568127145263560827785
771342757789609173637178721468440901224953430146549585371050792279689258923542
019956112129021960864034418159813629774771309960518707211349999998372978049951
059731732816096318595024459455346908302642522308253344685035261931188171010003
137838752886587533208381420617177669147303598253490428755468731159562863882353
787593751957781857780532171226806613001927876611195909216420198938
ok
[1]FORTH> .s
Data: 393 ---
System: ---
Float: --- ok
[1]FORTH>
> Below is an example I put together for Pi Day (yesterday, March 14).
> It computes 1000 digits of Pi. I know 1000 digits may seem trivial,
> however the target platform is a 1985 battery-power hand-held computer
> with a 20-bit address space. It takes almost an hour to compute Pi.
The above took no time, compared to the time to printing the result :-)
Look for "Forth Bignum" in Google. First hit was already OK here.
-marcel

2.PI day, and other days of the year.

Michel Olagnon wrote:
> Ian Bush wrote:
>> Hmmm. We can't do PI day, but we can do natural logarithm day !
> 2/7/1828 ?
I find the idea of pi day being 3/14 slightly strange, as it
depends in a complicated way on base 10 counting and the
unusual distribution of days on the calendar.
When I was an undergrad and had a class (AMa95) with especially
hard problem sets due monday morning I would sometimes cook
a pie for eating at pi O'clock, for those still awake and working
on the problems. I figured pi O'clock as pi hours after midnight,
which does depend on a 24 hour day, but otherwise doesn't depend
on a base 10 representation of either pi or the clock.
(It does depend on the base 12 representation behind the clock, though.)
The time comes out about 3:08:30, not 3:14:15 using the base 10
representation of pi and of hours, minutes, and seconds.
With a similar idea, I might define pi day as the day that includes
the time pi/12 of a year starting from 12:00:00 AM Jan 1st,
and e day is the day including e/12 from the start of the year.
Again the strange dependence on the base 12, but otherwise no
depending on the base of pi, or e, or the base used in counting days.
To find one that is independent of the base of representation, and of
arbitrary representations of the calendar, I suggest imaginary power
day: i**i, oops, (0,1.)**(0,1.) of the way through the year.
365*(0,1.)**(0,1.) is about 75.87604, leaving in the unnatural
counting of leap years vs. non-leap years. By my count it comes
out March 17th. On leap years, 366*(0,1.)**(0,1.) also seems
to come out on March 17th, though at a different time.
When I was in high school, before Fortran could evaluate
(0,1.)**(0,1.), and before I knew about the math related
to imaginary powers, I did it in PL/I. I was, then, very
surprised to see it come out real.
-- glen

3.Documetation and Forth in Aerospace ( Day 30 coding in Forth

m-coughlin wrote:
> While attending an astrophysics colloquium on gamma ray
> bursts last year, John Doty's name leaped out at me when the
> speaker listed all his collaborators.
Yikes! Sounds dangerous! I'll have to warn folks to keep it on a leash ;-)
>
> What use has been made with Forth in the development of
> spacecraft at MIT lately or anywhere else?
Very little in my area. The Chandra SIM has a motor controller
programmed in Forth, but that didn't help Forth's declining image at
all. It failed in the first integrated systems test, and it turned out
that the contractor done no revision or configuration control, so they
neither knew which version of the code should have been in the ROM, nor
did they know what was actually in the ROM. Idiots.
I'm developing a test setup for the next generation of x-ray CCD
detectors here in Colorado: once I deliver it to MIT there will be a few
users of my LSE64 dialect there (whether they like it or not :-).
> Has any Forth code
> for these systems been published that follows the previously
> recommended good commenting practice? I think code is easier to
> read when the comments and code are interspersed and I would
> like to see a counter example.
Not that I know of.
-jpd

4.team programming (was: Day 30 coding in Forth)

5.Day 31 coding in Forth (getting long)

6. Day 30 coding in Forth

7. Day 30 coding in Forth (getting a bit OT)

8. Gforth version numbering (was: Day 30 coding in Forth)