Git Product home page Git Product logo

ieee-floats's People

Contributors

christophejunke avatar marijnh avatar rpav avatar ruricolist avatar yitzchak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ieee-floats's Issues

Failed tests on clisp

I'm using clisp from https://gitlab.com/gnu-clisp/clisp/-/commit/66924971790e4cbee3d58f36e530caa0ad568e5f and attempt to run tests via MacPorts leads to failure:

:info:test #P"/opt/local/lib/clisp-2.49.93+/dynmod/asdf.lisp"
:info:test (*DEFAULT-PATHNAME-DEFAULTS*
:info:test  #P"/opt/local/var/macports/build/_Users_catap_src_macports-ports_lisp_cl-ieee-floats/cl-ieee-floats/work/build/system/"
:info:test  #P"/opt/local/share/common-lisp/system/")
:info:test WARNING: Adding method
:info:test          #<STANDARD-METHOD (#<STANDARD-CLASS TEST-OP> (EQL #<SYSTEM 
:info:test          "ieee-floats/tests">))> to an already called generic function
:info:test          #<STANDARD-GENERIC-FUNCTION PERFORM>
:info:test WARNING: Adding method
:info:test          #<STANDARD-METHOD (#<STANDARD-CLASS TEST-OP> (EQL #<SYSTEM 
:info:test          "trivial-backtrace">))> to an already called generic function
:info:test          #<STANDARD-GENERIC-FUNCTION OPERATION-DONE-P>
:info:test WARNING: Adding method
:info:test           #<STANDARD-METHOD
:info:test             :AROUND (#<STANDARD-CLASS ASDF/LISP-ACTION:LOAD-OP>
:info:test              #<STANDARD-CLASS ASDF/LISP-ACTION:CL-SOURCE-FILE>)>
:info:test          to an already called generic function
:info:test          #<STANDARD-GENERIC-FUNCTION ASDF/ACTION:PERFORM>
:info:test WARNING: in #:|4 11 (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
:info:test          (UNLESS # #) ...)-2-1| in lines 4..11 : Function IMPL-MAP-BACKTRACE
:info:test          was already defined in file
:info:test          #P"/opt/local/share/common-lisp/source/cl-trivial-backtrace/dev/map-backtrace.lisp"
:info:test          in lines 60..125
:info:test WARNING: in #:|4 11 (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
:info:test          (UNLESS # #) ...)-2-2| in lines 4..11 : Function
:info:test          PRINT-BACKTRACE-TO-STREAM
:info:test          was already defined in file
:info:test          #P"/opt/local/share/common-lisp/source/cl-trivial-backtrace/dev/backtrace.lisp"
:info:test          in lines 56..109
:info:test WARNING: in RUN! in lines 275..280 : Mixing &OPTIONAL and &KEY in lambda list
:info:test           (&OPTIONAL (TEST-SPEC *SUITE*) &KEY
:info:test            ((:PRINT-NAMES *PRINT-NAMES*) *PRINT-NAMES*))
:info:test          is bad design
:info:test *** - 
:info:test       SYSTEM::LPAR-READER: floating point underflow

Negative Zero

This does not appear to encode negative zero:

(ieee-floats:encode-float32 -0s0) ; => 0
(ieee-floats:encode-float64 -0d0) ; => 0

Where I believe the standard specifies using the sign bit.

Inline encoder/decoder

Inlining the encoder/decoder functions seems like a good idea, since these will likely form the kernel inside function loop. Doing this gives rise to these strange test failures,

M> (eos:run! :ieee-floats)
................f.....................f...........
 Did 50 checks.
    Pass: 48 (96%)
    Skip: 0 ( 0%)
    Fail: 2 ( 4%)

 Failure Details:
 --------------------------------
 SPECIALS-64 []: 
      (DECODE-FLOAT64* 9223372036854775808) evaluated to -0.0d0, which is not EQL to -0.0d0..
 --------------------------------
 --------------------------------
 SPECIALS-32 []: 
      (DECODE-FLOAT32* 2147483648) evaluated to -0.0, which is not EQL to -0.0..
 --------------------------------

I'm not entirely sure what is wrong.

Explicit license

The documentation in doc/index.html says this library is released under a BSD-like license. However, the documentation doesn't specify how BSD-like.

Could you specify BSD or the exact license explicitly in the .ASD file, in the docs, in code comments, or elsewhere in the repository.

Thanks,
Patrick

Silent underflow

The code signals an error on overflows, but should probably also signal one on underflows, i.e. when a Common Lisp float is too small to be represented in the desired encoding.

(ieee-floats:encode-float32 least-positive-long-float)

Returns 0 whereas we could expect an error.

EOS is deprecated

It might be a problem in the future, use FiveAM instead, from which Eos was forked?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.