On Thu, May 10, 2012 at 08:55:06AM -0400, Ray Racine wrote:
> It was late... but the penny dropped this morning. Consider the domain of
> log (x) for x<0.
Where log a multivalued function, and none of the values are real.
Acually, the logarithm function complex numbers is multivalued even
when
It was late... but the penny dropped this morning. Consider the domain of
log (x) for x<0.
On Thu, May 10, 2012 at 8:38 AM, Vincent St-Amour wrote:
> As Neil said, `fllog' is guaranteed to return floats.
>
> If you want to know for which input types `log' has a return type of
> `Float', you can
As Neil said, `fllog' is guaranteed to return floats.
If you want to know for which input types `log' has a return type of
`Float', you can use `:query-result-type' at the TR REPL.
-> (:query-result-type log Float)
(case-> (Nonnegative-Flonum -> Float) (Float-Zero -> Negative-Float))
If
I (require racket/flonum) and use `fllog'.
Neil ⊥
On 05/09/2012 09:52 PM, Ray Racine wrote:
The Typed Racket Performance button in DrRacket informs me that (log v)
returns a Complex type, despite all its arguments being reals and that
if I do not want or expect a complex number as results, I ma
The Typed Racket Performance button in DrRacket informs me that (log v)
returns a Complex type, despite all its arguments being reals and that if I
do not want or expect a complex number as results, I mam restrict the type
of the arguments. How does one do that?
#lang typed/racket/base
(: real-l
5 matches
Mail list logo