Results
About dogduck.com
Welcome to dogduck.com — a powerful tool designed for professionals who need to approximate decimal numbers using mathematical expressions. Whether you're exploring mathematical constants, verifying formulas, or simply curious about elegant expressions, this tool will find a simple mathematical expression equal to your target value.
How to Use
1. Enter Your Target Number
Input the decimal number you want to approximate. This could be any number you're curious about. Enter at least 3 decimal numbers after the comma, to ensure the program finds an accurate expression. The program automatically determines the search margin based on the amount of decimals you give it. For example, if your number is 1.618, the margin will automatically be set to 0.001.
2. Choose Thinking Time
Select how long the program should search for expressions:
- Very Short: Quick results
- Short: Balanced speed and quality
- Medium: More thorough search
- Long: Extensive search for elegant expressions
- Very Long: Maximum effort for the simplest possible result
Note: The program always returns a value within your specified margin, regardless of thinking time.
3. Advanced Options (Optional)
Click "More options" to access advanced settings:
- Margin Mode: Choose between
± margin(symmetric) or+ margin(one-sided precision). Use+ marginif you want all your inputed decimals to be matched. - Allowed Operations: Select which mathematical operations and symbols the program may use. For example, if you want to find an expression π, you might want to unselect π itself and the trigonometric functions.
- Depth & Loops: Fine-tune computational parameters
- Computational time grows approximately as loopsdepth
- Batch Size: Control processing speed (automatic if set to 0)
- Show Search Time: Display how long the search took
4. Find Expression
Click "Find Expression" to start the search. The tool will process your request and display the best expression within you margin. For example if your number is 1.618, and ± margin is selected, the program will search for an expression between the intevals 1.617 and 1.619.
You can stop the search at any time by clicking "Stop" — the best result found so far will be displayed.
Understanding Results
The program displays the least complex expression found, along with its calculated value.
Complexity Definition
An expression's complexity is determined by an algorithm that considers:
- Number of operations used
- Size of numbers in the expression
- Types of operations involved (simpler operations = lower complexity)
The goal is to find the simplest and most elegant expression that matches your target within the specified margin.
Examples of How to Use
Example 1: The Golden Ratio
Input: 1.618033
Thinking Time: Very short
Result: (1+√5)/2
This is one of the most famous mathematical constants - the golden ratio φ (phi).
Example 2: Pi Approximation
Input: 3.14159
Thinking Time: Medium
Advanced Options: Click "More options" and unmark π, sin, cos, tan, asin, acos, and atan
Result: 16/113+3
By blocking trigonometric functions and π itself, the program finds alternative ways to approximate this famous constant.
Example 3: Euler's Number
Input: 2.71828
Thinking Time: Long
Advanced Options: Unmark e, e^x and ln and choose + margin to get the las decimal correct
Result: 3-√(5/63)
Finding Euler's number without using e directly shows how the program can discover creative expressions.
Example 4: Square Root of 2
Input: 1.41421356
Thinking Time: Very Short
Result: √2
Simple constants are recognized quickly even with minimal thinking time.
Example 5: Custom Number
Input: 0.57721566
Thinking Time: Very long
Result: 3-sin(1)^(4*(e-4))
Some constants don't have known simple closed-form expressions - the program will find a simple available approximation. In this, case the resulting expression match with the input digits, but is not an exact expression for the Euler-Mascheroni constant γ.
Example 6: Custom Advanced Search
Input: 7.41221376523
Advanced Options: Set Depth to 2 and Loops to 500
Result: ln(45) + √13
By manually adjusting depth and loops, you can control the search more precisely. Higher loop values explore more constants, potentially finding more elegant expressions.
Tip: Start with shorter thinking times and gradually increase if you want simpler expressions. Use "More options" to fine-tune the search for your specific needs.
Note: The calculations and the print-outs in this program is made using f64 precision.