diff --git a/packages/llmRunner/src/app/api/create/route.ts b/packages/llmRunner/src/app/api/create/route.ts index 55c400fac8..b82e940f4e 100644 --- a/packages/llmRunner/src/app/api/create/route.ts +++ b/packages/llmRunner/src/app/api/create/route.ts @@ -5,7 +5,7 @@ import { SquiggleResponse, } from "../../utils/squiggleTypes"; -export const maxDuration = 500; +export const maxDuration = 300; export async function POST(req: Request) { const abortController = new AbortController(); diff --git a/packages/squiggle-lang/__tests__/utility/FormattedNumber_test.ts b/packages/squiggle-lang/__tests__/utility/FormattedNumber_test.ts index 40ed385ded..b1579a0937 100644 --- a/packages/squiggle-lang/__tests__/utility/FormattedNumber_test.ts +++ b/packages/squiggle-lang/__tests__/utility/FormattedNumber_test.ts @@ -6,9 +6,11 @@ import { describe("FormattedNumber", () => { const makeTestCases: [number, ReturnType][] = [ + [0.01, { type: "basic", value: "0.01", isNegative: false }], [123.45, { type: "basic", value: "120", isNegative: false }], [-123.45, { type: "basic", value: "120", isNegative: true }], [1234, { type: "basic", value: "1200", isNegative: false }], + [1000, { type: "basic", value: "1000", isNegative: false }], [ 1234567, { type: "unit", mantissa: "1.2", symbol: "M", isNegative: false }, diff --git a/packages/squiggle-lang/__tests__/utility/compactTreeString_test.ts b/packages/squiggle-lang/__tests__/utility/compactTreeString_test.ts index b4c6df349b..2c6215c73d 100644 --- a/packages/squiggle-lang/__tests__/utility/compactTreeString_test.ts +++ b/packages/squiggle-lang/__tests__/utility/compactTreeString_test.ts @@ -87,7 +87,7 @@ describe("compactTreeString", () => { }, y: { vType: "SampleSetDist", - samples: [10400, 6830, 5280, 7700, ...1000 total], + samples: [1.04e4, 6830, 5280, 7700, ...1000 total], summary: { mean: ..., p5: ..., diff --git a/packages/squiggle-lang/src/utility/FormattedNumber.ts b/packages/squiggle-lang/src/utility/FormattedNumber.ts index e7b6e460bd..2af36206ad 100644 --- a/packages/squiggle-lang/src/utility/FormattedNumber.ts +++ b/packages/squiggle-lang/src/utility/FormattedNumber.ts @@ -64,7 +64,7 @@ export const makeFormattedNumber = ( const magnitude = calculateOrderOfMagnitude(absNumber); - if (magnitude > -2 && magnitude < 5) { + if (magnitude > -3 && magnitude < 4) { return { type: "basic", value: formatNumberWithScale(absNumber, 0, precision),