From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Representation clauses and side-efects on STM32F411 ravenscar runtime
Date: Sun, 2 Aug 2015 13:31:15 -0700
Date: 2015-08-02T13:31:15-07:00 [thread overview]
Message-ID: <mplujk$pah$1@dont-email.me> (raw)
In-Reply-To: <87io8xlb3p.fsf@theworld.com>
On 08/02/2015 12:54 PM, Bob Duff wrote:
> "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org> writes:
>
>> On 08/02/2015 01:59 AM, Frédéric Praca wrote:
>>>
>>> type Mantissa is range 0 .. 2**12 - 1 with Size => 12;
>>> type Fraction is range 0 .. 2**4 - 1 with Size => 4;
>
>> Wouldn't modular types be better for these?
>
> Why would you want wraparound arithmetic for these? Seems like it would
> just hide bugs.
I wouldn't think you'd do any arithmetic with these. A modular type makes it
clear you have an unsigned representation.
--
Jeff Carter
"Hold your temper. Count ten.... Now let 'er go.
You got a good aim."
Never Give a Sucker an Even Break
105
next prev parent reply other threads:[~2015-08-02 20:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-02 8:59 Representation clauses and side-efects on STM32F411 ravenscar runtime Frédéric Praca
2015-08-02 9:40 ` Simon Wright
2015-08-02 10:22 ` Simon Wright
2015-08-02 14:53 ` Frédéric Praca
2015-08-02 14:52 ` Frédéric Praca
2015-08-02 15:19 ` Simon Wright
2015-08-02 19:23 ` Jeffrey R. Carter
2015-08-02 19:54 ` Bob Duff
2015-08-02 20:01 ` Frédéric Praca
2015-08-02 20:13 ` Bob Duff
2015-08-02 20:27 ` Frédéric Praca
2015-08-02 20:31 ` Jeffrey R. Carter [this message]
2015-08-03 11:08 ` Simon Clubley
2015-08-15 14:22 ` Frédéric Praca
2015-08-15 15:33 ` Simon Clubley
2015-08-15 17:17 ` Frédéric Praca
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox