Results 1 to 6 of 6

Thread: [RESOLVED] Strange arithmetical error with double precision

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2009
    Posts
    149

    Resolved [RESOLVED] Strange arithmetical error with double precision

    I 'm sitting for hours infront of my computer staring in disbelief.
    I 'm writing a simple piece of code like:

    x1# = 5
    y1# = x1#
    x2# = 10
    y2# = y1# + x2#

    The answer comes out as y1# = 0, y2# = 0 !

  2. #2
    Frenzied Member
    Join Date
    Nov 2017
    Posts
    1,230

    Re: Strange arithmetical error with double precision

    That code exactly as is works fine for me.

    Post the actual code, you're probably overlooking something like scope or changes taking place elsewhere.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2009
    Posts
    149

    Re: Strange arithmetical error with double precision

    Quote Originally Posted by johnywalker View Post
    I 'm sitting for hours infront of my computer staring in disbelief.
    I 'm writing a simple piece of code like:

    x1# = 5
    y1# = x1#
    x2# = 10
    y2# = y1# + x2#

    The answer comes out as y1# = 0, y2# = 0 !

    Bs.
    Thanks to posting here I found out.
    I tried to repost a more complete piece of code and strange symbols appeared.
    There were Greek letters where they should n't and those come out as symbols here !
    Some of the Greek letters are look alike with the Latin ones.

  4. #4
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    7,483

    Re: Strange arithmetical error with double precision

    so? fix the Greek Letters, and repost....no???
    Sam I am (as well as Confused at times).

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2009
    Posts
    149

    Re: Strange arithmetical error with double precision

    Quote Originally Posted by SamOscarBrown View Post
    so? fix the Greek Letters, and repost....no???
    It works now.
    Could be seen only because Greek letters cannot be printed in this page when I coppy-paste and something else appeared.

  6. #6
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    7,483

    Re: Strange arithmetical error with double precision

    Cool...can you mark this Thread as RESOLVED, then? Thx
    Sam I am (as well as Confused at times).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width