Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1148

Re: (negative Value)**(-1.0) creates complex values

From sfeam <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: (negative Value)**(-1.0) creates complex values
Followup-To comp.graphics.apps.gnuplot
Date 2012-05-26 10:38 -0700
Organization gnuplot development team
Message-ID <jpr4f4$4mt$1@dont-email.me> (permalink)
References <05e72b70-4601-4c79-9102-b6ee4ad1b6f9@k5g2000vbf.googlegroups.com> <a2a29qF85vU1@mid.dfncis.de> <a2bh9vF1biU1@mid.individual.net>

Followups directed to: comp.graphics.apps.gnuplot

Show all headers | View raw


Ingo Thies wrote:

> Am 2012-05-25 20:45, schrieb Hans-Bernhard Bröker:
> 
>>> Is there a way to prevent gnuplot from generating complex numbers
>>> for (negative Value)**(-1.0) and similar cases.
>>
>> No. Nor should there be one.
> 
> Well, (-1)**(-1) is just 1/(-1) = -1. The tiny imaginary part is just
> a rounding error. But I can't see a smooth way to avoid them since
> gnuplot doesn't know whether a real exponent is ever indented to
> become a non-integer value.

It seems to me that the complaint is really about the output format.
The OP would like a way to print {-1.0, -1.22460635382238e-016} as -1,  
similar to the way %f would print -1.22460635382238e-016 as -0.000000.
That is, they want a format specifier that hides the complex nature of
a number whose imaginary component is sufficiently small.

But neither C nor gnuplot offers special format specifiers for complex
numbers.

	Ethan

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

(negative Value)**(-1.0) creates complex values Michi <michael.boelling@gmail.com> - 2012-05-25 03:36 -0700
  Re: (negative Value)**(-1.0) creates complex values Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2012-05-25 20:45 +0200
    Re: (negative Value)**(-1.0) creates complex values Ingo Thies <ingo.thies@gmx.de> - 2012-05-26 10:07 +0200
      Re: (negative Value)**(-1.0) creates complex values sfeam <sfeam@users.sourceforge.net> - 2012-05-26 10:38 -0700
  Re: (negative Value)**(-1.0) creates complex values Ingo Thies <ingo.thies@gmx.de> - 2012-05-26 10:19 +0200
    Re: (negative Value)**(-1.0) creates complex values Michi <michael.boelling@gmail.com> - 2012-05-26 02:39 -0700
      Re: (negative Value)**(-1.0) creates complex values Ron Shepard <ron-shepard@NOSPAM.comcast.net> - 2012-05-26 11:42 -0500

csiph-web