This is the cop's thread, where one should post the scrambled code. Here is the robbers' thread where the cracked source should be posted and linked to the cop's answer.
NB: I am currently writing up the edit for who won on both the Cops and Robbers forum. Any answer that is not marked as safe on the Cops thread as of April 15 will not be counted as competing, however you are still allowed to post answers, mark them as safe and crack them.
Any answer that is still not cracked or marked as safe as of April 15 will be counted as non-competing, which I have a seperate leaderboard for. (safe non-competing and competing answers)
Task: Write the shortest safe program that given two inputs \$x,y\$, outputs \$\arg(x+iy)\$, where \$\arg(z)\$ is defined as the angle between the positive real axis and the line joining the origin and \$z\$.
This is cops-and-robbers, so the rules are:
- In your answer, post a scrambled version of your source code, which should not work. (should be written in any order)
- You can take input/output in any standard way.
- Hardcoding is forbidden.
- Standard loopholes are banned.
- If your code is cracked by the robbers, you must mention that it has been cracked in your title and include a spoiler containing your exact code.
- Same thing applies for safe answers. (mention in the title that it's safe and include the spoiler)
- You must specify the programming language you used and byte count.
- Answers are considered safe after 5 days.
- You can assume that \$|x|,|y|\le5\$.
- You can also assume that \$x,y\in\mathbb Z\$
- Minimum decimal precision is 5 decimal places with any rounding mechanism of your choice.
- You must state the rounding mechanism in your answer.
- You are not allowed to return as fractions (numerator/denominators)
+-------------+
|Example cases|
+-------------+
+ - + - + -------------------------- +
| x | y | Output (10 decimal places) |
+ - + - + -------------------------- +
| 5 | 5 | 0.7853981633 |
+ - + - + -------------------------- +
| 1 | 4 | 1.3258176636 |
+ - + - + -------------------------- +
| 0 | 2 | 1.5707963267 |
+ - + - + -------------------------- +
| 0 | 0 | Undefined |
+ - + - + -------------------------- +
| -1| 0 | 3.1415926535 |
+ - + - + -------------------------- +
| 1 | 0 | 0 |
+ - + - + -------------------------- +
| -2| 1 | 2.6779450445 |
+ - + - + -------------------------- +
| -3| -4| -2.2142973355 |
+ - + - + -------------------------- +
| 2 | -5| -1.1902899496 |
+ - + - + -------------------------- +
The shortest safe answer by April 15 will be considered the winner.
Update Apr 15: It's April 15th! Time to see who the winners are!
Shortest safe (competing) answers (top 5):
1st: LdBeth |J |10 bytes|
2nd: LdBeth |J |12 bytes|
2nd: Luis Mendo |MATL |12 bytes|
4th: CrSb0001 |Mathematica|18 bytes|
5th: Greg Martin|Mathematica|46 bytes|
Shortest safe (competing and non-competing) answers (top 10):
NB: For a safe non-competing answer to qualify, it must have been posted
at the latest April 10th and still not have been cracked.
1st: LdBeth |J |10 bytes|
2nd: LdBeth |J |12 bytes|
2nd: Luis Mendo |MATL |12 bytes|
4th: CrSb0001 |Mathematica |18 bytes|
5th: math seat |Vyxal 3 |22 bytes|
6th: Greg Martin |Mathematica |46 bytes|
7th: Neil |Java (JDK) |47 bytes|
8th: att |Mathematica |50 bytes|
9th: M Virts |Python |51 bytes|
10th: Arnauld |JavaScript (NodeJS)|55 bytes|
Most "safe" languages (top 5):
NB: Counted by number of safe answers in that language. If there
is a tie, then it is sorted by the number of bytes. (increasing)
Answers that are non-competing are not counted in the total.
1st: Mathematica |3 answers|114 bytes|
2nd: J |2 answers| 22 bytes|
3rd: MATL |1 answer | 12 bytes|
4th: JavaScript (NodeJS)|1 answer | 55 bytes|
atan2
function. \$\endgroup\$0,0
? \$\endgroup\$