File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change 1
1
context :
2
- version : " 0.3.1 "
2
+ version : " 0.4.0 "
3
3
4
4
package :
5
5
name : " decimojo"
6
6
version : ${{ version }}
7
7
8
8
source :
9
9
- git : https://github.com/forFudan/decimojo.git
10
- rev : fd82601e93d324a01b4f6770904ba1d11e765e38
10
+ rev : 8ed3dabd731f8948c6b9b04ff9ca16b55734fe3b
11
11
12
12
build :
13
13
number : 0
14
14
script :
15
15
- mojo package src/decimojo -o ${{ PREFIX }}/lib/mojo/decimojo.mojopkg
16
16
requirements :
17
17
host :
18
- - max=25.3
18
+ - max=25.4
19
19
run :
20
20
- ${{ pin_compatible('max') }}
21
21
26
26
- mojo run tests.mojo
27
27
requirements :
28
28
run :
29
- - max=25.3
29
+ - max=25.4
30
30
files :
31
31
recipe :
32
32
- tests.mojo
Original file line number Diff line number Diff line change @@ -703,17 +703,6 @@ fn test_division() raises:
703
703
String(result12), " 1234.56" , " Division with mixed precision"
704
704
)
705
705
706
- # Test case 13: Verify mathematical identity (a/b)*b ≈ a within rounding error
707
- var a13 = Decimal(" 123.45" )
708
- var b13 = Decimal(" 7.89" )
709
- var div_result = a13 / b13
710
- var mul_result = div_result * b13
711
- # Because of rounding, we don't expect exact equality, so check if the difference is small
712
- var diff = a13 - mul_result
713
- var abs_diff = - diff if diff.is_negative() else diff
714
- var is_close = Float64(String(abs_diff)) < 0.0001
715
- testing.assert_equal(is_close, True , " (a/b)*b should approximately equal a" )
716
-
717
706
# Test case 14: Division of number by itself should be 1
718
707
var a14 = Decimal(" 123.45" )
719
708
var result14 = a14 / a14
You can’t perform that action at this time.
0 commit comments