From Discord: Error using fast-check with Arbitrary created by schema: Seeking resolution and guidance
effect-bot opened this issue · comments
Summary
The user is encountering an error when using fast-check with an Arbitrary created by a schema. The error specifically mentions that the fc.float
constraint requires a 32-bit float and suggests using Math.fround(myDouble)
to convert a double to a 32-bit float. The user provided a schema for an Ease
type, which includes a clamp constraint on a number range. They also mentioned trying to use Math.fround
on the min and max values, but the error persisted.
Key takeaways:
- The error is related to the
fc.float
constraint and the requirement for a 32-bit float. - The user has a schema for an
Ease
type with a clamp constraint on a number range. - The error occurred regardless of using
Math.fround
on the min and max values. - The error message suggests using
Math.fround
to convert a double to a 32-bit float.
Discord thread
https://discord.com/channels/795981131316985866/1163050628386390169