Skip to content
Snippets Groups Projects
  1. Sep 20, 2014
    • Raymond Toy's avatar
      Make (log (scale-float 1d0 k) 2) = k · 2e182540
      Raymond Toy authored
       * src/code/irrat.lisp
         * Improve accuracy of log2 for the case when x=2^k. There might be
           some loss in accuracy for other values of x, however.
       * tests/float.lisp
         * Add test for log2(2^k) = k.
      2e182540
    • Raymond Toy's avatar
      Fix error in type derivation for the sign in DECODE-FLOAT. · d03e1784
      Raymond Toy authored
      Type derivation of the sign of (DECODE-FLOAT X) returned the incorrect
      value when x was declared to be of type (DOUBLE-FLOAT (0d0)).
      
       * src/compiler/float-tran.lisp
         * Fix type derivation
       * tests/float-tran.lisp
         * New file for tests of DECODE-FLOAT-SIGN-DERIVE-TYPE-AUX.
       * tests/float.lisp
         * New file to test that decode-float is compiled correctly.
      d03e1784
  2. Sep 12, 2014
    • Raymond Toy's avatar
      Remove the NetBSD setexception changes on the master branch. This is · 13bd32f6
      Raymond Toy authored
      only for the upcoming release.
      13bd32f6
    • Raymond Toy's avatar
      Support FP exceptions on NetBSD without feraiseexcept. · c0428524
      Raymond Toy authored
      Not quite fully working on NetBSD, but using this approach on Darwin
      does the right thing and all the tests pass. (Could these failures be
      due to NetBSD not compiling with just sse2 and thus uses x87 for the
      operations?)
      
       * setexception.c:
         * Add support for NetBSD. Instead of using feraiseexcept, try to
           generate the appropriate operations to generate the desired
           exceptions.
       * double-values.c:
         * Helper functions for setexception to return appropriate float
           values. These are in a different file so that the compiler can't
           optimize the values away when used in fdlibm_setexceptions.
       * GNUmakefile:
         * Compue double-values.c everywhere. Should be harmless since only
           NetBSD uses these functions.
      c0428524
  3. Sep 05, 2014
  4. Sep 01, 2014
  5. Aug 29, 2014
  6. Aug 28, 2014
  7. Aug 27, 2014
  8. Aug 26, 2014
  9. Aug 23, 2014
  10. Aug 22, 2014
  11. Aug 21, 2014
  12. Aug 20, 2014
    • Raymond Toy's avatar
      Ensure acosh signals appropriate exceptions. · 86790380
      Raymond Toy authored
       * src/lisp/e_acosh.c:
         * Use fdlibm_setexceptions to signal exceptions appropriately.
       * tests/trig.lisp:
         * Add tests for acosh.
         * Update other tests to use the kernel:%foo functions instead of
           calling CL:foo. We really want to just test the fdlibm functions,
           not the CL versions of them, which might have different
           definitions. For example, acosh is defined for all real args
           (returning complex numbers in some cases), but kernel:%acosh is
           only defined for x > 1.
      86790380
    • Raymond Toy's avatar
      Make sure floating-point exceptions are signaled. · 258101b2
      Raymond Toy authored
      The compiler sometimes constant folds operations so that
      floating-point exceptions are not signaled.  However, lisp and other
      applications (maxima) currently expects these exceptions to be
      signaled.  Make this happen by using feraiseexcept to force these
      signals when they are enabled.  If feraiseexcept does not raise an
      exception (because it is masked), we return the appropriate value.
      
      Only a few files have been updated to support this. More work needed.
      
       * src/lisp/setexception.c:
         * New file. This is used by the routines to signal an appropriate
           exception or return the appropriate value. Uses feraiseexcept to
           do this, which should be available on all supported platforms.
       * src/lisp/GNUmakefile:
         * Add setexception.c to list of files to compile and link into
           lisp.
       * src/lisp/e_cosh.c:
         * Update to use the new routine.to signal exceptions.
       * src/lisp/e_sinh.c:
         * Update to use the new routine.to signal exceptions.
       * tests/trig.lisp:
         * Add tests to make sure exceptions are thrown for cosh and sinh. 
         * Add tests to make sure that the correct value is returned when
           the floating point exception is masked.
      258101b2
  13. Aug 17, 2014
  14. Aug 16, 2014
    • Raymond Toy's avatar
      Make cosh signal overflow when it should overflow. · 80df05a1
      Raymond Toy authored
       * lisp/e_cosh.c:
         * The compiler replaced the code huge*huge with infinity instead of
           doing the operation.  Change it so it does fabs(x)*huge, which
           forces the compiler to do the multiplication.
         * Change huge from 1e300 to 1e307 so that fabs(x)*huge will
           actually overflow when |x| > overflowthreshold.
       * tests/trig.lisp:
         * Add tests for sinh and cosh signaling overflow appropriately.
       * general-info/release-20f.txt:
         * Update.
      80df05a1
    • Raymond Toy's avatar
      Micro optimize float bits getters. · ab446830
      Raymond Toy authored
      When the float is in a register, we don't have to store it to memory
      to get at the parts. SSE2 has instructions to move from an XMM
      register to a general purpose register.
      ab446830
  15. Aug 15, 2014
    • Raymond Toy's avatar
      Fix ticket:106 by returning the correctly rounded value. · 375ce218
      Raymond Toy authored
       * src/lisp/e_exp.c:
         * Add special case to return the correctly rounded value of exp(1).
       * tests/trac.lisp:
         * Add test that the correct value is returned.
         * Add test that exp(x) is still monotonic around x = 1.
       * src/general-info/release-20f.txt:
         * Update.
      375ce218
  16. Aug 10, 2014
  17. Aug 09, 2014
    • Raymond Toy's avatar
      Fix ticket:105 by not flaming out on a closed stream. · c0052f55
      Raymond Toy authored
       * code/reader.lisp:
         * The READER-ERROR condition tries to be helpful and print out the
           position of where the error occurred using FILE-POSITION. But
           FILE-POSITION flames out when the stream is closed, so check for
           a closed stream before calling FILE-POSITION
      
       * tests/trac.lisp:
         * Add test from the bug report.
      
       * general-info/release-20f.txt:
         * Update.
      c0052f55
Loading