You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Frequency ratio is not constructed correctly from time ratio
To Reproduce
#include"include/SI/frequency.h"
#include<iostream>intmain()
{
// Creating 1 millisecondauto t = SI::milli_seconds_t<double>(1.);
// 1 beat per 1 millisecond is 1 kHzauto f = 1. / t;
// Expecting to see 1 as f should contain 1 kHz
std::cout << f.as<SI::kilo_hertz_t>().value() << std::endl;
return0;
}
Output: 1e-06
Expected behavior
Expected to see 1 on the screen.
Additional context
Reproduced with g++-10 --std=c++20.
It appears to me that f contains 1 mHz insted of 1 kHz, thus converting to 1 kHz turns to be 1e-06
The text was updated successfully, but these errors were encountered:
pavelkryukov
changed the title
Time ratio is not constructed correctly from frequency ratio
Frequency ratio is not constructed correctly from time ratio
Dec 9, 2024
Describe the bug
Frequency ratio is not constructed correctly from time ratio
To Reproduce
Expected behavior
Expected to see 1 on the screen.
Additional context
Reproduced with
g++-10 --std=c++20
.It appears to me that
f
contains1 mHz
insted of1 kHz
, thus converting to1 kHz
turns to be 1e-06The text was updated successfully, but these errors were encountered: