Results 1 to 3 of 3

Thread: Problem Counting in Lisp

  1. #1
    Member
    Join Date
    2014-01
    Posts
    16
    Login to Give a bone
    0

    Default Problem Counting in Lisp

    i have this problem in Autlisp

    (* 50 50 50 50 50 50 ) = -1554869184

    but in Excel : 50^6 = 15625000000
    maybe anyone can help me, thaks before

  2. #2
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: Problem Counting in Lisp

    Its to do with the data type LISP is using to represent the number - each data type has a maximum and minimum value.

    Try changing one of the values to a real (50.0) and check the result.

  3. #3
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    0

    Default Re: Problem Counting in Lisp

    There are integers limits for AutoCAD. Integer numbers must be between 2147483647 and -2147483648
    http://knowledge.autodesk.com/suppor...147483648.html
    Not a problem for real numbers though as (* 50.0 50 50 50 50 50 ) returns 1.5625e+010 and (rtos (* 50.0 50 50 50 50 50 ) 2 0) returns "15625000000".

Similar Threads

  1. Problem with LISP
    By sjlidster916502 in forum AutoLISP
    Replies: 4
    Last Post: 2012-03-16, 02:18 PM
  2. Simple LISP Problem
    By david.brissenden in forum AutoLISP
    Replies: 7
    Last Post: 2011-08-16, 01:44 PM
  3. LISP Problem
    By csorensen in forum AutoLISP
    Replies: 4
    Last Post: 2008-11-26, 07:14 PM
  4. LISP problem
    By ccatinean in forum AutoLISP
    Replies: 12
    Last Post: 2008-10-20, 04:04 AM
  5. Problem with lisp
    By TEF in forum AutoLISP
    Replies: 3
    Last Post: 2008-06-23, 03:29 PM

Posting Permissions

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