On Fri, Feb 14, 2014 at 10:51 AM, Vincent St-Amour wrote:
>
>> And while I've got your attention...
>>
>> When I tried the same thing with a smaller limit, e.g.
>>
>> > (for/sum: : Flonum [[ii : Index 8]]
>> > pi)
>>
>> I got not only the aforementioned complaint about Zero but also a
>> complain
At Thu, 13 Feb 2014 19:08:16 -0500,
Stephen Bloch wrote:
>
> Aha. You don't want to initialize to something inexact, because then
> the sum of a bunch of exact things would be contaminated with
> inexactness. And the only exact zero you've got isn't a Flonum.
Exactly.
> I suppose one could inv
And while I've got your attention...
When I tried the same thing with a smaller limit, e.g.
> (for/sum: : Flonum [[ii : Index 8]]
> pi)
I got not only the aforementioned complaint about Zero but also a complaint
that it expected Index, but got Byte (presumably it decided 8 was small enough
to
At Thu, 13 Feb 2014 16:22:35 -0500,
Bloch Stephen wrote:
>
> [1 ]
> [1.1 ]
> [1.1.1 ]
>
> On Feb 13, 2014, at 2:51 PM, Sam Tobin-Hochstadt wrote:
>
> >> (for/sum: : Flonum [[ii : Index 300]]
> >> pi)
> >>
> >> and I get the type error "Expected Flonum, but got Zero". Where is there a
> >>
On Feb 13, 2014, at 2:56 PM, Vincent St-Amour wrote:
> At Thu, 13 Feb 2014 14:45:08 -0500,
> Bloch Stephen wrote:
>> Don't tell me the Zero I'm running into is the initial value of
>> for/sum's hidden accumulator
>
> Yes, that's where the Zero comes from.
>
>> And even if there were a zero,
On Feb 13, 2014, at 2:51 PM, Sam Tobin-Hochstadt wrote:
>> (for/sum: : Flonum [[ii : Index 300]]
>> pi)
>>
>> and I get the type error "Expected Flonum, but got Zero". Where is there a
>> zero anywhere in this code? And even if there were a zero, shouldn't Zero
>> be a subtype of Flonum?
>>
At Thu, 13 Feb 2014 14:45:08 -0500,
Bloch Stephen wrote:
> Don't tell me the Zero I'm running into is the initial value of
> for/sum's hidden accumulator
Yes, that's where the Zero comes from.
> And even if there were a zero, shouldn't Zero be a subtype of Flonum?
Zero is the type of the exa
On Thu, Feb 13, 2014 at 2:45 PM, Bloch Stephen wrote:
> I've removed a lot of possibly-irrelevant stuff and boiled my current
> obstacle down to the following:
>
> In #lang racket, the following works fine:
>
> (for/sum [[ii 300]]
> pi)
>
>
>
> In #lang typed/racket, I try to do the same thing:
I've removed a lot of possibly-irrelevant stuff and boiled my current obstacle
down to the following:
In #lang racket, the following works fine:
(for/sum [[ii 300]]
pi)
In #lang typed/racket, I try to do the same thing:
(for/sum: : Flonum [[ii : Index 300]]
pi)
and I get the type error
9 matches
Mail list logo