• What am I missing?

    From Al Greynolds@21:1/5 to All on Fri Dec 4 08:10:59 2020
    From these Gnuplot 5+ commands:

    rx=2;kx=0;ry=1;ky=-1
    ex=(1+kx)/rx
    ey=(1+ky)/ry
    show variables

    I get this output:

    rx = 2
    kx = 0
    ry = 1
    ky = -1
    ex = 0
    ey = 0

    Why is ex zero?

    Al

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Elvidge@21:1/5 to Al Greynolds on Fri Dec 4 19:12:00 2020
    On 04/12/2020 04:10 pm, Al Greynolds wrote:
    From these Gnuplot 5+ commands:

    rx=2;kx=0;ry=1;ky=-1
    ex=(1+kx)/rx
    ey=(1+ky)/ry
    show variables

    I get this output:

    rx = 2
    kx = 0
    ry = 1
    ky = -1
    ex = 0
    ey = 0

    Why is ex zero?

    Al


    Note that gnuplot uses both "real" and "integer" arithmetic, like
    FORTRAN and C. Integers are entered as "1", "-10", etc; reals as "1.0", "-10.0", "1e1", 3.5e-1, etc. The most important difference between the
    two forms is in division: division of integers truncates: 5/2 = 2;
    division of reals does not: 5.0/2.0 = 2.5.


    --
    Chris Elvidge
    England

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Al Greynolds@21:1/5 to Chris Elvidge on Fri Dec 4 11:51:27 2020
    On Friday, December 4, 2020 at 12:12:08 PM UTC-7, Chris Elvidge wrote:

    Note that gnuplot uses both "real" and "integer" arithmetic, like
    FORTRAN and C. Integers are entered as "1", "-10", etc; reals as "1.0", "-10.0", "1e1", 3.5e-1, etc. The most important difference between the
    two forms is in division: division of integers truncates: 5/2 = 2;
    division of reals does not: 5.0/2.0 = 2.5.


    --
    Chris Elvidge
    England

    Duh! Thanks. I'm used to working in another app where all numbers are stored as doubles.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)