JSFiddle - React, Tailwind, and code Playground

JavaScript

//bounds of correctness Math.floor(x)

9007199254740992 //Math.pow(2,53)
9007199254740991 //Number.MAX_SAFE_INTEGER
-9007199254740991 //Number.MIN_SAFE_INTEGER

9007199254740993 == 9007199254740992
9007199254740993.1 == 9007199254740994
//there is no 9007199254740993
9007199254740993+Number.EPSILON == 9007199254740992
9007199254740993+0.1 == 9007199254740992
//addition change result
//so not using Number.EPSILON

Math.floor(9007199254740993) == 9007199254740992
//must be -9007199254740993
Math.floor(9007199254740992.9) == 9007199254740992

Math.floor(-9007199254740992) == -9007199254740992
Math.floor(-9007199254740992.1) == -9007199254740992
//must be -9007199254740993

//-9007199254740992<=x<9007199254740993