[Coco] A Basic09 Query
jejones3141 at gmail.com
Tue Aug 27 09:43:02 EDT 2019
I don't know how PI is implemented; that would take some looking through
Yes, strictly speaking SQ isn't necessary. OTOH ^ isn't necessary, since
you could write x^y as exp(y * log(x)). The creators of BASIC09 must've
thought it worth not having to write x*x, and I can agree with them:
consider SQ(sin(x)*y(15*i+3)/(5+sgn(w))). You either get to replicate a
long tedious computation (sure you didn't make a mistake writing it the
second time?) or create a gratuitous variable to hold the expression you
want to square.
On Mon, Aug 26, 2019 at 3:41 PM Bill Gunshannon <bill.gunshannon at hotmail.com>
> Nothing important, just a couple simple questions.
> Why would you need a function to return a constant, Pi?
> And further, why would you need a function to compute a square?
> Is that not unneeded complexity?
> Coco mailing list
> Coco at maltedmedia.com
More information about the Coco