Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.maple > #304
| From | acer <maple@rogers.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.maple |
| Subject | Re: number of digits in Maple |
| Date | 2012-01-09 20:43 -0800 |
| Organization | http://groups.google.com |
| Message-ID | <442d1095-e166-4f81-bf18-ee47cd8ee2a7@z1g2000vbx.googlegroups.com> (permalink) |
| References | <6007336.1918.1326061067180.JavaMail.geo-discussion-forums@vbw20> |
On Jan 8, 5:17 pm, pluton <plutones...@gmail.com> wrote:
> Hi,
>
> If I understood well current computer can numerically handle 16 digits in floating points numbers. In Maple, the number of Digits can be controlled with th command Digits but looks like there is no difference between Numerical and Symbolic calculations. If I use kernelopts(maxdigits); my computer says 268435448 and I understand that Maple will use this number of digits for symbolic calculations but what about numerical calculations ?
>
> Thank you
As others have explained, by itself "floating point" does not
necessarily mean 64bit double precision hardware floating-point. Maple
can do software floating-point computation, at Digits working
precision. The GnuMP library is used for some parts of software
floating-point computations. (See http://gmplib.org/ for more on
that.)
So, perhaps you are wondering whether Maple will always do numeric
computations only using software floating-point. The answer, in large
part, is no. Quite often it will use hardware double floating-point,
if Digits<=15, for numeric problems where the input is all numeric and
wholly (or sometimes partially) floating-point. Here below are some
places where that is the case,
compiled C (various dynamic libs in Maple's bin.xxxx folders):
- sin, exp, sinh, etc, only where necessary to attain accuracy not
always available by OS runtime
- LinearAlgebra (also including modular LA)
- Statistics
- Optimization (LP, QP, LS, entirely double precision)
- dsolve/numeric
- pdsolve/numeric
- DiscreteTransforms
- CurveFitting
- etc, that I forget
alternative interpreter that is double precision, named evalhf:
- evalhf'able procedures run wrapped with evalhf()
compiled procedures, using `Compiler` routine:
- behind the scenes this takes a maple language user-written proc,
generates C source,
compiles it, links it into a dynamic lib, dlsym opens that
function in that dy-lib,
and provides an entry point that looks acts just like the original
user-written proc.
floating-point arithmetic, etc, inside regular proc's which have
`option hfloat`
arithmetic and special functions of scalar floating-point numbers,
whether that happen to be
scalar HFloat or scalar SFloat (latter requires intermediate
conversion).
Now, someone else here mentioned `plot`. What the plotting routines do
is (if Digits<=15) attempt to
run the procedure, or evaluate the expressions, under the above-
mentioned evalhf double-precision
alternative interpreter. If for some reason that fails (the evalhf
interpreter is more limited in the
scope of its functionality) then the plotting routines fall back to
software floating-point.
The reason for all of this, of course, is primarily the speed benefit.
Careful timings can reveal quite
a step increase in computation time, as these kinds of computation go
over the Digits=15 threshhold.
Also, software floats are stored as DAGs and memory managed, while
most of the above double-
precision operations do not require that (HFloats being an exception).
So additional memory management
is another cost that begins to accrue, with higher software floating-
point. It's an interesting question:
whether it would be worthwhile to replicate some of the double-
precision functionality listed above using
an efficient compiled quadruple-precision scheme, so as to mitigate
the penalty of the sharp rise in timing
as the Digits setting increased above 15 in value.
Hope that helps,
acer
Back to comp.soft-sys.math.maple | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
number of digits in Maple pluton <plutonesque@gmail.com> - 2012-01-08 14:17 -0800
Re: number of digits in Maple "Thomas D. Dean" <tomdean@speakeasy.org> - 2012-01-08 21:01 -0800
Re: number of digits in Maple "G. A. Edgar" <edgar@math.ohio-state.edu.invalid> - 2012-01-09 07:00 -0700
Re: number of digits in Maple pluton <plutonesque@gmail.com> - 2012-01-09 07:31 -0800
Re: number of digits in Maple "Thomas D. Dean" <tomdean@speakeasy.org> - 2012-01-09 08:32 -0800
Re: number of digits in Maple pluton <plutonesque@gmail.com> - 2012-01-09 12:30 -0800
Re: number of digits in Maple Axel Vogt <&noreply@axelvogt.de> - 2012-01-09 22:44 +0100
Re: number of digits in Maple acer <maple@rogers.com> - 2012-01-09 20:43 -0800
Re: number of digits in Maple pluton <plutonesque@gmail.com> - 2012-01-16 20:45 -0800
csiph-web