Deutsch   English   Français   Italiano  
<vj08q1$2mf7i$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: porkchop@invalid.foo (Mike Sanders)
Newsgroups: comp.lang.awk
Subject: Re: 100 Random Single Variable Linear Equations
Date: Sat, 7 Dec 2024 01:36:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 63
Sender: Mike Sanders <busybox@sdf.org>
Message-ID: <vj08q1$2mf7i$1@dont-email.me>
References: <vits2o$240vr$1@dont-email.me> <vitvta$24sm3$1@dont-email.me> <viurhe$2bces$1@dont-email.me> <viuunp$2c1ev$1@dont-email.me> <vivl6h$2ht3c$1@dont-email.me> <slrnvl70pt.14uh.naddy@lorvorc.mips.inka.de>
Injection-Date: Sat, 07 Dec 2024 02:36:02 +0100 (CET)
Injection-Info: dont-email.me; posting-host="90fb1f8e178bcc6a3c524255a69fe911";
	logging-data="2833650"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18EY1423viZM4jvQTZAS5VS"
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (NetBSD/9.3 (amd64))
Cancel-Lock: sha1:GubG3LXIzbg5fGJXZZcs5GDjd34=
Bytes: 2436

Christian Weisgerber <naddy@mips.inka.de> wrote:

> I suspect Mike used '*' as as short-hand for "a multiplication
> sign" and not specifically the asterisk.

Yes that's exactly the case (sorry for any confusion folks).

The code simply generates problems for the student/enthusiast
to solve. The books I've read use the symbols we all know.
But some older books complained that: 5y is ambiguous &
would be better expressed as: 5 * y, where * is the actual
multiplication symbol in the book & y is the variable.

In the code posted, I'm using 7bit ASCII for all operators:

* multiplication 2 * 2 = 4

/ division       4 / 2 = 2

+ addition       2 + 2 = 4

- subtraction    2 - 2 = 0

^ power          2 ^ 2 = 4

_nth subscript   a_1 (1st element in array a[1])

%                modulus

< less than

> greator than

&                and

|                or

(), [], {}       order does not matter, evaluate inner
                 to outer before outside expressions
                 {2 / [(x + y + z) - 2]}

r!               factorial 4! = 4 * 3 * 2 * 1 = 24

=                equals

!=               not equal

~                approximately equal

f(a, b) = a + 10 function definition

how to handle matrices?

[x y
 0 1]

[x y]
[0 1]

-- 
:wq
Mike Sanders