JuliaIntervals / IntervalLinearAlgebra.jl

Linear algebra done rigorously
MIT License
36 stars 9 forks source link

fix printing of arrays of affine expressions #123

Closed lucaferranti closed 2 years ago

lucaferranti commented 2 years ago

PR description

Before, printing arrays of affine xpressions was using too many decimals, making it hard to read.

Before

julia> @affinevars x y;

julia> [x+1/6*y-1 1/3*x+1/7;-x-1/9 1/11]
2×2 Matrix{AffineExpression{Float64}}:
 x+0.16666666666666666y-1.0  0.3333333333333333x+0.14285714285714285
 -x-0.1111111111111111       0.09090909090909091

After

julia> @affinevars x y;

julia> [x+1/6*y-1 1/3*x+1/7;-x-1/9 1/11]
2×2 Matrix{AffineExpression{Float64}}:
 x+0.166667y-1.0  0.333333x+0.142857
 -x-0.111111      0.0909091

Related issues

Checklist

Other

codecov-commenter commented 2 years ago

Codecov Report

Merging #123 (cfcc162) into main (80c6d65) will increase coverage by 0.01%. The diff coverage is 95.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
+ Coverage   97.02%   97.04%   +0.01%     
==========================================
  Files          17       17              
  Lines         639      643       +4     
==========================================
+ Hits          620      624       +4     
  Misses         19       19              
Impacted Files Coverage Δ
src/pils/affine_expressions.jl 98.79% <95.23%> (+0.06%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 80c6d65...cfcc162. Read the comment docs.