typelevel / algebra

Experimental project to lay out basic algebra type classes
https://typelevel.org/algebra/
Other
378 stars 69 forks source link

Split Field.fromDouble to enable reuse. #190

Closed denisrosset closed 7 years ago

denisrosset commented 7 years ago

e.g. in Spire DivisionRing. The code is quite heavy in bit tricks that are difficult to verify, so I'd like to avoid duplication.

codecov-io commented 7 years ago

Current coverage is 67.63% (diff: 0.00%)

Merging #190 into master will decrease coverage by 0.26%

@@             master       #190   diff @@
==========================================
  Files            36         36          
  Lines           757        760     +3   
  Methods         703        707     +4   
  Messages          0          0          
  Branches         54         53     -1   
==========================================
  Hits            514        514          
- Misses          243        246     +3   
  Partials          0          0          

Powered by Codecov. Last update 3da2b61...24fe85a

johnynek commented 7 years ago

:+1:

non commented 7 years ago

Seems reasonable to me. 👍

non commented 7 years ago

@denisrosset Do you want to add a test that calls this method? Or should we merge and worry about coverage later?

EDIT: We just merged another PR with a test, so maybe this is fine.

tixxit commented 7 years ago

@non Yeah, that PR will exercise this code through Rat, which uses the default implementation of fromDouble.