# HG changeset patch # User jwe # Date 1077221718 0 # Node ID 91a84c9bdadb533027eb1921655ad86c2b2e73ad # Parent ac4441e16ffaf56736061204902a5aefd810674a [project @ 2004-02-19 20:15:17 by jwe] diff -r ac4441e16ffa -r 91a84c9bdadb scripts/ChangeLog --- a/scripts/ChangeLog Thu Feb 19 16:16:34 2004 +0000 +++ b/scripts/ChangeLog Thu Feb 19 20:15:18 2004 +0000 @@ -1,3 +1,8 @@ +2004-02-19 John W. Eaton + + * plot/figure.m: Also look for GNUTERM in the environment and use + that if it is set (for OS X). From Per Persson . + 2004-02-18 John W. Eaton * control/base/__stepimp__.m: Only call clearplot if we will be diff -r ac4441e16ffa -r 91a84c9bdadb scripts/plot/figure.m --- a/scripts/plot/figure.m Thu Feb 19 16:16:34 2004 +0000 +++ b/scripts/plot/figure.m Thu Feb 19 20:15:18 2004 +0000 @@ -39,12 +39,16 @@ if (nargin < 2) if (gnuplot_has_frames) - if (! isempty (getenv ("DISPLAY"))) + gnuterm = getenv ("GNUTERM"); + if (isempty (gnuterm) && ! isempty ("DISPLAY")) + gnuterm = "x11"; + endif + if (! isempty (gnuterm)) oneplot (); figure_list = union (figure_list, f); - eval (sprintf ("gset term x11 %d\n", f)); + eval (sprintf ("gset term %s %d\n", gnuterm, f)); else - error ("figure: requires X11 and valid DISPLAY"); + error ("figure: requires GNUTERM (Aqua) or DISPLAY (X11)"); endif else error ("figure: gnuplot doesn't appear to support this feature"); diff -r ac4441e16ffa -r 91a84c9bdadb src/ChangeLog --- a/src/ChangeLog Thu Feb 19 16:16:34 2004 +0000 +++ b/src/ChangeLog Thu Feb 19 20:15:18 2004 +0000 @@ -1,13 +1,19 @@ +2004-02-19 John W. Eaton + + * xpow.cc (elem_xpow (const Matrix&, double)): + Convert both operands to Complex if any element of A is negative. + (elem_xpow (const NDArray&, double)): Likewise. + 2004-02-18 John W. Eaton * load-save.cc (Voctave_core_format): New static_variable. (octave_core_format): New function. (symbols_of_load_save): Add DEFVAR for octave_core_format. (get_save_format): Rename from get_default_save_format. - Pass name of format as arg. New optional arg, default_format. + Pass name of format as arg. New optional arg, fallback_format. Change all uses. (save_user_variables): Use pass Voctave_core_format to - get_save_format here. Pass LS_BINARY as default_format. + get_save_format here. Pass LS_BINARY as fallback_format. * sighandlers.cc (my_friendly_exit): New optional arg, save_vars. Only call save_user_variables if save_vars is true. diff -r ac4441e16ffa -r 91a84c9bdadb src/xpow.cc --- a/src/xpow.cc Thu Feb 19 16:16:34 2004 +0000 +++ b/src/xpow.cc Thu Feb 19 20:15:18 2004 +0000 @@ -565,8 +565,14 @@ for (int i = 0; i < nr; i++) { OCTAVE_QUIT; + + // XXX FIXME XXX -- avoid apparent GNU libm bug by + // converting A and B to complex instead of just A. + Complex atmp (a (i, j)); - result (i, j) = pow (atmp, b); + Complex btmp (b); + + result (i, j) = pow (atmp, btmp); } retval = result; @@ -937,8 +943,14 @@ for (int i = 0; i < a.length (); i++) { OCTAVE_QUIT; - Complex atmp (a(i)); - result(i) = pow (atmp, b); + + // XXX FIXME XXX -- avoid apparent GNU libm bug by + // converting A and B to complex instead of just A. + + Complex atmp (a (i)); + Complex btmp (b); + + result(i) = pow (atmp, btmp); } retval = result;