From: "Björn Lundin" <b.f.lundin@gmail.com>
Subject: Re: Fixed vs float and precision and conversions
Date: Wed, 8 Jul 2020 21:41:32 +0200 [thread overview]
Message-ID: <re57hc$qv4$2@dont-email.me> (raw)
In-Reply-To: <re53nq$1gqt$1@gioia.aioe.org>
Den 2020-07-08 kl. 20:36, skrev Dmitry A. Kazakov:
> On 08/07/2020 20:10, Björn Lundin wrote:
>> Den 2020-07-08 kl. 20:08, skrev Björn Lundin:
>>
>> The main reason for asking was to see if I got the whole concept
>> of fixed types wrong or not.
>
> Fixed-point is conceptually a scaled integer. You should deal with it
> accordingly. [It could be a bit surprising in Ada where conversion to
> integer rounds. In most languages conversion to integer truncates]
>
>> I did expect
>> 'You should do this or that one-liner' as Niklas proposed.
>> I did not get that to work though
>
> What do you mean it does not work? Of course T'Round works for
> fixed-point types.
Yes, of course *that* works. But unfortuantly, it does not solve my problem.
As I replied to Niklas:
It is at least not certain that the number expressed in fixed_type is
one of them in the array below.
And that is my real problem - I think.
--
Björn
next prev parent reply other threads:[~2020-07-08 19:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 21:10 Fixed vs float and precision and conversions Björn Lundin
2020-07-07 21:30 ` Niklas Holsti
2020-07-08 8:17 ` Björn Lundin
2020-07-07 21:58 ` Shark8
2020-07-08 8:15 ` Björn Lundin
2020-07-08 16:16 ` Shark8
2020-07-08 18:08 ` Björn Lundin
2020-07-08 18:10 ` Björn Lundin
2020-07-08 18:21 ` Niklas Holsti
2020-07-08 19:39 ` Björn Lundin
2020-07-08 20:34 ` Niklas Holsti
2020-07-08 21:24 ` Björn Lundin
2020-07-09 7:11 ` Niklas Holsti
2020-07-08 18:36 ` Dmitry A. Kazakov
2020-07-08 19:41 ` Björn Lundin [this message]
2020-07-09 6:20 ` Dmitry A. Kazakov
2020-07-09 7:23 ` Björn Lundin
2020-07-09 7:49 ` Dmitry A. Kazakov
2020-07-08 21:16 ` Shark8
2020-07-08 21:47 ` Björn Lundin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox