🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #2707

Re: Any ideas on fixed point addition?

#2707
From: David Kastrup
Date: Tue, 15 Sep 1992 07:36
23 lines
1217 bytes
tvz@zandtwerk.Princeton.EDU writes:

>Here is a macro for fixed point addition.

>USAGE \FPadd{num1}{num2}\cs

>This sets \cs to num1+num2.

>Rules:

>  num1 and num2 should have the same number of digits to the
>    right of the decimal. (Exception: if num1 is an integer,
>    decimal not needed.)
>  num1 and num2 should have at least one digit to the left
>    of the decimal (e.g., 0)
>  num1 and num2 can have at most 8 digits on each side of the
>    decimal.
>  Negative numbers are OK.

>DOES ANYONE HAVE ANY BETTER IDEAS? IT SEEMS LIKE A LOT OF
>WORK FOR SOMETHING SO SIMPLE!!
What do you need it for? why not use TeXs builtin variables?
If you want some sort of fixed point, try dimen variables.
Technical Details
Message-ID: <dak.716542597@kaa>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!Urmel.Informatik.RWTH-Aachen.DE!kaa!dak
References: <1992Sep14.220128.16318@Princeton.EDU>

Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!Urmel.Informatik.RWTH-Aachen.DE!kaa!dak
From: dak@kaa.informatik.rwth-aachen.de (David Kastrup)
Subject: Re: Any ideas on fixed point addition?
Message-ID: <dak.716542597@kaa>
Sender: news@Urmel.Informatik.RWTH-Aachen.DE (Newsfiles Owner)
Nntp-Posting-Host: kaa
Organization: Rechnerbetrieb Informatik  /  RWTH Aachen
References: <1992Sep14.220128.16318@Princeton.EDU>
Date: 15 Sep 92 07:36:37 GMT
Lines: 23