Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1321 erf(-inf)

closed
Barton Willis
5
2008-01-10
2007-12-29
Barton Willis
No

OK

(%i3) erf(inf);
(%o3) 1

Not OK

(%i4) erf(-inf);
(%o4) -erf(inf)

(%i5) ev(%);
(%o5) -1

Also

(%i1) tellsimpafter(erf(z), 42/100);
(%o1) [erfrule1,simperf]

Not OK

(%i2) erf(-z);
(%o2) -erf(z)

(%i3) ev(%);
(%o3) -21/50

Discussion

  • Barton Willis
    Barton Willis
    2007-12-29

    Logged In: YES
    user_id=895922
    Originator: YES

    Proposed fix (untested):

    (defmfun simperf (x vestigial z &aux y)
    (declare (ignore vestigial))
    (oneargcheck x)
    (setq y (simpcheck (cadr x) z))
    (cond ((zerop1 y) y)
    ((or (floatp y) (and $numer (integerp y))) (erf (float y)))
    ((eq y '$inf) 1)
    ((eq y '$minf) -1)
    ;;((and $trigsign (mminusp* y)) (neg (list '(%erf simp) (neg y))))
    ((and $trigsign (great (neg y) y)) (neg (take '(%erf) (neg y))))
    (t (eqtest (list '(%erf) y) x))))

    The user documentation doesn't say that trigsign == false prevents erf
    from doing a reflection simplification.

     
  • Barton Willis
    Barton Willis
    2008-01-10

    Logged In: YES
    user_id=895922
    Originator: YES

    Fixed by csimp2 CVS version 1.19. Appended regression tests to rtest16.

     
  • Barton Willis
    Barton Willis
    2008-01-10

    • status: open --> closed