Timeline for answer to Ptolemy's table of chords by The Thonnu
Current License: CC BY-SA 4.0
Post Revisions
27 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 13, 2023 at 17:44 | comment | added | Neil |
@xnor Heh, your previous version calculated x%3600%60, fortunately your 147-byte version simplifies that.
|
|
| Feb 13, 2023 at 11:48 | comment | added | The Thonnu | @xnor no way, I didn't think it could be golfed even more! | |
| Feb 13, 2023 at 11:47 | history | edited | The Thonnu | CC BY-SA 4.0 |
Saved 19 bytes
|
| Feb 13, 2023 at 11:45 | comment | added | xnor | 147 bytes | |
| Feb 13, 2023 at 11:02 | history | edited | The Thonnu | CC BY-SA 4.0 |
Added full history of bytecounts
|
| Feb 13, 2023 at 10:57 | comment | added | The Thonnu | @xnor thanks, updated | |
| Feb 13, 2023 at 10:57 | history | edited | The Thonnu | CC BY-SA 4.0 |
Saved 14 bytes
|
| Feb 13, 2023 at 10:53 | comment | added | xnor |
It looks like you can simplify f quite a bit using %.
|
|
| Feb 12, 2023 at 20:42 | comment | added | The Thonnu | @pan thanks, updated | |
| Feb 12, 2023 at 20:42 | history | edited | The Thonnu | CC BY-SA 4.0 |
Saved 8 bytes
|
| Feb 12, 2023 at 20:41 | comment | added | pan |
180 bytes by omitting some parentheses and replacing radians(x/2) with pi/360*x.
|
|
| Feb 12, 2023 at 20:10 | history | edited | The Thonnu | CC BY-SA 4.0 |
Saved 2 bytes
|
| Feb 12, 2023 at 18:33 | comment | added | Neil |
j=0 and while j<180:j+=.5; saves another two bytes.
|
|
| Feb 12, 2023 at 18:26 | comment | added | The Thonnu | @Neil oh yes, thanks | |
| Feb 12, 2023 at 18:25 | history | edited | The Thonnu | CC BY-SA 4.0 |
Saved 16 bytes
|
| Feb 12, 2023 at 18:00 | comment | added | Neil |
Sorry I wasn't clear last time but f((k:=round((g(j+.5)-g(j))*2))>0and k or 0) can be f(round(max(g(j+.5)-g(j),0)*2)) as well.
|
|
| Feb 12, 2023 at 15:02 | comment | added | The Thonnu | @Neil thanks, updated. | |
| Feb 12, 2023 at 14:59 | history | edited | The Thonnu | CC BY-SA 4.0 |
Saved 2 bytes
|
| Feb 12, 2023 at 14:52 | comment | added | Neil |
I think you can write g=lambda x:120*sin(radians(x/2))*a and then the last line can be golfed to end print(j,f(round(g(j))),f(round(max(g(j+.5)-g(j),0)*2))).
|
|
| Feb 12, 2023 at 14:33 | history | edited | The Thonnu | CC BY-SA 4.0 |
Fix
|
| Feb 12, 2023 at 14:26 | history | edited | The Thonnu | CC BY-SA 4.0 |
Saved 11 bytes
|
| Feb 12, 2023 at 14:21 | comment | added | The Thonnu |
@Neil I've rewritten the f function to only handle integers. Does this look fine now?
|
|
| Feb 12, 2023 at 14:20 | history | edited | The Thonnu | CC BY-SA 4.0 |
Fix
|
| Feb 12, 2023 at 13:54 | comment | added | Neil | Actually that was just one example; there are still five other cases. | |
| Feb 12, 2023 at 13:03 | history | edited | The Thonnu | CC BY-SA 4.0 |
Fix
|
| Feb 12, 2023 at 10:58 | comment | added | Neil |
I'm pretty sure 60.0 should be [60, 0, 0], not [59, 59, 60].
|
|
| Feb 12, 2023 at 10:26 | history | answered | The Thonnu | CC BY-SA 4.0 |