All MicroEvals
# AI Model Benchmarking Challenge: Calculate Pi to 1,000 Dec...
Create MicroEval

# AI Model Benchmarking Challenge: Calculate Pi to 1,000 Dec...

Prompt

# AI Model Benchmarking Challenge: Calculate Pi to 1,000 Decimal Places You are participating in a programming performance benchmark. Your task is to calculate the mathematical constant **π (Pi) to exactly 1,000 digits after the decimal point**. ## 1. Objective Write the most efficient, accurate and optimized code possible to calculate Pi to 1,000 decimal places. ## 2. Technical Requirements 1. Use an efficient mathematical algorithm suitable for high-precision computation (e.g., Chudnovsky algorithm or an equivalent approach). 2. Do not hardcode or copy a pre-existing value of Pi. 3. Do not retrieve Pi from an external API, website, database or precomputed constant. 4. The code must genuinely calculate Pi at runtime. 5. Ensure the output contains exactly 1,000 digits after the decimal point. 6. Use appropriate arbitrary-precision arithmetic rather than standard floating-point arithmetic. 7. Write clean, production-quality and computationally efficient code. 8. Include all necessary imports and dependencies. ## 3. Performance Benchmarking Measure the actual execution time required to calculate Pi. Your code must: - Record the start time immediately before the computation begins. - Record the end time immediately after the computation finishes. - Calculate execution time in milliseconds and seconds. - Exclude package installation, environment setup and unrelated operations from the measured computation time. - Avoid including printing or formatting time in the computation measurement. - Use a high-resolution timer wherever supported. ## 4. Output Requirements Present the following results: **A. Calculated Result** - Display Pi to exactly 1,000 decimal places. - Confirm that the result contains exactly 1,000 digits after the decimal point. **B. Performance Metrics** - Algorithm used. - Programming language and version. - Execution time in milliseconds. - Execution time in seconds. - Precision library used, if applicable. **C. Verification** - Independently verify the calculated result against a trusted mathematical reference or an independent high-precision computation. - Confirm that all 1,000 decimal digits match. - Report PASS or FAIL. ## 5. Code Delivery Provide: 1. Complete executable source code. 2. A brief explanation of the algorithm. 3. Actual execution-time measurements. 4. Verification results. Do not fabricate execution times or claim that code has been executed if you do not have access to an execution environment. ## 6. Benchmark Integrity The objective is to evaluate the model's ability to: - Select an appropriate mathematical algorithm. - Generate efficient and correct code. - Handle arbitrary-precision arithmetic. - Produce a verifiably accurate result. - Optimize computational performance. **Important:** Prioritize correctness first and performance second. Do not sacrifice numerical accuracy for speed.

A system prompt was added to support web rendering

Drag to resize

Response not available

Drag to resize
Drag to resize

Response not available

Drag to resize
Drag to resize