minpack_lsquares



Here's the macro:

----------------begin xmaxima macro--------------------
kill(all)$
load("minpack")$

minpack_lsquares(
[
s1(Y,X,Z):=sqrt(((5*Z)/sqrt(41)+X)^2+(Y-(4*Z)/sqrt(41))^2)-0.66146087960253,
s2(Y,X,Z):=sqrt(((5*Z)/sqrt(41)+X)^2+((4*Z)/sqrt(41)+Y)^2)-0.96813559654012,
s3(Y,X,Z):=sqrt(((4*Z)/sqrt(41)+Y)^2+(X-(5*Z)/sqrt(41))^2)-0.74997966956141,
s4(Y,X,Z):=sqrt((Y-(4*Z)/sqrt(41))^2+(X-(5*Z)/sqrt(41))^2)-0.25042656950073,
a1(Y,X,Z):=atan2((5*Z)/sqrt(41)+X,Y-(4*Z)/sqrt(41))-1.183014673400058,
a2(Y,X,Z):=atan2((5*Z)/sqrt(41)+X,(4*Z)/sqrt(41)+Y)-0.6847789579122,
a3(Y,X,Z):=0.016464555187806-atan2((5*Z)/sqrt(41)-X,(4*Z)/sqrt(41)+Y),
a4(Y,X,Z):=0.049325965088199-atan2((5*Z)/sqrt(41)-X,Y-(4*Z)/sqrt(41))
],
[Y,X,Z],
[0.5,0.5,0.5],
jacobian=false
);
---------------end xmaxima macro-------------------------


Here's the xmaxima output:


--------------begin xmaxima output---------------------
Maxima 5.24.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) 
read and interpret file: #pE:/My Documents/Maxima/minpack DNW.mac
(%i2)                              kill(all)
(%i1)                            load(minpack)
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/minpack-package.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/minpack-package.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/dpmpar.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/dpmpar.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/enorm.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/enorm.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/fdjac1.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/fdjac1.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/fdjac2.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/fdjac2.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/qrsolv.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/qrsolv.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/lmpar.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/lmpar.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/qrfac.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/qrfac.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/lmdif.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/lmdif.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/lmdif1.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/lmdif1.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/lmder.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/lmder.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/lmder1.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/lmder1.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/dogleg.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/dogleg.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/qform.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/qform.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/r1mpyq.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/r1mpyq.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/r1updt.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/r1updt.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/hybrd.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/hybrd.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/hybrd1.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/hybrd1.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/hybrj.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/hybrj.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/hybrj1.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/hybrj1.o
Loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/minpack-interface.o
Finished loading C:/Documents and Settings/us47temp/maxima/binary/binary-gcl/share/minpack/minpack-interface.o
(%i2) minpack_lsquares([s1(Y, X, Z) := 
            4 Z    2          5 Z    2
sqrt((Y - --------)  + (X + --------) ) - 0.66146087960253, 
          sqrt(41)          sqrt(41)
                           4 Z    2          5 Z    2
s2(Y, X, Z) := sqrt((Y + --------)  + (X + --------) ) - 0.96813559654012, 
                         sqrt(41)          sqrt(41)
                           5 Z    2          4 Z    2
s3(Y, X, Z) := sqrt((X - --------)  + (Y + --------) ) - 0.74997966956141, 
                         sqrt(41)          sqrt(41)
                           5 Z    2          4 Z    2
s4(Y, X, Z) := sqrt((X - --------)  + (Y - --------) ) - 0.25042656950073, 
                         sqrt(41)          sqrt(41)
                           5 Z           4 Z
a1(Y, X, Z) := atan2(X + --------, Y - --------) - 1.183014673400058, 
                         sqrt(41)      sqrt(41)
                           5 Z           4 Z
a2(Y, X, Z) := atan2(X + --------, Y + --------) - 0.6847789579122, 
                         sqrt(41)      sqrt(41)
                                           5 Z               4 Z
a3(Y, X, Z) := 0.016464555187806 - atan2(-------- - X, Y + --------), 
                                         sqrt(41)          sqrt(41)
                                           5 Z               4 Z
a4(Y, X, Z) := 0.049325965088199 - atan2(-------- - X, Y - --------)], 
                                         sqrt(41)          sqrt(41)
[Y, X, Z], [0.5, 0.5, 0.5], jacobian = false)
Maxima encountered a Lisp error:

 Error in FUNCALL [or a callee]: ((%REALPART SIMP)
                                  ((MDEFINE SIMP)
                                   (($S1
                                     (2
                                      "E:/My Documents/Maxima/minpack DNW.mac"
                                      SRC $A4 9))
                                    |$y| |$x| |$z|)
                                   ((MPLUS SIMP) -0.66146087960252997
                                    ((MEXPT SIMP)
                                     ((MPLUS SIMP)
                                      ((MEXPT SIMP)
                                       ((MPLUS SIMP) |$y|
                                        ((MTIMES SIMP)
                                         -0.62469504755442429 |$z|))
                                       2)
                                      ((MEXPT SIMP)
                                       ((MPLUS SIMP) |$x|
                                        ((MTIMES SIMP)
                                         0.78086880944303039 |$z|))
                                       2))
                                     ((RAT SIMP) 1 2))))) is not of type (OR
                                                                          RATIONAL
                                                                          LISP:FLOAT).

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i4)
---------------end xmaxima output----------------------

Is this a bug, or am I doing something wrong?