MCPcopy Create free account
hub / github.com/argotorg/solidity / fitsPrecisionBase10

Function fitsPrecisionBase10

libsolidity/ast/Types.cpp:66–70  ·  view source on GitHub ↗

Checks whether _mantissa * (10 ** _expBase10) fits into 4096 bits.

Source from the content-addressed store, hash-verified

64
65/// Checks whether _mantissa * (10 ** _expBase10) fits into 4096 bits.
66bool fitsPrecisionBase10(bigint const& _mantissa, uint32_t _expBase10)
67{
68 double const log2Of10AwayFromZero = 3.3219280948873624;
69 return fitsPrecisionBaseX(_mantissa, log2Of10AwayFromZero, _expBase10);
70}
71
72/// Checks whether _value fits into IntegerType _type.
73BoolResult fitsIntegerType(bigint const& _value, IntegerType const& _type)

Callers 1

isValidLiteralMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected