TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Return numeric edge cases

GEThttps://api.testingapis.com/api/edge-cases/numbersSign in to see this endpoint's URL

Return numeric edge cases: 64-bit limits, unsafe integers, -0 and float precision.

Integers beyond 2^53 lose precision in JavaScript; string versions are included for comparison.

Responses

200
Success.

Example

Request
curl -X GET "https://api.testingapis.com/api/edge-cases/numbers" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "zero": 0,
  "negativeZero": 0,
  "int32Max": 2147483647,
  "int32Min": -2147483648,
  "int64Max": 9223372036854775807,
  "int64MaxAsString": "9223372036854775807",
  "int64Min": -9223372036854775808,
  "maxSafeInteger": 9007199254740991,
  "beyondSafeInteger": 9007199254740993,
  "beyondSafeIntegerAsString": "9007199254740993",
  "bigInteger": 123456789012345678901234567890,
  "pointOnePlusPointTwo": 0.30000000000000004,
  "manyDecimals": 0.12345678901234568,
… (12 more lines)

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.