Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PARI/gp
#11
(11/21/2017, 03:05 PM)Gottfried Wrote:
(11/21/2017, 01:31 PM)Xorter Wrote: I got the following error message:

  ***   at top-level: subst(exp(1/x),x,1/1000)

  ***                       ^------------------
  *** exp: domain error in exp: valuation < 0

My question is that how can we solve this problem?

Perhaps it is meaningful for you to replace 1/x by exp(-u) where u=log(x) ? At least this gives a power series (more precisiely a puisieux-series)

I tried your advice but without success:

(15:42) gp > subst(f(x),x,1/1000)
  ***   at top-level: subst(f(x),x,1/1000)
  ***                       ^--------------
  ***   in function f: exp(exp(-u(x)))
  ***                           ^------
  ***   in function u: log(x)
  ***                  ^------
  *** log: domain error in log: series valuation != 0

It looked like a simple problem, but I have not be able to solve it.
Any idea?
Xorter Unizo
Reply
#12
(11/21/2017, 03:50 PM)Xorter Wrote:
(11/21/2017, 03:05 PM)Gottfried Wrote:
(11/21/2017, 01:31 PM)Xorter Wrote: I got the following error message:

  ***   at top-level: subst(exp(1/x),x,1/1000)

  ***                       ^------------------
  *** exp: domain error in exp: valuation < 0

My question is that how can we solve this problem?

Perhaps it is meaningful for you to replace 1/x by exp(-u) where u=log(x) ? At least this gives a power series (more precisiely a puisieux-series)

I tried your advice but without success:

(15:42) gp > subst(f(x),x,1/1000)
  ***   at top-level: subst(f(x),x,1/1000)
  ***                       ^--------------
  ***   in function f: exp(exp(-u(x)))
  ***                           ^------
  ***   in function u: log(x)
  ***                  ^------
  *** log: domain error in log: series valuation != 0

It looked like a simple problem, but I have not be able to solve it.
Any idea?

This should go like                    

subst ( Pol(exp(exp(u)),u) ,   u,    log(1/1000) )       

or   

subst ( Pol(exp(exp(-u)),u) ,   u,   log(1000) )       

Because $exp(x)$ gives series and not a polynomial, to make the "subst" working, you need to convert the series into a polynomial ("Pol(exp(x))" or "Pol(exp(u),u)" first.
However, "substituting" in a polynomial is not a very good idea, especially if the value to be substituted makes the functional value large.             
Converting the exp()-function into a polynomial and then substituting such a large value does not give a near estimate for the true exp(1000) which is what I think your initial subst should  give.  (I hope I got your initial formula correct)
Gottfried Helms, Kassel
Reply
#13
Aha, yes! It works... Thank you very much!
Xorter Unizo
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Pari-TTY - update Gottfried 0 1,404 10/13/2007, 04:02 PM
Last Post: Gottfried



Users browsing this thread: 1 Guest(s)