Timeline for answer to Distance between two points on the Moon by Arnauld
Current License: CC BY-SA 3.0
Post Revisions
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | CommunityBot |
Commonmark migration
|
|
| Apr 11, 2018 at 10:31 | history | edited | Arnauld | CC BY-SA 3.0 |
added 130 characters in body
|
| Apr 11, 2018 at 8:50 | comment | added | Arnauld | @OlivierGrégoire Very nice. You probably should post it as a new answer. | |
| Apr 11, 2018 at 8:37 | comment | added | Olivier Grégoire |
65 bytes optimizing everybody's answer: (a,b,c,d,C=Math.cos)=>1737*Math.acos(C(a-c)+C(a)*C(c)*(C(d-b)-1))
|
|
| Apr 11, 2018 at 8:34 | comment | added | Kevin Cruijssen |
74 bytes using @Neil's shorter algorithm: (a,b,c,d,M=Math)=>1737*M.acos(M.cos(a-c)+M.cos(a)*M.cos(c)*(M.cos(d-b)-1))
|
|
| Apr 11, 2018 at 7:12 | comment | added | Kevin Cruijssen |
77 bytes using @miles' shorter algorithm: (a,b,c,d,M=Math)=>1737*M.acos(M.sin(a)*M.sin(c)+M.cos(a)*M.cos(c)*M.cos(d-b))
|
|
| Apr 10, 2018 at 16:36 | history | edited | Arnauld | CC BY-SA 3.0 |
saved 6 bytes on the 'with' version
|
| Apr 10, 2018 at 16:29 | comment | added | l4m2 |
You can do with(Math)f=(a,b,c,d)=>3474*asin((sin((c-a)/2)**2+cos(c)*cos(a)*sin((d-b)/2)**2)**.5)
|
|
| Apr 10, 2018 at 15:12 | history | edited | Arnauld | CC BY-SA 3.0 |
added an alternate version
|
| Apr 10, 2018 at 14:36 | history | answered | Arnauld | CC BY-SA 3.0 |