|
19 | 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
20 | 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
21 | 21 | // SOFTWARE. |
22 | | - |
23 | 22 | #include "test_tools.h" |
24 | 23 | #include <mp-units/systems/astronomy.h> |
25 | 24 | #include <mp-units/systems/si.h> |
26 | 25 |
|
27 | 26 | namespace { |
28 | | - |
29 | 27 | using namespace mp_units; |
30 | 28 | using namespace mp_units::astronomy::unit_symbols; |
31 | 29 | using namespace mp_units::si::unit_symbols; |
32 | 30 | using mp_units::astronomy::unit_symbols::a; |
33 | | - |
34 | 31 | // time units |
35 | 32 | static_assert(1. * D == 86'400. * s); |
36 | | -static_assert(approx_equal(1. * D_sid, (86'164'0905. / 1'000'000.) * s)); |
| 33 | +static_assert(approx_equal(1. * D_sid, 86'164.0905 * s)); |
37 | 34 | static_assert(approx_equal(1. * a, 365.25 * D)); |
38 | 35 | static_assert(approx_equal(1. * a, 31'557'600. * s)); |
39 | 36 | static_assert(approx_equal(1. * a_trop, 365.242189 * D)); |
40 | 37 | static_assert(1. * c == 100. * a); |
41 | 38 | static_assert(1. * ka == 1000. * a); |
42 | | - |
43 | 39 | // length units |
44 | 40 | static_assert(1. * LD == 384'399. * km); |
45 | 41 | static_assert(1. * ly == 9'460'730'472'580'800. * m); |
46 | | - |
47 | 42 | // spectral flux density |
48 | 43 | static_assert(approx_equal(1. * Jy, 1e-26 * W / m2 / Hz)); |
49 | | - |
50 | 44 | // legacy constants |
51 | 45 | static_assert(approx_equal(1. * k, 1'720'209'895. / 100'000'000'000. * pow<3, 2>(iau::astronomical_unit) / |
52 | 46 | pow<1, 2>(iau::solar_mass) / D)); |
53 | | - |
54 | 47 | } // namespace |
0 commit comments