comp.lang.ada
 help / color / mirror / Atom feed
From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: Quick inverse square root
Date: Mon, 4 Jan 2021 03:28:58 -0800 (PST)	[thread overview]
Message-ID: <e2f8932e-7992-4ae2-b112-6a481872ceb3n@googlegroups.com> (raw)
In-Reply-To: <283abde6-81b9-4194-b695-1b4686634d97n@googlegroups.com>

AdaMagica schrieb am Montag, 4. Januar 2021 um 12:13:53 UTC+1:
> > with INTERFACES; use INTERFACES; 
> > generic 
> > type F is digits <>; 
> > type U is mod <>; 
> > with function SHIFT_RIGHT( n : U; amount : NATURAL ) return U; 
> > function G_QUICK_INVERSE_SQRT( a : F ) return F; 

I haven't got the slightest idea for which range this function should be applied, but for sure not for the complete Float range.
Thus there should be an assertion about the range of the parameter a in the body. Or even better a precondition in the spec.

  reply	other threads:[~2021-01-04 11:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-02 22:26 Quick inverse square root Matt Borchers
2021-01-02 23:18 ` Jeffrey R. Carter
2021-01-03 10:58 ` Dmitry A. Kazakov
2021-01-03 22:31   ` Matt Borchers
2021-01-03 23:47     ` Jeffrey R. Carter
2021-01-04  3:50       ` Matt Borchers
2021-01-04  4:28         ` Matt Borchers
2021-01-04 11:04         ` Jeffrey R. Carter
2021-01-04 11:13     ` AdaMagica
2021-01-04 11:28       ` AdaMagica [this message]
2021-01-04 12:13         ` Dmitry A. Kazakov
2021-01-04 13:39 ` Egil H H
2021-01-04 20:55   ` Matt Borchers
2021-01-04 21:06     ` Paul Rubin
2021-01-05  2:22       ` Matt Borchers
2021-01-07 17:49     ` Brian Drummond
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox