Axiom, 266 215 210 bytes
g(y,a,b)==(r:List Float:=[];t:=y+truncate((a-y)/360)*360;repeat(t>b=>break;if t>=a then r:=append(r,[t]);t:=t+360);r)
f(x,a,b)==(abs(x)>1 or a>b=>[];y:=asin(x)*180/%pi;z:=180-y;sort(append(g(y,a,b),g(z,a,b))))
ungolf and test
-- g/180=r/pi => r=pi*g/180
--y+k*360=a
-- a-y
-- k=------
-- 360
-- find all angles of the same class of angles [y+k*360] in interval [a,b]
gg(y,a,b)==
r:List Float:=[]
t:=y+truncate((a-y)/360)*360 --truncate(1.9)=1, truncate(-3.1)=-4 is ok
repeat
t>b=>break
if t>=a then r:=append(r,[t])
t:=t+360
r
-- ff returns the list of solution y of sin(y)=x with y in the interval [a,b]
ff(x,a,b)==
abs(x)>1 or a>b =>[]
y:=asin(x)*180/%pi -- z and y are the only 2 solutions in one 360 Len interval
z:=180-y
sort(append(gg(y,a,b),gg(z,a,b)))
(6) -> f(0.5, 0, 360)
(6) [30.0,150.0]
Type: List Float
(7) -> f(-0.2, 56, 243)
(7) [191.5369590328 1548769]
Type: List Float
(8) -> f(0.0, -1080, 1080)
(8)
[- 1080.0, - 900.0, - 720.0, - 540.0, - 360.0, - 180.0, 0.0, 180.0, 360.0,
540.0, 720.0, 900.0, 1080.0]
(14) -> m:=f(-0.1, -2035, -243)
(14)
[- 1974.2608295227 33214, - 1805.7391704772 66786, - 1614.2608295227 33214,
- 1445.7391704772 66786, - 1254.2608295227 33214, - 1085.7391704772 66786,
- 894.2608295227 332137, - 725.7391704772 667863, - 534.2608295227 332137,
- 365.7391704772 667863]
Type: List Float
(15) -> map(x+->sin(%pi*x/180), m)
(15)
[- 0.0999999999 9999999987, - 0.1000000000 0000000016,
- 0.0999999999 9999999986 2, - 0.1000000000 0000000028,
- 0.0999999999 9999999985 4, - 0.1000000000 0000000018,
- 0.0999999999 999999999, - 0.1000000000 0000000019,
- 0.0999999999 9999999989 2, - 0.1000000000 0000000014]
Type: List Float
1Maths homework this time? – Okx – 2017-05-22T12:23:01.627
@Okx Of course xD – Beta Decay – 2017-05-22T12:24:35.783
10Grrr, angular degrees are evil. – Dennis – 2017-05-22T12:45:47.153
>
@HyperNeutrino 1. No, you must stick to 3 decimal places. 2. Outputs can be in any order – Beta Decay – 2017-05-22T13:27:49.347
One can use arcsin()? – RosLuP – 2017-05-22T14:02:08.497
Can we return
1.0
instead of1.000
? – Erik the Outgolfer – 2017-05-22T14:08:45.750@mbomb007 I've fixed the examples – Beta Decay – 2017-05-22T15:42:34.727
@Uriel Not particularly – Beta Decay – 2017-05-22T19:51:22.850
1I think the 3 points precision here is ruining the challange, because it becomes a brute force instead of angles translation – Uriel – 2017-05-23T18:16:06.593
1@Uriel Huh, that's a shame. When you don't specify a challenge enough, people complain, when you specify the challenge, the challenge is a bit rubbish :P – Beta Decay – 2017-05-23T19:13:17.860
For me less is specified better it is – RosLuP – 2017-05-24T10:02:37.183