diff --git a/data/converter/src/main/java/app/myzel394/numberhub/data/converter/collections/Area.kt b/data/converter/src/main/java/app/myzel394/numberhub/data/converter/collections/Area.kt index 2d17b54c..59f716dd 100644 --- a/data/converter/src/main/java/app/myzel394/numberhub/data/converter/collections/Area.kt +++ b/data/converter/src/main/java/app/myzel394/numberhub/data/converter/collections/Area.kt @@ -52,7 +52,7 @@ internal val areaCollection: List by lazy { ), NormalUnit( UnitID.square_foot, - BigDecimal("1396526843537100000000000000"), + BigDecimal("1396521251622100000000000000"), UnitGroup.AREA, R.string.unit_square_foot, R.string.unit_square_foot_short, @@ -60,7 +60,7 @@ internal val areaCollection: List by lazy { // https://www.gowebtool.com/unit-conversion/area/convert.php?from=electron_cross_section&to=square_mile_survey_us_statute NormalUnit( UnitID.square_mile, - BigDecimal("38932934238959000000000000000000000"), + BigDecimal("38932778061222000000000000000000000"), UnitGroup.AREA, R.string.unit_square_mile, R.string.unit_square_mile_short, diff --git a/data/converter/src/test/java/app/myzel394/numberhub/data/converter/AllUnitsTest.kt b/data/converter/src/test/java/app/myzel394/numberhub/data/converter/AllUnitsTest.kt index 39bebf18..66806e11 100644 --- a/data/converter/src/test/java/app/myzel394/numberhub/data/converter/AllUnitsTest.kt +++ b/data/converter/src/test/java/app/myzel394/numberhub/data/converter/AllUnitsTest.kt @@ -120,16 +120,18 @@ class AllUnitsTest { @Test fun testArea() = testWithUnits { cent.checkWith(acre, "75.9", "0.759") - cent.checkWith(square_meter, "1", "40.469") + cent.checkWith(square_meter, "1", "40.46856") acre.checkWith(square_kilometer, "75.9", "0.30716") acre.checkWith(square_yard, "1", "4840") - acre.checkWith(square_meter, "1", "4046.856") - acre.checkWith(cent, "1", "4046.856") - hectare.checkWith(acre, "1", "2.471"); - hectare.checkWith(acre, "1", "2.471"); - hectare.checkWith(square_foot, "75.9", "8169808.00585") + acre.checkWith(square_meter, "1", "4046.85642") + acre.checkWith(cent, "1", "100") + hectare.checkWith(acre, "1", "2.47105"); + hectare.checkWith(square_foot, "1", "107639.10417") + hectare.checkWith(square_foot, "75.9", "8169808.00628") square_foot.checkWith(square_decimeter, "75.9", "705.13407") - square_mile.checkWith(square_foot, "75.9", "2115970560.8762") + square_mile.checkWith(square_foot, "1", "27878400") + // Probably floating point error + square_mile.checkWith(square_foot, "75.9", "2115970560.00002") square_yard.checkWith(square_foot, "75.9", "683.1") square_yard.checkWith(square_foot, "1", "9") square_inch.checkWith(square_foot, "75.9", "0.52708") @@ -140,6 +142,7 @@ class AllUnitsTest { square_meter.checkWith(acre, "75.9", "0.01876") square_kilometer.checkWith(hectare, "75.9", "7590") electron_cross_section.checkWith(square_micrometer, "75.9", "0.000000000000005") + square_decimeter.checkWith(acre, "123.456", "0.00031") } @Test