math icon indicating copy to clipboard operation
math copied to clipboard

Unfriendly error message from bfsqrt

Open soegaard opened this issue 5 years ago • 0 comments

If by accident bfsqrt is given a non-bigfloat the error message doesn't come from the Racket layer.

Welcome to Racket v7.6.
> (require math/bigfloat)
> (bfsqrt 2)
; mpfr->C: argument is not non-null `mpfr' pointer
;   argument: 2
; [,bt for context]
> (bfsqrt (bf 2))
(bf #e1.414213562373095048801688724209698078569)

soegaard avatar Mar 03 '20 18:03 soegaard