Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!brl-adm!brl-smoke!smoke!rbj@icst-cmr From: rbj@icst-cmr (Root Boy Jim) Newsgroups: net.lang.c Subject: Re: exp(x) in APL Message-ID: <1830@brl-smoke.ARPA> Date: Mon, 30-Jun-86 11:22:28 EDT Article-I.D.: brl-smok.1830 Posted: Mon Jun 30 11:22:28 1986 Date-Received: Tue, 1-Jul-86 03:25:54 EDT Sender: news@brl-smoke.ARPA Lines: 28 > In article rbj@icst-cmr.arpa (Root Boy Jim) writes: > >My favorite one liner is `1 + +/ % ! i 12' (where `%' is DIVIDE (reciprocal) > >and `i' is IOTA). Twelve is a good approximation to infinity here. Anyway, > >you can see what happens when x is zero. All the other terms flake out > >except the first, which has to be one. Isn't this fun? > > Whoops, don't you mean: > 1 + +/ (x ^ i12) % (! i12) > ?? (Ya need x^n in the numerator of each term.... I'm using "^" for > exponentiation.) Of course! In the general case that is. Your expression is a function, whereas mine is a long name for a constant (the function evaluated at zero, or a very familiar looking number). I said it was my favorite one liner because that's what it is. I type it in without the carriage return and say `Guess what this is!' I could have done `)origin 0' before and changed 12 to 13, but that's two lines. I could also have dispensed with the first `1' and changed `i12' to `0,i12', or `_1 + i13' (`_' is negation for constants). > Peter S. Shenkin Columbia Univ. Biology Dept., NY, NY 10027 > {philabs,rna}!cubsvax!peters cubsvax!peters@columbia.ARPA Nice to know someone out there is awake and paying attention. (Root Boy) Jim Cottrell MMM-MM!! So THIS is BIO-NEBULATION!