## 12960 Reputation

8 years, 363 days

## evalf[d] and Digits...

Maple

A fact that seems to be not documented. Probably it should be obvious.

Digits := d0
evalf[d](expr);

The toplevel float sub-expressions in expr  are computed with Digits=d0 but in procedures Digits is set to d.
Notice that the actual float parameters of the toplevel procedures are evalf-ed with Digits=d0.

 > restart;
 > g:=proc() convert(1/3., string) end: h:=proc() 1/3. end:
 > Digits:=3; evalf[10]([   1/3. = h(),   convert(1/3.,string) = g(),     fsolve(3*x=1) = add([1/3]),   fsolve(x/3=1/9.) # 1/9. being at top level is evalf-ed with Digits=3 ])
 (1)
 >
 > k:=proc(x) convert(x,string) end:
 > kernelopts(floatPi);
 (2)
 > 4.+Pi;
 (3)
 > evalf(k(1/3.+Pi)); # floatPi seems to be ignored inside actual parameters
 (4)
 > evalf(k(4+evalf(Pi)));
 (5)
 > evalf(k(4+Pi)); # 4 not being float (or "infected" by a float) is not evalf-ed
 (6)
 >
 > ### (this is documented)
 > `evalf/h` := proc() 7.777 end:
 > evalf(h(1/3));
 (7)
 > evalf('h'(1/3));
 (8)
 >

(edited)

## Typesetting again...

Maple 2017
```restart;
unames();  # first call ok
unames();  # second call
```

Error, invalid input: Typeset:-Kernel expects an equation for keyword parameter numericformatting

Error, unexpected result from Typesetting

## RootOf, index=real...

Maple

RootOf has the option index=real[i]  for the i-th real root:

evalf([seq(RootOf(x*(x^2-1)*(x^2-4)+1/100, x, index=real[i]), i=1..5)]);
[-2.000416306, -0.9983310082, -0.002500019532, 1.001664362, 1.999582971]

This option does not seem to be documented. Why? Or, is it?

## Typesetting alias in rtables...

Maple 2017

alias in rtables does not work when typesetting=extended (default in Maple 2017)

 > restart;
 > alias(alpha=RootOf(z^3+z+1,z));
 (1)
 > L:=simplify([seq(alpha^k,k=0..5)]);
 (2)
 > V:=convert(L,Vector);
 (3)
 > interface(typesetting=standard);
 (4)
 > V;
 (5)
 >

## unames() in extended typesetting bug...

Maple 2017

unames()   produces an error  in extended typsetting mode (the default in Maple 2017)  after any output.

 > #interface(typesetting=standard);
 > restart;
 > interface(typesetting=extended);
 (1)
 > unames();
 >
 First 6 7 8 9 10 11 12 Page 8 of 12
﻿