Skip to content

Commit

Permalink
Adds instance Dividable Integer CReal
Browse files Browse the repository at this point in the history
  • Loading branch information
Izaakwltn authored and stylewarning committed Oct 16, 2024
1 parent 60d3e81 commit 80ad3cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions library/computable-reals/computable-reals.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ This threshold is used to ensure `Eq` and `Ord` instances terminate. (In general
(lisp Creal (n)
(cr:/r n)))))

(coalton-toplevel

(define-instance (Dividable Integer CReal)
(define (general/ a b)
(/ (fromint a) (fromint b)))))

(coalton-toplevel

(define-instance (math:Exponentiable Creal)
Expand Down

0 comments on commit 80ad3cc

Please sign in to comment.