On 05/22/2014 03:29 PM, Fabio S. wrote: >>> I can tell you I would rather maintain the four lines of C++ without >>> the largely useless commentary. >> >> That's a simple AXIOM program, but I'm sure one can easily translate it >> into any programming language. >> >> foo(a: Integer, b: Integer): Integer == >> if a > 0 then >> if a > b then return foo(b,a) >> return foo(b-a,a)) >> return b >> >> Question: Does the program have a bug? >> >> Ralf > > Yes: there is an extra parenthesis in the fourth line... :) > > Which, BTW, I discovered as soon as I pasted it in a file since it was > error-highlighted by the syntax highlighting in vim :))
Well, you caught me, so I try again. ;-) And... the problem is be no means specific to AXIOM. foo(a: Integer, b: Integer): Integer == if a > 0 then if a > b then return foo(b,a) return foo(b-a,a) return b Question: Does the program have a bug? > A part from this, I think the example points out that perhaps we can > make a difference between source code of axiom (as a piece of software) > and implementation of (higher) mathematics: maybe the need for a > complete and thorough documentation can be considered of different > importance in the two cases. Sorry, I don't get the difference. > > Fabio _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org https://lists.nongnu.org/mailman/listinfo/axiom-developer