mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
8483064b59
This is a set of functions that allow you to convert between arbitrary IEEE 754 floating point types, as long as they can be represented within 64 bits. Conversion methods between floats and doubles are provided, as well as a generic `float_to_float()`. Example usage: #include <AK/FloatingPoint.h> double val = 1.234; auto weird_f16 = convert_from_native_double<FloatingPointBits<0, 6, 10>>(val); Signed and unsigned floats are supported, and both NaN and +/-Inf are handled correctly. Values that do not fit in the target floating point type are clamped.
82 lines
1.8 KiB
CMake
82 lines
1.8 KiB
CMake
set(AK_TEST_SOURCES
|
|
TestFixedPoint.cpp
|
|
TestAllOf.cpp
|
|
TestAnyOf.cpp
|
|
TestArbitrarySizedEnum.cpp
|
|
TestArray.cpp
|
|
TestAtomic.cpp
|
|
TestBadge.cpp
|
|
TestBase64.cpp
|
|
TestBinaryHeap.cpp
|
|
TestBinarySearch.cpp
|
|
TestBitCast.cpp
|
|
TestBitmap.cpp
|
|
TestBuiltinWrappers.cpp
|
|
TestByteBuffer.cpp
|
|
TestCharacterTypes.cpp
|
|
TestChecked.cpp
|
|
TestCircularDeque.cpp
|
|
TestCircularDuplexStream.cpp
|
|
TestCircularQueue.cpp
|
|
TestComplex.cpp
|
|
TestDisjointChunks.cpp
|
|
TestDistinctNumeric.cpp
|
|
TestDoublyLinkedList.cpp
|
|
TestEndian.cpp
|
|
TestEnumBits.cpp
|
|
TestFind.cpp
|
|
TestFixedArray.cpp
|
|
TestFloatingPoint.cpp
|
|
TestFormat.cpp
|
|
TestGenericLexer.cpp
|
|
TestHashFunctions.cpp
|
|
TestHashMap.cpp
|
|
TestHashTable.cpp
|
|
TestHex.cpp
|
|
TestIPv4Address.cpp
|
|
TestIPv6Address.cpp
|
|
TestIndexSequence.cpp
|
|
TestIntegerMath.cpp
|
|
TestIntrusiveList.cpp
|
|
TestIntrusiveRedBlackTree.cpp
|
|
TestJSON.cpp
|
|
TestLEB128.cpp
|
|
TestLexicalPath.cpp
|
|
TestMACAddress.cpp
|
|
TestMemory.cpp
|
|
TestMemoryStream.cpp
|
|
TestNeverDestroyed.cpp
|
|
TestNonnullRefPtr.cpp
|
|
TestNumberFormat.cpp
|
|
TestOptional.cpp
|
|
TestPrint.cpp
|
|
TestQueue.cpp
|
|
TestQuickSort.cpp
|
|
TestRedBlackTree.cpp
|
|
TestRefPtr.cpp
|
|
TestSinglyLinkedList.cpp
|
|
TestSourceGenerator.cpp
|
|
TestSourceLocation.cpp
|
|
TestSpan.cpp
|
|
TestStack.cpp
|
|
TestStdLibExtras.cpp
|
|
TestString.cpp
|
|
TestStringUtils.cpp
|
|
TestStringView.cpp
|
|
TestTime.cpp
|
|
TestTrie.cpp
|
|
TestTuple.cpp
|
|
TestTypeTraits.cpp
|
|
TestTypedTransfer.cpp
|
|
TestUFixedBigInt.cpp
|
|
TestURL.cpp
|
|
TestUtf16.cpp
|
|
TestUtf8.cpp
|
|
TestVariant.cpp
|
|
TestVector.cpp
|
|
TestWeakPtr.cpp
|
|
)
|
|
|
|
foreach(source IN LISTS AK_TEST_SOURCES)
|
|
serenity_test("${source}" AK)
|
|
endforeach()
|