Knuth's saying influencing the IEEE floating point standard pow function[[0] might be the main reason why "most programming languague[s] ... evaluate 0^0 as 1."
At any rate, since J also evaluates 0^0 as 1, Jon's point 0^x =1 is consistent with J's evaluation of 0^x for any x (although ignoring, for example, 0^_). [0] https://en.wikipedia.org/wiki/Exponentiation#Treatment_on_computers On Sun, Oct 1, 2017 at 11:22 AM, Roger Hui <rogerhui.can...@gmail.com> wrote: > > Right, J, among several other programming languages, regards 0^0 as 1. > > Wolfram Alpha and some programming languages regard 0^0 as undefined: > > > https://www.wolframalpha.com/input/?i=0%5E0 > > On this point (0^0 being undefined), Knuth says in *Two Notes on Notation > <https://arxiv.org/PS_cache/math/pdf/9205/9205211v1.pdf>*, > > But no, no, ten thousand times no! > > Some authors who say that 0^0 is undefined continue to write polynomials > blithely as sigma(i=0,n) a[i] times x ^ i. > > > > > On Sun, Oct 1, 2017 at 8:11 AM, Jose Mario Quintana < > jose.mario.quint...@gmail.com> wrote: > > > " > > (0&^) d. _1 gives a domain error. Possibly this is unwanted, I mean, it > > could be considered as a constant since 0^x = 1 in usual understanding, > but > > Wolfram Alpha also has issues with this: > > https://www.wolframalpha.com/input/?i=integrate+0%5Ex > > " > > > > Right, J, among several other programming languages, regards 0^0 as 1. > > Wolfram Alpha and some programming languages regard 0^0 as undefined: > > > > https://www.wolframalpha.com/input/?i=0%5E0 > > > > > > > > On Sun, Oct 1, 2017 at 10:42 AM, 'Jon Hough' via Source < > > sou...@jsoftware.com> wrote: > > > > > I have made a couple of minor edits and added some comments, and J > > syntax: > > > https://github.com/jonghough/jsource/blob/master/jsrc/cd.c LINES > 281 - > > > 301 > > > > > > A couple of points. > > > > > > (0&^) d. _1 gives a domain error. Possibly this is unwanted, I mean, it > > > could be considered as a constant since 0^x = 1 in usual understanding, > > but > > > Wolfram Alpha also has issues with this: > > > https://www.wolframalpha.com/input/?i=integrate+0%5Ex > > > > > > Negative bases for exponentials give complex results. This is > > > mathematically correct, but thought I would mention it anyway. > > > e.g. > > > (_2&^) d. _1 > > > %&0.693147180559945286j3.14159265358979312@(_2&^) NB. > correct > > > see: https://www.wolframalpha.com/input/?i=integrate+(-2)%5Ex > > > > > > Compare this to current J, where > > > (_2&^) d. _1 > > > gives a domain error. > > > -------------------------------------------- > > > On Fri, 9/29/17, 'Jon Hough' via Source <sou...@jsoftware.com> wrote: > > > > > > Subject: Re: [Jsource] d. fix > > > To: sou...@jsoftware.com > > > Date: Friday, September 29, 2017, 12:15 PM > > > > > > Sorry Henry, > > > > > > I somehow missed this email in my > > > inbox. > > > > > > I will get the fixes you need done this > > > weekend. > > > > > > Regards, > > > Jon > > > > > > -------------------------------------------- > > > On Mon, 9/25/17, Henry Rich <henryhr...@gmail.com> > > > wrote: > > > > > > Subject: [Jsource] d. fix > > > To: "'Jon Hough' via Source" <sou...@jsoftware.com> > > > Date: Monday, September 25, 2017, 1:06 > > > AM > > > > > > John, > > > > > > I finally have my PC back and > > > would > > > like to get your fix in before > > > the next build, which is happening > > > any > > > day now. However, I have issues > > > with it: > > > > > > 1. Needs commentary. The JE didn't > > > have much to begin with & that > > > needs > > > to improve. So at least put in > > > enough > > > commentary that a reader can tell > > > what you are doing without reading > > > the > > > C code. I put in an average of > > > about one line of comment for each > > > line > > > of C. As it stands it will me > > > more time than I care to spend to > > > verify that what you are doing is > > > valid. > > > > > > As part of the commentary, translate > > > those long calls [amp(ds(CDIV...] to > > > J. > > > > > > 2. AT(x)==INT is no good, because > > > there > > > may be flags set in more > > > significant bits of the type. Use > > > (AT(x)&INT) > > > > > > When you respond, send me your new > > > testcase (gddot, I think) and point > > > me to the fix, perhaps by simply > > > sending me the new cd.c. > > > > > > hhr > > > > > > ------------------------------------------------------------ > ---------- > > > For information about J forums see http://www.jsoftware.com/ > forums.htm > > > ------------------------------------------------------------ > ---------- > > > For information about J forums see http://www.jsoftware.com/ > forums.htm > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm