Menu

#4316 difapply mostly untested in testsuite

None
open
nobody
integrate (144)
5
2024-07-10
2024-06-20
Raymond Toy
No

I modified difapply to insert a break after the first cond
clause, just before $noprincipal is set. When running the
testsuite, the break is never reached.

We should add some tests for the other cases in difapply.

Discussion

  • Raymond Toy

    Raymond Toy - 2024-06-20

    difapply is called from mtorat and ztorat which is called from ztoinf. This functions sets the variable s to (deg-var d ivar) which is eventually passed to difapply. The first test in difapply is:

         (cond ((eq ($asksign (m+ (deg-var d ivar) (m- s) (m- 2.)))  '$neg)
            (return nil)))
    

    Since s is (deg-var d ivar), the arg to $asksign is basically s-s-2 or -2. Thus we always exit difapply here and never execute the rest of the function.

    Am I missing something? Is there some other way to get past this first clause?

     
  • Raymond Toy

    Raymond Toy - 2024-06-20

    Note also that difapply is only called when *dflag* is NIL. This is normally the case because *dflag* is only set to T in diffhk, which is only called by difapply at the very end, which we never reach. dintegrate always binds *dflag* to NIL.

     
  • Robert Dodier

    Robert Dodier - 2024-07-10
    • labels: --> integrate
     

Log in to post a comment.