![]() |
Audacity 3.2.0
|
Namespaces | |
| namespace | detail |
Classes | |
| struct | adjusted_mantissa |
| struct | bigint |
| struct | binary_format |
| struct | from_chars_result |
| struct | parse_options |
| struct | parsed_number_string |
| struct | powers_template |
| struct | span |
| struct | stackvec |
| struct | value128 |
Typedefs | |
| typedef span< const char > | byte_span |
| using | powers = powers_template<> |
| typedef uint32_t | limb |
| typedef span< limb > | limb_span |
Enumerations | |
| enum | chars_format { scientific = 1<<0 , fixed = 1<<2 , hex = 1<<3 , general = fixed | scientific } |
Functions | |
| template<typename T > | |
| from_chars_result | from_chars (const char *first, const char *last, T &value, chars_format fmt=chars_format::general) noexcept |
| template<typename T > | |
| from_chars_result | from_chars_advanced (const char *first, const char *last, T &value, parse_options options) noexcept |
| bool | fastfloat_strncasecmp (const char *input1, const char *input2, size_t length) |
| fastfloat_really_inline int | leading_zeroes (uint64_t input_num) |
| fastfloat_really_inline value128 | full_multiplication (uint64_t a, uint64_t b) |
| template<typename T > | |
| fastfloat_really_inline void | to_float (bool negative, adjusted_mantissa am, T &value) |
| fastfloat_really_inline bool | is_integer (char c) noexcept |
| fastfloat_really_inline uint64_t | byteswap (uint64_t val) |
| fastfloat_really_inline uint64_t | read_u64 (const char *chars) |
| fastfloat_really_inline void | write_u64 (uint8_t *chars, uint64_t val) |
| fastfloat_really_inline uint32_t | parse_eight_digits_unrolled (uint64_t val) |
| fastfloat_really_inline uint32_t | parse_eight_digits_unrolled (const char *chars) noexcept |
| fastfloat_really_inline bool | is_made_of_eight_digits_fast (uint64_t val) noexcept |
| fastfloat_really_inline bool | is_made_of_eight_digits_fast (const char *chars) noexcept |
| fastfloat_really_inline parsed_number_string | parse_number_string (const char *p, const char *pend, parse_options options) noexcept |
| template<int bit_precision> | |
| fastfloat_really_inline value128 | compute_product_approximation (int64_t q, uint64_t w) |
| template<typename binary > | |
| fastfloat_really_inline adjusted_mantissa | compute_error_scaled (int64_t q, uint64_t w, int lz) noexcept |
| template<typename binary > | |
| fastfloat_really_inline adjusted_mantissa | compute_error (int64_t q, uint64_t w) noexcept |
| template<typename binary > | |
| fastfloat_really_inline adjusted_mantissa | compute_float (int64_t q, uint64_t w) noexcept |
| fastfloat_really_inline uint64_t | empty_hi64 (bool &truncated) noexcept |
| fastfloat_really_inline uint64_t | uint64_hi64 (uint64_t r0, bool &truncated) noexcept |
| fastfloat_really_inline uint64_t | uint64_hi64 (uint64_t r0, uint64_t r1, bool &truncated) noexcept |
| fastfloat_really_inline uint64_t | uint32_hi64 (uint32_t r0, bool &truncated) noexcept |
| fastfloat_really_inline uint64_t | uint32_hi64 (uint32_t r0, uint32_t r1, bool &truncated) noexcept |
| fastfloat_really_inline uint64_t | uint32_hi64 (uint32_t r0, uint32_t r1, uint32_t r2, bool &truncated) noexcept |
| fastfloat_really_inline limb | scalar_add (limb x, limb y, bool &overflow) noexcept |
| fastfloat_really_inline limb | scalar_mul (limb x, limb y, limb &carry) noexcept |
| template<uint16_t size> | |
| bool | small_add_from (stackvec< size > &vec, limb y, size_t start) noexcept |
| template<uint16_t size> | |
| fastfloat_really_inline bool | small_add (stackvec< size > &vec, limb y) noexcept |
| template<uint16_t size> | |
| bool | small_mul (stackvec< size > &vec, limb y) noexcept |
| template<uint16_t size> | |
| bool | large_add_from (stackvec< size > &x, limb_span y, size_t start) noexcept |
| template<uint16_t size> | |
| fastfloat_really_inline bool | large_add_from (stackvec< size > &x, limb_span y) noexcept |
| template<uint16_t size> | |
| bool | long_mul (stackvec< size > &x, limb_span y) noexcept |
| template<uint16_t size> | |
| bool | large_mul (stackvec< size > &x, limb_span y) noexcept |
| fastfloat_really_inline int32_t | scientific_exponent (parsed_number_string &num) noexcept |
| template<typename T > | |
| fastfloat_really_inline adjusted_mantissa | to_extended (T value) noexcept |
| template<typename T > | |
| fastfloat_really_inline adjusted_mantissa | to_extended_halfway (T value) noexcept |
| template<typename T , typename callback > | |
| fastfloat_really_inline void | round (adjusted_mantissa &am, callback cb) noexcept |
| template<typename callback > | |
| fastfloat_really_inline void | round_nearest_tie_even (adjusted_mantissa &am, int32_t shift, callback cb) noexcept |
| fastfloat_really_inline void | round_down (adjusted_mantissa &am, int32_t shift) noexcept |
| fastfloat_really_inline void | skip_zeros (const char *&first, const char *last) noexcept |
| fastfloat_really_inline bool | is_truncated (const char *first, const char *last) noexcept |
| fastfloat_really_inline bool | is_truncated (byte_span s) noexcept |
| fastfloat_really_inline void | parse_eight_digits (const char *&p, limb &value, size_t &counter, size_t &count) noexcept |
| fastfloat_really_inline void | parse_one_digit (const char *&p, limb &value, size_t &counter, size_t &count) noexcept |
| fastfloat_really_inline void | add_native (bigint &big, limb power, limb value) noexcept |
| fastfloat_really_inline void | round_up_bigint (bigint &big, size_t &count) noexcept |
| void | parse_mantissa (bigint &result, parsed_number_string &num, size_t max_digits, size_t &digits) noexcept |
| template<typename T > | |
| adjusted_mantissa | positive_digit_comp (bigint &bigmant, int32_t exponent) noexcept |
| template<typename T > | |
| adjusted_mantissa | negative_digit_comp (bigint &bigmant, adjusted_mantissa am, int32_t exponent) noexcept |
| template<typename T > | |
| adjusted_mantissa | digit_comp (parsed_number_string &num, adjusted_mantissa am) noexcept |
Variables | |
| static constexpr int32_t | invalid_am_bias = -0x8000 |
| static constexpr double | powers_of_ten_double [] |
| static constexpr float | powers_of_ten_float [] |
| constexpr size_t | limb_bits = 32 |
| constexpr size_t | bigint_bits = 4000 |
| constexpr size_t | bigint_limbs = bigint_bits / limb_bits |
| static constexpr uint64_t | powers_of_ten_uint64 [] |
| typedef span<const char> fast_float::byte_span |
Definition at line 535 of file fast_float.h.
| typedef uint32_t fast_float::limb |
Definition at line 1616 of file fast_float.h.
| typedef span<limb> fast_float::limb_span |
Definition at line 1620 of file fast_float.h.
| using fast_float::powers = typedef powers_template<> |
Definition at line 1392 of file fast_float.h.
| Enumerator | |
|---|---|
| scientific | |
| fixed | |
| hex | |
| general | |
Definition at line 44 of file fast_float.h.
|
noexcept |
Definition at line 2639 of file fast_float.h.
References fast_float::detail::power().
Referenced by parse_mantissa(), and round_up_bigint().
| fastfloat_really_inline uint64_t fast_float::byteswap | ( | uint64_t | val | ) |
Definition at line 481 of file fast_float.h.
Referenced by read_u64(), and write_u64().
|
noexcept |
Definition at line 1476 of file fast_float.h.
References fast_float::value128::high, and leading_zeroes().
|
noexcept |
Definition at line 1463 of file fast_float.h.
References invalid_am_bias, fast_float::adjusted_mantissa::mantissa, fast_float::detail::power(), and fast_float::adjusted_mantissa::power2.
|
noexcept |
Definition at line 1490 of file fast_float.h.
References fast_float::value128::high, leading_zeroes(), fast_float::value128::low, fast_float::adjusted_mantissa::mantissa, fast_float::detail::power(), and fast_float::adjusted_mantissa::power2.
Referenced by from_chars_advanced().
| fastfloat_really_inline value128 fast_float::compute_product_approximation | ( | int64_t | q, |
| uint64_t | w | ||
| ) |
Definition at line 1417 of file fast_float.h.
References full_multiplication(), fast_float::value128::high, fast_float::value128::low, fast_float::powers_template< unused >::power_of_five_128, and fast_float::powers_template< unused >::smallest_power_of_five.
|
inlinenoexcept |
Definition at line 2815 of file fast_float.h.
References invalid_am_bias, fast_float::binary_format< T >::max_digits(), parse_mantissa(), fast_float::adjusted_mantissa::power2, and scientific_exponent().
|
noexcept |
Definition at line 1749 of file fast_float.h.
Referenced by fast_float::bigint::hi64().
|
inline |
Definition at line 193 of file fast_float.h.
Referenced by fast_float::detail::parse_infnan().
|
noexcept |
This function parses the character sequence [first,last) for a number. It parses floating-point numbers expecting a locale-indepent format equivalent to what is used by std::strtod in the default ("C") locale. The resulting floating-point value is the closest floating-point values (using either float or double), using the "round to even" convention for values that would otherwise fall right in-between two values. That is, we provide exact parsing according to the IEEE standard.
Given a successful parse, the pointer (ptr) in the returned value is set to point right after the parsed number, and the value referenced is set to the parsed value. In case of error, the returned ec contains a representative error, otherwise the default (std::errc()) value is stored.
The implementation does not throw and does not allocate memory (e.g., with new or malloc).
Like the C++17 standard, the fast_float::from_chars functions take an optional last argument of the type fast_float::chars_format. It is a bitset value: we check whether fmt & fast_float::chars_format::fixed and fmt & fast_float::chars_format::scientific are set to determine whether we allowe the fixed point and scientific notation respectively. The default is fast_float::chars_format::general which allows both fixed and scientific.
Definition at line 2900 of file fast_float.h.
References from_chars_advanced().
Referenced by FromChars().
|
noexcept |
Like from_chars, but accepts an options argument to govern number parsing.
Definition at line 2906 of file fast_float.h.
References compute_float(), fast_float::from_chars_result::ec, fast_float::binary_format< T >::exact_power_of_ten(), fast_float::detail::parse_infnan(), parse_number_string(), fast_float::adjusted_mantissa::power2, fast_float::from_chars_result::ptr, and to_float().
Referenced by from_chars().
| fastfloat_really_inline value128 fast_float::full_multiplication | ( | uint64_t | a, |
| uint64_t | b | ||
| ) |
Definition at line 282 of file fast_float.h.
References fast_float::value128::high, and fast_float::value128::low.
Referenced by compute_product_approximation(), and scalar_mul().
|
noexcept |
Definition at line 479 of file fast_float.h.
Referenced by parse_number_string().
|
noexcept |
Definition at line 531 of file fast_float.h.
References is_made_of_eight_digits_fast(), and read_u64().
|
noexcept |
Definition at line 526 of file fast_float.h.
Referenced by is_made_of_eight_digits_fast(), and parse_number_string().
|
noexcept |
Definition at line 2618 of file fast_float.h.
References is_truncated().
|
noexcept |
Definition at line 2599 of file fast_float.h.
Referenced by is_truncated(), and parse_mantissa().
|
noexcept |
Definition at line 1912 of file fast_float.h.
References large_add_from().
|
noexcept |
Definition at line 1882 of file fast_float.h.
References FASTFLOAT_TRY, scalar_add(), and small_add_from().
Referenced by large_add_from(), and long_mul().
Definition at line 1946 of file fast_float.h.
References FASTFLOAT_TRY, long_mul(), and small_mul().
Referenced by fast_float::bigint::pow5().
| fastfloat_really_inline int fast_float::leading_zeroes | ( | uint64_t | input_num | ) |
Definition at line 232 of file fast_float.h.
Referenced by compute_error(), compute_float(), fast_float::bigint::ctlz(), and uint64_hi64().
Definition at line 1918 of file fast_float.h.
References fast_float::stackvec< size >::data, FASTFLOAT_TRY, large_add_from(), fast_float::stackvec< size >::len(), fast_float::stackvec< size >::set_len(), small_mul(), and fast_float::stackvec< size >::try_extend().
Referenced by large_mul().
|
inlinenoexcept |
Definition at line 2755 of file fast_float.h.
References _, fast_float::bigint::compare(), FASTFLOAT_ASSERT, fast_float::adjusted_mantissa::mantissa, fast_float::bigint::pow2(), fast_float::bigint::pow5(), fast_float::adjusted_mantissa::power2, round_down(), round_nearest_tie_even(), to_extended_halfway(), and to_float().
|
noexcept |
Definition at line 2623 of file fast_float.h.
References parse_eight_digits_unrolled().
Referenced by parse_mantissa().
|
noexcept |
Definition at line 521 of file fast_float.h.
References parse_eight_digits_unrolled(), and read_u64().
| fastfloat_really_inline uint32_t fast_float::parse_eight_digits_unrolled | ( | uint64_t | val | ) |
Definition at line 511 of file fast_float.h.
Referenced by parse_eight_digits(), parse_eight_digits_unrolled(), and parse_number_string().
|
inlinenoexcept |
Definition at line 2652 of file fast_float.h.
References add_native(), is_truncated(), parse_eight_digits(), parse_one_digit(), powers_of_ten_uint64, round_up_bigint(), and skip_zeros().
Referenced by digit_comp().
|
noexcept |
Definition at line 552 of file fast_float.h.
References fast_float::parsed_number_string::exponent, fixed, fast_float::parsed_number_string::fraction, fast_float::parsed_number_string::integer, is_integer(), is_made_of_eight_digits_fast(), fast_float::parsed_number_string::lastmatch, fast_float::span< T >::len(), fast_float::parsed_number_string::mantissa, fast_float::parsed_number_string::negative, parse_eight_digits_unrolled(), fast_float::span< T >::ptr, scientific, fast_float::parsed_number_string::too_many_digits, and fast_float::parsed_number_string::valid.
Referenced by from_chars_advanced().
|
noexcept |
Definition at line 2631 of file fast_float.h.
Referenced by parse_mantissa().
|
inlinenoexcept |
Definition at line 2732 of file fast_float.h.
References FASTFLOAT_ASSERT, fast_float::adjusted_mantissa::mantissa, fast_float::binary_format< T >::mantissa_explicit_bits(), fast_float::binary_format< T >::minimum_exponent(), fast_float::adjusted_mantissa::power2, and round_nearest_tie_even().
| fastfloat_really_inline uint64_t fast_float::read_u64 | ( | const char * | chars | ) |
Definition at line 492 of file fast_float.h.
References byteswap().
Referenced by is_made_of_eight_digits_fast(), and parse_eight_digits_unrolled().
|
noexcept |
Definition at line 2512 of file fast_float.h.
References fast_float::binary_format< T >::infinite_power(), fast_float::binary_format< T >::mantissa_explicit_bits(), and min().
Referenced by EBUR128::AddBlockToHistogram(), DynamicRangeProcessorEditor::AddTextboxAndSlider(), ProjectAudioManager::DoRecord(), BrushHandle::Drag(), anonymous_namespace{AudacityMirProject.cpp}::FormatTempo(), ProjectManager::GetEstimatedRecordingMinsLeftOnDisk(), anonymous_namespace{StaffPadTimeAndPitch.cpp}::GetFftSize(), MIR::anonymous_namespace{StftFrameProvider.cpp}::GetFrameSize(), MIR::anonymous_namespace{StftFrameProvider.cpp}::GetHopSize(), MIR::anonymous_namespace{MirDsp.cpp}::GetMovingAverage(), MIR::StftFrameProvider::GetNextFrame(), MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::GetOnsetLag(), anonymous_namespace{ClipPitchAndSpeedButtonHandle.cpp}::GetPlaybackSpeedText(), MIR::anonymous_namespace{GetMeterUsingTatumQuantizationFit.cpp}::GetPossibleDivHierarchies(), MIR::GetProjectSyncInfo(), anonymous_namespace{WaveChannelUtilities.cpp}::GetSampleAccessArgs(), WaveDataCache::InitializeElement(), EBUR128::IntegrativeLoudness(), LibImportExport::Test::LibsndfileTagger::LibsndfileTagger(), anonymous_namespace{DynamicRangeProcessorEditor.cpp}::MapExponentially(), RegenerateLinearDBValues(), WaveChannelUtilities::SetFloatsWithinTimeRange(), BeatsFormat::SetLabelString(), WaveClip::SnapToTrackSample(), anonymous_namespace{SnapUtils.cpp}::SnapWithMultiplier(), DynamicRangeProcessorEditor::UpdateUI(), and anonymous_namespace{ParsedNumericConverterFormatter.cpp}::ParsedNumericConverterFormatter::ValueToString().
|
noexcept |
Definition at line 2571 of file fast_float.h.
Referenced by negative_digit_comp().
|
noexcept |
Definition at line 2542 of file fast_float.h.
Referenced by negative_digit_comp(), and positive_digit_comp().
|
noexcept |
Definition at line 2644 of file fast_float.h.
References add_native().
Referenced by parse_mantissa().
|
noexcept |
Definition at line 1799 of file fast_float.h.
Referenced by large_add_from(), scalar_mul(), and small_add_from().
|
noexcept |
Definition at line 1818 of file fast_float.h.
References full_multiplication(), limb_bits, and scalar_add().
Referenced by small_mul().
|
noexcept |
Definition at line 2438 of file fast_float.h.
Referenced by digit_comp().
|
noexcept |
Definition at line 2580 of file fast_float.h.
Referenced by parse_mantissa().
|
noexcept |
Definition at line 1862 of file fast_float.h.
References small_add_from().
Referenced by fast_float::bigint::add().
|
inlinenoexcept |
Definition at line 1845 of file fast_float.h.
References FASTFLOAT_TRY, and scalar_add().
Referenced by large_add_from(), and small_add().
|
inlinenoexcept |
Definition at line 1868 of file fast_float.h.
References FASTFLOAT_TRY, and scalar_mul().
Referenced by large_mul(), long_mul(), fast_float::bigint::mul(), and fast_float::bigint::pow5().
|
noexcept |
Definition at line 2458 of file fast_float.h.
References fast_float::adjusted_mantissa::mantissa, fast_float::binary_format< T >::mantissa_explicit_bits(), fast_float::binary_format< T >::minimum_exponent(), and fast_float::adjusted_mantissa::power2.
Referenced by to_extended_halfway().
|
noexcept |
Definition at line 2502 of file fast_float.h.
References fast_float::adjusted_mantissa::mantissa, fast_float::adjusted_mantissa::power2, and to_extended().
Referenced by negative_digit_comp().
| fastfloat_really_inline void fast_float::to_float | ( | bool | negative, |
| adjusted_mantissa | am, | ||
| T & | value | ||
| ) |
Definition at line 444 of file fast_float.h.
References fast_float::adjusted_mantissa::mantissa, fast_float::binary_format< T >::mantissa_explicit_bits(), fast_float::adjusted_mantissa::power2, and fast_float::binary_format< T >::sign_index().
Referenced by from_chars_advanced(), and negative_digit_comp().
|
noexcept |
Definition at line 1775 of file fast_float.h.
References uint64_hi64().
Referenced by fast_float::bigint::hi64().
|
noexcept |
Definition at line 1780 of file fast_float.h.
References uint64_hi64().
|
noexcept |
Definition at line 1787 of file fast_float.h.
References uint64_hi64().
|
noexcept |
Definition at line 1755 of file fast_float.h.
References leading_zeroes().
Referenced by fast_float::bigint::hi64(), and uint32_hi64().
|
noexcept |
Definition at line 1762 of file fast_float.h.
References leading_zeroes().
| fastfloat_really_inline void fast_float::write_u64 | ( | uint8_t * | chars, |
| uint64_t | val | ||
| ) |
Definition at line 502 of file fast_float.h.
References byteswap().
|
constexpr |
Definition at line 1626 of file fast_float.h.
|
constexpr |
Definition at line 1627 of file fast_float.h.
|
staticconstexpr |
Definition at line 314 of file fast_float.h.
Referenced by compute_error_scaled(), and digit_comp().
|
constexpr |
Definition at line 1617 of file fast_float.h.
Referenced by fast_float::bigint::bit_length(), scalar_mul(), fast_float::bigint::shl(), and fast_float::bigint::shl_bits().
|
staticconstexpr |
Definition at line 316 of file fast_float.h.
Referenced by fast_float::binary_format< T >::exact_power_of_ten().
|
staticconstexpr |
Definition at line 319 of file fast_float.h.
Referenced by fast_float::binary_format< T >::exact_power_of_ten().
|
staticconstexpr |
Definition at line 2428 of file fast_float.h.
Referenced by parse_mantissa().