1. 18 Feb, 2018 1 commit
    • Raymond Toy's avatar
      Fix #58: Bogus type error in comparison of complex number with `THE` form · bccd6a98
      Raymond Toy authored
      The deftransforms `upgraded-complex-real-contagion-arg1` and
      `upgraded-complex-real-contagion-arg2` were coercing the complex
      number to the exact type of the float number.  Because of the `THE`
      form, the type of the float was `(member 1d0)`, so the compiler was
      coercing `#c(1/2 1/2)` to `(complex (double-float 1d0))`, which is
      wrong.
      
      Therefore, coerce the complex to just the type format of the real
      part, ignoring any bounds.
      
      * src/compiler/float-tran.lisp
        * Coerce to format type, discarding any bounds
      * src/general-info/release-21d.md
        * Update notes
      * tests/issues.lisp
        * Added test for this
      bccd6a98
  2. 04 Feb, 2018 1 commit
  3. 03 Feb, 2018 1 commit
    • Raymond Toy's avatar
      Fix #59: type derivation for decode-float exponent · 3acdd1b7
      Raymond Toy authored
      Type derivation for exponent part of decode-float was incorrect.  We
      need to take the absolute value of the argument before deriving the
      type since the exponent is, of course, independent of the sign of the
      number.  In the test case, the negative interval caused the lower and
      upper bounds to be reversed, resulting in an invalid interval.
      3acdd1b7
  4. 20 Dec, 2017 1 commit
  5. 14 May, 2016 1 commit
    • Raymond Toy's avatar
      Fix #22 where coerce was returning the wrong type of float. · bb4afde9
      Raymond Toy authored
      src/compiler/float.lisp:
      o The deftransform coerce was checking for a type of 'float and using
        %single-float to do the conversion.  This is incorrect; it should
        only apply if the type is 'single-float.
      
      tests/issues.lisp
      o Add test for this.
      
      Verified that the test fails on the current snapshot and ix fixed by
      this change.
      bb4afde9
  6. 07 Jun, 2015 3 commits
  7. 26 Nov, 2014 1 commit
    • Raymond Toy's avatar
      Use new log2 function in C · 0a522bd0
      Raymond Toy authored
       * code/exports.lisp:
         * Export %LOG2.
       * code/irrat.lisp:
         * Define %log2
         * Use %log2 instead of log2. (This needs work)
       * compiler/float-tran.lisp:
         * Use %log2 instead of log2 in the deftransforms.
      0a522bd0
  8. 02 Oct, 2014 1 commit
    • Raymond Toy's avatar
      Micro-optimize SCALE-FLOAT to use multiplication when possible. · 8f5f6abc
      Raymond Toy authored
      If the exponent (second arg of SCALE-FLOAT) is such that 2^exponent
      can be represented as a float (single or double), we can implement
      SCALE-FLOAT using a multiplication by 2^exponent, since multiplication
      by 2^exponent is exact.
      
       * src/compiler/float-tran.lisp:
         * Update deftransforms for SCALE-FLOAT to do a multiply when
           possible. 
       * tests/float-tran.lisp:
         * Add tests to make sure the deftransforms for SCALE-FLOAT are
           applied appropriately.
      8f5f6abc
  9. 25 Sep, 2014 3 commits
    • Raymond Toy's avatar
      Fix type derivation of the exponent for DECODE-FLOAT. · bcc8cd7d
      Raymond Toy authored
      The minimum exponent is from 0, it's from least-positive float.
      
       * src/compiler/float-tran.lisp:
         * Derive the correct minimum exponent by using the exponent from
           the least-positive float value of the appropriate type.
       * tests/float-tran.lisp:
         * Add tests for the derived exponent type for DECODE-FLOAT.
      
      Conflicts:
      	tests/float-tran.lisp
      bcc8cd7d
    • Raymond Toy's avatar
      Fix error in type derivation for the sign in DECODE-FLOAT. · b51c9978
      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.
      b51c9978
    • Raymond Toy's avatar
      Fix type derivation of the exponent for DECODE-FLOAT. · 6f288c11
      Raymond Toy authored
      The minimum exponent is from 0, it's from least-positive float.
      
       * src/compiler/float-tran.lisp:
         * Derive the correct minimum exponent by using the exponent from
           the least-positive float value of the appropriate type.
       * tests/float-tran.lisp:
         * Add tests for the derived exponent type for DECODE-FLOAT.
      6f288c11
  10. 21 Sep, 2014 1 commit
    • Raymond Toy's avatar
      Add deftransform to convert (log x 2) and (log x 10) to log2 and · db25e3e0
      Raymond Toy authored
      %log10. This better than using the definition (/ (log x) (log base)).
      This also allows exact answer for 2^n and 10^n for appropriate n.
      
      
       * src/compiler/float-tran.lisp:
         * Add deftransforms to convert (log x 2) and (log x 10) to
           kernel::log2 and kernel:%log10 
       * tests/float-tran.lisp:
         * Add tests to check the transforms are done, or not done, as
           appropriate.
      db25e3e0
  11. 20 Sep, 2014 1 commit
    • 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
  12. 27 Aug, 2014 1 commit
  13. 26 Jul, 2014 3 commits
  14. 24 Jul, 2014 1 commit
  15. 08 Mar, 2014 1 commit
    • Raymond Toy's avatar
      Revert change for ticket 92. · 508b6594
      Raymond Toy authored
      It's incorrect. We really want log(-0) to be -inf + i*pi. It's needed
      to get the correct values on the branch cuts of the special functions
      from the definitions.  
      
      Update trac test to test for this.
      508b6594
  16. 09 Feb, 2014 1 commit
    • Raymond Toy's avatar
      Fix ticket:92 · 8970ad11
      Raymond Toy authored
      Type derivation for log fixed to be consistent with the actual
      returned values.
      
       * src/compiler/float-tran.lisp:
         * Update {{{LOG-DERIVE-TYPE-AUX-1}}} to compute the correct type.
      
       * tests/trac.lisp:
         * Add test for trac ticket:92
      8970ad11
  17. 03 Jan, 2014 1 commit
  18. 21 Dec, 2013 1 commit
  19. 15 Dec, 2013 1 commit
  20. 11 Dec, 2013 1 commit
  21. 08 Dec, 2013 2 commits
  22. 07 Dec, 2013 1 commit
  23. 27 Oct, 2013 1 commit
  24. 22 Oct, 2013 1 commit
    • Raymond Toy's avatar
      Enable micro-optimization of fast-unary-ftruncate and · 07e2d61f
      Raymond Toy authored
      double-float-bits for x86/sse2. This gives x86 the same
      micro-optimizations that were available for sparc and ppc.
      
      
       o code/kernel.lisp:
         o Enable fast double-float-bits using the vop instead of calling
           double-float-high-bits/double-float-low-bits. 
      
       o compiler/float-tran.lisp:
         o Make fast-unary-ftruncate known to compiler and enable optimizer
           for it. 
         o Make double-float-bits known to compiler
      
       o compiler/x86/float-sse2.lisp:
         o Implement fast-unary-ftruncate for singles and doubles.
         o Implement double-float-bits.
      07e2d61f
  25. 22 Feb, 2013 1 commit
    • Raymond Toy's avatar
      Clean up one- and two-arg-derive-type. · 17e30810
      Raymond Toy authored
      srctran.lisp::
       * The optional convert-type arg is always true, so remove it and
         update the local functions to convert always.
       * Clean up some comments as well.
      
      float-tran.lisp::
       * Fix up one place where we were supplying a value for the optional
         convert-type arg.
      17e30810
  26. 23 Dec, 2012 1 commit
  27. 19 Aug, 2012 1 commit
  28. 04 Nov, 2011 1 commit
  29. 25 Sep, 2011 1 commit
  30. 18 Aug, 2010 2 commits
  31. 17 Aug, 2010 1 commit
  32. 20 Apr, 2010 1 commit