Opened 12 years ago

# add a function for the derivative of ceil and floor

Reported by: Owned by: burcin burcin major sage-6.8 symbolics sd35.5 ktkohl, rws, kcrisman, pelegm Karen Kohl N/A u/ktkohl/add_a_function_for_the_derivative_of_ceil_and_floor 8013b9f89b3670847007f6d3560252035a899638

### Description

We should define a new symbolic function for the derivative of `ceil` or `floor`.

In Maple:

```> diff(floor(x),x);
floor(1, x)
> diff(floor(x),x,x);
floor(1, x)
> diff(ceil(x),x,x);
floor(1, x)
> eval(diff(ceil(x),x,x),x=1.5);
0
> eval(diff(ceil(x),x,x),x=0);
Error, (in floor) floor is not differentiable at integers
```

### comment:2 Changed 9 years ago by jdemeyer

• Milestone changed from sage-5.11 to sage-5.12

### comment:3 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.1 to sage-6.2

### comment:4 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.2 to sage-6.3

### comment:5 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.3 to sage-6.4

### comment:6 Changed 7 years ago by ktkohl

• Authors set to ktkohl

### comment:8 Changed 7 years ago by ktkohl

• Commit set to 8013b9f89b3670847007f6d3560252035a899638

These give the right answer but also a runtime error:

```sage: floor(x).derivative().subs(x=1.5)
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in 'sage.structure.parent.good_as_coerce_domain' ignored
0
sage: ceil(x).derivative().subs(x=1.5)
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in 'sage.structure.parent.good_as_coerce_domain' ignored
0
```

New commits:

 ​8013b9f `Added ceiling and floor functions to allow 2nd argument for derivative.`

### comment:9 Changed 7 years ago by ktkohl

• Authors changed from ktkohl to Karen Kohl