Extended Plugin 3.1 adds the functions ShiftLeft and ShiftRight which
do binary shifting of ExtIntegers. This provides rapid multiplication
or division of an ExtInteger by an integer power of two.
These new functions allowed me to write a REALbasic program, SelfRef,
which also generates the plot found at:
http://mathworld.wolfram.com/TuppersSelf-ReferentialFormula.html
The amazing Tupper's Self-Referential Formula gives a set of points
(x,y) whose plot is a picture of the formula itself in standard
mathematical form. A crucial variable in the formula is a 543 digit
integer, n. My program allows you to experiment with other values of
n.
If you just want the final program (Universal for Macs), download it with:
http://homepage.mac.com/delaneyrm/SelfRef.zip
The download for Extended Plugin (URL below) also contains the RB
project for SelfRef. You can generate Universal, PowerPC, and Windows
versions of SelfRef with my project. It's not polished; after
updating my plugin I wrote the project in an hour or so. In it you
will see how the (x,y) data points are used with the formula for
giving the plot.
For those new to Extended Plugin:
Extended Plugin for REALbasic 5 and later adds five new data types. They are:
ExtInteger
ExtFloat
ExtComplex
IAExtFloat
ExtFraction
ExtInteger is the type ZZ of Victor Shoup's multi-precision library,
NTL. Except for available memory, there is no limitation on the size
of an ExtInteger. So you can multiply a 100 digit integer by another
100 digit integer giving the exact 200 digit integer.
ExtFloat is the type RR of NTL. You can set both the bit precision
and the decimal output precision for ExtFloat, with no limitation
except for available memory. It might take awhile, but you can now
calculate pi in a REALbasic program to a million decimal places, or
more. The power of 10 for ExtFloat can range from about -60,000,000
to +60,000,000 as compared to -308 to +308 for a Double.
ExtComplex doesn't exist in NTL. I made it from two ExtFloats. So the
real and imaginary parts of an ExtComplex use the bit precision and
the decimal output precision set for ExtFloat. So you can now use
complex numbers with almost unlimited precision.
IAExtFloat also doesn't exist in Victor Shoup's NTL. It is a data
type which is used for Interval Arithmetic, which is arithmetic with
inequalities. An IAExtFloat number is represented by two ExtFloat
numbers (a, b), where one thinks of an ExtFloat number x being in the
interval between a and b. That is: a <= x <= b. For a function of x
calculated with interval arithmetic the result is an IAExtFloat whose
interval (fa, fb) results from interval propagation.
ExtFraction handles a fraction as num/den, where num and den are
ExtIntegers. Thus one can do exact calculations with rationals in
REALbasic to an almost unlimited degree.
Extended Plugin itself allows you to construct programs which can
handle the five new data types much like doubles and integers are
handled. To a large extent the seven data types can be freely used
with the +, -, *, and / operators, except that IAExtFloat does not
mix with ExtComplex, and ExtFractions can mix only with Integers and
ExtIntegers. And most of REALbasic's functions have been overloaded
to take the five new data types, where it makes sense to do so.
Freeware.
Download page:
http://homepage.mac.com/delaneyrm/ExtendedPlugin.html
Bob
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>