Hi Waldek,

This is the only place that SExpression appears in integer.spad.pamphlet.

https://github.com/hemmecke/fricas-svn/blob/master/src/algebra/integer.spad.pamphlet#L198

      x exquo y ==
         zero? y => "failed"
         z : SExpression := INTEXQUO(x, y)$Lisp
         integer?(z) => z pretend %
         "failed"

Since that file uses implicitly that the underlying form is a lisp
s-expression, I find it a bit artificial to have SExpression in this place.

Since INTEXQUO is defined like this:

(defun INTEXQUO(X Y)
    (multiple-value-bind (quo remv) (TRUNCATE X Y)
         (if (= 0 remv) quo nil)))

https://github.com/hemmecke/fricas/blob/master/src/interp/spad.lisp#L65

why not replacing SExpression by a direct Lisp call and thus make
integer not depend on SExpression?

However, replacing the code like so...

x exquo y ==
    zero? y => "failed"
    z := (INTEXQUO(x, y)$Lisp) pretend %
    -- or better this?
    -- z: % := (INTEXQUO(x, y)$Lisp) pretend %
    NULL(z)$Lisp => "failed"
    z

(on top of r1699) compiles the algebra, but hangs (similarly to my
LispExpression patch) during the the build of coverex.pht. Isn't that
strange?

Ralf

=============================
end of compilation log
=============================
coverex.ht
unset DAASE; HTPATH=.; export HTPATH; xvfb-run -a -n 0 -s '-screen 0
1024x768x24'
/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux/bin/sman
-noihere -paste coverex.ht
Checking for foreign routines
AXIOM="/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux"
spad-lib="/home/hemmecke/g/fricas-bisect/b/target/x86_64-unknown-linux/lib/libspad.so"
foreign routines found
openServer result 0
                       FriCAS Computer Algebra System
          Version: FriCAS 82641b0f1d336f8e5a8242ba1c35a0b7ba104b83
                   Timestamp: Sun Mar 23 00:21:37 CET 2014
-----------------------------------------------------------------------------
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

writing:        differentiate(sin(x) * exp(x^2),x)
writing:        differentiate(sin(x) * tan(y)/(x^2 + y^2),x)
writing:        differentiate(sin(x) * tan(y)/(x^2 + y^2),y)
writing:        differentiate(exp(x^2),x,4)
writing:        differentiate(sin(x)/(x^2 + y^2),[x,y])
writing:        differentiate(sin(x)/(x^2 + y^2),[x,y,y])
writing:        differentiate(cos(z)/(x^2 + y^3),[x,y,z],[1,2,3])
writing:        f := integrate(sqrt(1 + t^3),t)
writing:        differentiate(f,t)
writing:        differentiate(f * t^2,t)
writing:        limit((x^2 - 3*x + 2)/(x^2 - 1),x = 1)
writing:        limit(sinh(a*x)/tan(b*x),x = 0)
writing:        limit(x * log(x),x = 0,"right")
writing:        limit(x * log(x),x = 0)
writing:        limit(sqrt(y^2)/y,y = 0)
writing:        limit(sqrt(1 - cos(t))/t,t = 0)
writing:        limit(sqrt(3*x^2 + 1)/(5*x),x = %plusInfinity)
writing:        limit(sqrt(3*x^2 + 1)/(5*x),x = %minusInfinity)
writing:        limit(z * sin(1/z),z = 0)
writing:        complexLimit(z * sin(1/z),z = 0)
writing:        complexLimit((2 + z)/(1 - z),z = %infinity)
writing:        limit(sin(x)/x,x = %plusInfinity)
writing:        complexLimit(sin(x)/x,x = %infinity)
writing:        draw(sin(tan(x)) - tan(sin(x)),x = 0..6)
writing:        draw(curve(9 * sin(3*t/4),8 * sin(t)),t = -4*%pi..4*%pi)

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to