[comp.lang.c] quaternary/quartic/quadratic operators

chris@mimsy.UUCP (Chris Torek) (08/10/89)

In article <207600030@s.cs.uiuc.edu> mccaugh@s.cs.uiuc.edu writes:
>I couldn't help but side with the suggestion of "quadratic" even if it was
>misguided ....  The point being that 'quadratic' means 'square', and it is
>an inference that the latter means "to the power 2". 

Ah, but then a `quadratic' operator should be one that is written
two-dimensionally! :-)

	signum = quad v :	< 0 = -1,
		== 0 = 0,	default 1;

Actually, if one is going to generalise, an `n-way' operator makes more
sense.  The syntax is icky, but the idea is clear:  Something like

	choose expr_0 from
	    relational_1 expr_1 : value_1;
	    relational_2 expr_2 : value_2;
	    relational_3 expr_3 : value_3;
		.
		.
		.
	    relational_n expr_n : value_n;
	    default		: value_d;
	esoohc;

Such constructs do exist in other languages.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris