From: e_w_g@t-online.de
Subject: Re: Calculating in TeX
Date: Thu, 06 Dec 2001 15:06:36 +0100 (MET) [thread overview]
Message-ID: <1007647551.3c0f7b3f27cd3@webmail.t-online.de> (raw)
Tobias Burnus schrieb:
>
> I have a nice document where I need to perform small
> calculation (actually
> only calculating the average value):
> if((#1+#2+#3) != 0)
> (#1*1 + #2*2 + #3*3)/(#1+#2+#3)
> else
> "--"
>
> Now I was thinking where I could do so in TeX. (I think
> there are some
> macros in ConTeXt, but I cannot find them.)
>
There is the fp package for latex. It provides rather complete
fixed-point arithmetic. I have never used it, but probably it is
generic enough to work with context. If not, there is the fltpoint
package which will definitely work, but it is limited to addition,
subtraction, multiplication and division (if-then-else could be done
too).
Eckhart
next reply other threads:[~2001-12-06 14:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-06 14:06 e_w_g [this message]
[not found] <Pine.BSF.4.30.0112052223001.3513-100000@chip.physik.fu-ber lin.de>
2001-12-10 8:46 ` Hans Hagen
-- strict thread matches above, loose matches on Subject: below --
2001-12-05 21:31 Tobias Burnus
2001-12-06 9:50 ` Giuseppe Bilotta
2001-12-06 11:27 ` Taco Hoekwater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1007647551.3c0f7b3f27cd3@webmail.t-online.de \
--to=e_w_g@t-online.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).