The simplifier for plog references the specvar `var` and it's
important to do the binding here in the call to `keyhole` in `ztorat`.
I guess the intent is to prevent the simplifier from converting
plog(-x) to log(x)+%i*%pi when x > 0, as happens in `ztorat`.
In `ztorat`, we multiply the numerator by plog(-x). In doing so, we
end up calling the plog simplifier that references `var`:
```
((among var x) ;This is used in DEFINT. 1/19/81. -JIM
(return (give-up))))
```
Thus, we need to bind `var` before calling the simplifier for plog.
This is important. Without this, we get failures in the testsuite.
With this, there's no problem.
The function `polyp` references the special var `var` so we add a
replacement `polyp-var` that takes an extra arg, `ivar`, and binds
`var` to it before calling `res`. This is a workaround until we fix
`polyp` to make the dependency explicit.
The function `res1` references the special var `var` so we add a
replacement `res1-var` that takes an extra arg, `ivar`, and binds
`var` to it before calling `res`. This is a workaround until we fix
`res1` to make the dependency explicit.
The function `deg` references the special var `var` so we add a
replacement `deg-var` that takes an extra arg, `ivar`, and binds
`var` to it before calling `deg`. This is a workaround until we fix
`deg` to make the dependency explicit.
Update all uses of `deg`. This requires passing in `ivar` in
`difapply` and `diffhk`. Update all callers appropriately.