acer

32348 Reputation

29 Badges

19 years, 330 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

Rerunning the whole sheet, which begins with a "restart", might not illustrate the problem. I suspect that in order to see the problem one would have to execute the whole sheet, and then repeat only the command that appears (3 times) right at the bottom. I interpreted it as that repeated execution of that particular command leads to the memory usage increase.

acer

Rerunning the whole sheet, which begins with a "restart", might not illustrate the problem. I suspect that in order to see the problem one would have to execute the whole sheet, and then repeat only the command that appears (3 times) right at the bottom. I interpreted it as that repeated execution of that particular command leads to the memory usage increase.

acer

Yes, that's what the example is supposed to illustrate.

I named the new unit the "roung", and placed it in a new units system ChrisSI which is a modification of the usual SI system. It has an abbreviation of rg. One roung equals one [[m/s^2]]. That new system should work under Units:-Standard with the roung as the default output for the dimension mass/length^2.  And the new units symbol rg accepts SI style prefixes, so that 1000*Unit(roung)=1*krg = 1000*Unit(m/s^2).

acer

Yes, that's what the example is supposed to illustrate.

I named the new unit the "roung", and placed it in a new units system ChrisSI which is a modification of the usual SI system. It has an abbreviation of rg. One roung equals one [[m/s^2]]. That new system should work under Units:-Standard with the roung as the default output for the dimension mass/length^2.  And the new units symbol rg accepts SI style prefixes, so that 1000*Unit(roung)=1*krg = 1000*Unit(m/s^2).

acer

> restart:

> Units:-AddSystem(WayneFPS,Units:-GetSystem(FPS),inch,inch^2,inch^3);

> with(Units[Standard]):

> Units[UseSystem]('FPS');
> 35*Unit(erg)/Unit(s^2);
                                          [  2   ]
                               78125000   [ft  lb]
                             ------------ [------]
                             940627457451 [   4  ]
                                          [  s   ]
 
> Units:-UseSystem(WayneFPS);
> 35*Unit(erg)/Unit(s^2);
                                          [  2   ]
                              1250000000  [in  lb]
                             ------------ [------]
                             104514161939 [   4  ]
                                          [  s   ]

acer

> restart:

> Units:-AddSystem(WayneFPS,Units:-GetSystem(FPS),inch,inch^2,inch^3);

> with(Units[Standard]):

> Units[UseSystem]('FPS');
> 35*Unit(erg)/Unit(s^2);
                                          [  2   ]
                               78125000   [ft  lb]
                             ------------ [------]
                             940627457451 [   4  ]
                                          [  s   ]
 
> Units:-UseSystem(WayneFPS);
> 35*Unit(erg)/Unit(s^2);
                                          [  2   ]
                              1250000000  [in  lb]
                             ------------ [------]
                             104514161939 [   4  ]
                                          [  s   ]

acer

I believe that "minus signs" was a reference to the original poster's problem when solving for m, of the -M term being at the fore of the sum.

And in case anyone is interested, according to the session history, the same type of issue might occur when using `isolate`.

> restart:
> -M+a^3/P^2:
> eq:=(m+M)=a^3/P^2:
> isolate( eq, m );
                                            3
                                           a
                                 m = -M + ----
                                            2
                                           P

> restart:
> eq:=(m+M)=a^3/P^2:
> isolate( eq, m );
                                       3
                                      a
                                 m = ---- - M
                                       2
                                      P

acer

I believe that "minus signs" was a reference to the original poster's problem when solving for m, of the -M term being at the fore of the sum.

And in case anyone is interested, according to the session history, the same type of issue might occur when using `isolate`.

> restart:
> -M+a^3/P^2:
> eq:=(m+M)=a^3/P^2:
> isolate( eq, m );
                                            3
                                           a
                                 m = -M + ----
                                            2
                                           P

> restart:
> eq:=(m+M)=a^3/P^2:
> isolate( eq, m );
                                       3
                                      a
                                 m = ---- - M
                                       2
                                      P

acer

Thanks. I am not seeing any memory use increase yet, after about 50 repeats of the final command in the worksheet. It sits at about 12MB as reported by the Maple GUI and about 22MB as reported by my OS's `top` utility. I am using 32bit Linux, though. Maybe others may confirm the behaviour on WinXP.

acer

Thanks. I am not seeing any memory use increase yet, after about 50 repeats of the final command in the worksheet. It sits at about 12MB as reported by the Maple GUI and about 22MB as reported by my OS's `top` utility. I am using 32bit Linux, though. Maybe others may confirm the behaviour on WinXP.

acer

    |\^/|     Maple V Release 5
._|\|   |/|_. Copyright (c) 1981-1997 by Waterloo Maple Inc. All rights
 \  MAPLE  /  reserved. Maple and Maple V are registered trademarks of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> `&*`:=1:
Error, attempting to assign to `&*` which is protected


    |\^/|     Maple 6 (SUN SPARC SOLARIS)
._|\|   |/|_. Copyright (c) 2000 by Waterloo Maple Inc.
 \  MAPLE  /  All rights reserved. Maple is a registered trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> `&*`:=1:
> f:=(a,b)-> a &* b:
> evalf(f(2,2));
                                      1.
 
> evalhf(f(2,2));
Error, unable to evaluate function `f` in evalhf


    |\^/|     Maple 8 (SUN SPARC SOLARIS)
._|\|   |/|_. Copyright (c) 2002 by Waterloo Maple Inc.
 \  MAPLE  /  All rights reserved. Maple is a registered trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> `&*`:=1:
> f:=(a,b)-> a &* b:
> evalhf(f(2,2));
Error, unable to evaluate function `f` in evalhf
> quit

    |\^/|     Maple 9 (SUN SPARC SOLARIS)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2003
 \  MAPLE  /  All rights reserved. Maple is a trademark of
 <____ ____>  Waterloo Maple Inc.
      |       Type ? for help.
> `&*`:=1:
> f:=(a,b)-> a &* b:
> evalhf(f(2,2));
                                      4.

acer

Does this happen because of evalhf?

> `&*`:=1:
> f:=(a,b)-> a &* b:
 
> evalf(f(2,2));
                                      1.
 
> evalhf(f(2,2));
                                      4.
 
> evalhf(f[1](2,2));
Error, unable to evaluate function `f[1]` in evalhf

The above shows that the assignment to `&*` is not respected under evalhf. But it is respected under evalf.

Also, the plotting routines attempt to use evalhf, and if that fails then they fall back to evalf. Hence when using f[1] fails under evalhf, the plotting routine falls back to using evalf to generate the plot values.

And, indeed, plot3d(evalf@f,0..1,0..1) seems to behave as expected.

I don't see it mentioned in any help-page that evalhf would use :-`*` for `&*`. Is there some obvious rationale to it?

acer

The tree which identify must search is enormous. By default it also searches for sums, and sums of powers (with coefficients), etc. The tree has to be heavily cut, or else it would take far too long. If you know that sums, etc, are not to be considered then those rules can be excluded. That's not an unreasonable demand, given the tree growth as the basis and digits increase. But even then, an exact quantity like 34459425/(3617Pi^8) has a large number (depending on the digits of input data) of other constants which are quite close to it. In order to pinpoint just that single desired value one might reasonably need to specifiy a large number of digits of input data, and increase the "multiplicative constant basis" by so many new terms that `identify` would take a prohibitively long time.

ps. Plouffe announced a new version of his inverter today, with 2.459e9 constants in it. For fun, I gave 0.0322515344331994891844220526885 = evalf[30](1/Pi^3) to his (current, or new?) inverter and it returned 1/Pi^3*ln(exp(1)) which is curiously delightful. I wasn't able to get it to resolve evalf[n](1/Pi^4) though.

acer

The tree which identify must search is enormous. By default it also searches for sums, and sums of powers (with coefficients), etc. The tree has to be heavily cut, or else it would take far too long. If you know that sums, etc, are not to be considered then those rules can be excluded. That's not an unreasonable demand, given the tree growth as the basis and digits increase. But even then, an exact quantity like 34459425/(3617Pi^8) has a large number (depending on the digits of input data) of other constants which are quite close to it. In order to pinpoint just that single desired value one might reasonably need to specifiy a large number of digits of input data, and increase the "multiplicative constant basis" by so many new terms that `identify` would take a prohibitively long time.

ps. Plouffe announced a new version of his inverter today, with 2.459e9 constants in it. For fun, I gave 0.0322515344331994891844220526885 = evalf[30](1/Pi^3) to his (current, or new?) inverter and it returned 1/Pi^3*ln(exp(1)) which is curiously delightful. I wasn't able to get it to resolve evalf[n](1/Pi^4) though.

acer

Your posts aren't very clear, with respect to the actual goal. Perhaps you might give representative examples, showing explicitly both the input and the expected output. I suggest more than just one example, to get greater coverage of expected functionality.

acer

First 531 532 533 534 535 536 537 Last Page 533 of 592