Re: Overflow Test for M*/

Liste des GroupesRevenir à cl forth 
Sujet : Re: Overflow Test for M*/
De : krishna.myneni (at) *nospam* ccreweb.org (Krishna Myneni)
Groupes : comp.lang.forth
Date : 13. Jul 2024, 13:18:11
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6tra3$3j3cg$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
On 7/13/24 02:15, mhx wrote:
On Sat, 13 Jul 2024 2:03:54 +0000, dxf wrote:
 [..]
How many applications have you written requiring a negative divisor?
 I note that in the 68 occurrences of M*/ inside about 1900 files,
32 appear as ".. 1 M*/ ..".
 
The use of 1 M*/ just points to a missing factor of M*/ being omitted from the standard. In kForth, we provide the missing factor:
DS* ( d n -- t )
where t is a signed triple length product. Therefore, 1 M*/ can be replaced by
DS* drop
and the division can be avoided.
If you need an overflow check, it may be a bit more complicated, though.
--
Krishna

Date Sujet#  Auteur
12 Jul 24 * Re: Overflow Test for M*/8minforth
13 Jul 24 `* Re: Overflow Test for M*/7dxf
13 Jul 24  +* Re: Overflow Test for M*/3mhx
13 Jul 24  i`* Re: Overflow Test for M*/2Krishna Myneni
14 Jul 24  i `- Re: Overflow Test for M*/1dxf
13 Jul 24  `* Re: Overflow Test for M*/3minforth
13 Jul 24   +- Re: Overflow Test for M*/1mhx
13 Jul 24   `- Re: Overflow Test for M*/1dxf

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal