Mateusz Pusz
b5ca8c78eb
test: one kind_of test added to reference tests
2024-10-15 21:07:46 +02:00
Mateusz Pusz
21784b125e
refactor: derived_quantity refactored to child_quantity
2024-10-15 21:06:52 +02:00
Mateusz Pusz
3eecdf3946
test: commutativity tests added to ISQ
2024-10-15 21:06:18 +02:00
Mateusz Pusz
820c7a5959
test: more std::chrono tests added
2024-10-15 21:04:52 +02:00
Mateusz Pusz
6591a65d06
feat: 𝜋 added as an alias for pi
2024-10-14 22:49:58 +02:00
Mateusz Pusz
195c3ad68b
test: Unicode symbols used in unit tests
2024-10-10 00:12:43 +02:00
Mateusz Pusz
4eb63227e2
refactor: 💥 ascii -> portable, unicode -> utf8, 'A' -> 'P'
2024-10-10 00:02:08 +02:00
Mateusz Pusz
70a18fec0c
refactor: 💥 op==(U1, U2) now checks for the same type (old behavior available as equivalent(U1, U2)) + convertible now verifies associated quantity_spec as well
2024-10-09 17:26:13 +02:00
Mateusz Pusz
2249879d62
feat: litre text symbol changed from l to L to avoid ambiguity with 1
2024-10-06 08:32:16 +02:00
Mateusz Pusz
cff9e25d3e
feat: common_unit selection algorithm improved to make rev + rad return rad
2024-10-05 22:57:46 +02:00
Mateusz Pusz
569f27af8b
fix: common_unit handling fixed for some corner cases
2024-10-05 17:52:52 +02:00
Mateusz Pusz
07e4e795c1
refactor: magnitude interface cleanup
2024-10-04 17:22:15 +02:00
Mateusz Pusz
f07e518ff0
test: unit tests for the inverse of mag_constant added
2024-10-04 14:59:39 +02:00
Mateusz Pusz
909d7d9065
docs: added TODO for radical powers of magnitude tests
2024-10-04 09:13:08 +02:00
Mateusz Pusz
dba8b07eb5
feat: added support for printing powers of magnitude constants
2024-10-03 19:36:37 +02:00
Mateusz Pusz
d783c3cda9
feat: magnitude text now obeys formatting parameters and knows how to print constants
2024-10-03 18:39:41 +02:00
Mateusz Pusz
5c1035a312
fix: extraneous space in unit symbol having only denominators removed
2024-10-03 18:34:37 +02:00
Mateusz Pusz
f3e1ace5f6
refactor(tests): usf alias provided in unit_symbol_test.h
2024-10-03 09:22:49 +02:00
Mateusz Pusz
eeece8a356
feat: scaled_unit does not have a priority over derived_unit anymore
...
We want `pow<2>(mag<3600> * second)` to print `[3600 s]^2` and `42 * (mag<10> * metre) / (mag<20> * second)` to print `42 [10 m]/[20 s]`
2024-10-02 16:10:29 +02:00
Mateusz Pusz
d7309c8602
feat: scaled_unit symbol printing improved ([] around the entire unit, small magnitude values do not use a power of 10 anymore)
2024-10-02 15:27:38 +02:00
Mateusz Pusz
25e99fe0fa
feat: common unit symbols now use EQUIV{u1, u2, ...} syntax
2024-10-02 08:14:37 +02:00
Mateusz Pusz
fb8f67c68a
refactor: 💥 all iec quantity specifications are now deprecated and moved to isq
...
IEC 80000-13 is a part of ISQ so quantity specifications should be in an `isq` namespace.
2024-09-28 15:06:22 +02:00
Mateusz Pusz
5a48f19746
feat: 💥 phase_velocity and group_velocity aliases removed from ISQ by ISO
2024-09-28 11:58:28 +02:00
Mateusz Pusz
3190d15eba
feat: common_unit support added
2024-09-26 20:28:41 +02:00
Mateusz Pusz
922907890f
feat: type_list_unique added
2024-09-26 13:05:01 +02:00
Mateusz Pusz
dcab80525d
refactor: 💥 common_XXX() functions renamed to get_common_XXX()
...
This is needed to release a name for `common_unit` type that is coming soon.
2024-09-24 09:36:59 +02:00
Mateusz Pusz
3671f64153
refactor: 💥 magnitudes code cleanup + mag_pi is now mag<pi>
2024-09-23 13:42:39 +02:00
Mateusz Pusz
e92178abef
refactor: 💥 iec80000 system renamed to iec
2024-09-20 10:01:32 -06:00
Mateusz Pusz
7ce8d695b1
test: std::complex-based quantities tests added
2024-09-17 12:48:13 -06:00
Mateusz Pusz
0670fbdd9f
feat: value_cast<Representation, Unit>() complementary conversion function added
2024-09-13 21:38:59 +02:00
Mateusz Pusz
e42e568f44
fix: conversion operator to std::chrono types fixed
...
Resolves #609
2024-09-09 14:37:22 +02:00
Mateusz Pusz
3d39472f46
test: unit tests for creating a quantity from a volatile variable
2024-09-06 18:07:33 +02:00
Mateusz Pusz
1570bda905
fix: quantity scaling between different prefixes improved
...
Resolves #608
2024-09-06 12:28:11 +02:00
Mateusz Pusz
45013f6752
fix: inline restored for non-template constexpr global variables
2024-09-05 10:06:43 +02:00
Mateusz Pusz
2e840cfdb4
refactor: Repetitive inline constexpr removed as no longer needed
...
Not needed anymore as stated in cplusplus/draft#4601
2024-09-05 08:43:36 +02:00
Mateusz Pusz
77625d63cb
feat: 💥 unit_can_be_prefixed removed - from now on all named units can be prefixed
...
Resolves #604
2024-08-22 08:06:00 +02:00
Chip Hogg
3a6fac9858
Move tests to runtime
2024-07-24 20:04:15 -04:00
Chip Hogg
f6696e8f68
Fix formatting
2024-07-24 19:48:05 -04:00
Chip Hogg
7e894788d7
Compute values for rational magnitude powers
...
Since this will only ever be done at compile time (as guaranteed by
using `consteval`), we can afford to prioritize precision over speed.
To compute an Nth root, we simply do a binary search over representable
floating point numbers, looking for the number whose Nth power most
closely matches the original number.
Fixes #494 . We have included a test case reproducing the original
problem exactly. All tests use "within 4 ULPs" as the criterion, which
is (I believe) equivalent to the googletest `EXPECT_DOUBLE_EQ`
criterion.
2024-07-24 10:31:44 -04:00
Mateusz Pusz
b870b85c25
feat: import std; support added
...
Resolves #595
2024-07-16 17:36:00 +02:00
Mateusz Pusz
551ed9e094
test: conversion to chrono unit tests added
2024-07-16 12:13:29 +02:00
Mateusz Pusz
c57142c18a
fix: common_type_t with std::chrono::seconds unit test removed
2024-07-14 22:22:39 +02:00
Mateusz Pusz
d84a2beae5
fix: common_type_t unit tests fixed
2024-07-14 22:12:25 +02:00
Mateusz Pusz
fcc16ae282
feat: convertibility of a quantity with a unit one with the raw value added
...
Resolves #553
2024-07-14 18:31:11 +02:00
Mateusz Pusz
73f7901329
build: duplicated cmake_minimum_required commands removed
...
Resolves #592
2024-07-14 18:04:05 +02:00
Mateusz Pusz
0653a2dbf7
fix: non-portable unit test removed
2024-07-12 18:46:26 +02:00
Mateusz Pusz
d341c166e1
fix: types ordering in one of the unit tests fixed
2024-07-12 18:31:54 +02:00
Mateusz Pusz
f73f924b80
refactor: small cleanup of unit_test.cpp
2024-07-12 17:49:09 +02:00
Mateusz Pusz
adbc77432e
feat: all tags in the expression templates are now ordered by the type names
...
Resolves #499
2024-07-12 17:48:38 +02:00
Mateusz Pusz
0010d868a7
feat: tag types-related operators are now hidden friends as well
...
Resolves #591
2024-07-12 16:01:03 +02:00