#Factor, (削除) 120 (削除ここまで) 113 bytes
Factor, (削除) 120 (削除ここまで) 113 bytes
I've spent class golfing this and I can't get it shorter.
Translation of: Julia.
[ [a,b] dup append 2 <combinations> [ members ] keep [ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f ]
Example runs on the first 5 test cases (a value of 1000 causes it to freeze the editor, and I can't be bothered to compile an executable right now):
! with floating point division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
! with rational division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
{ 1 3/4 11/16 63/100 6087/10000 }
#Factor, (削除) 120 (削除ここまで) 113 bytes
I've spent class golfing this and I can't get it shorter.
Translation of: Julia.
[ [a,b] dup append 2 <combinations> [ members ] keep [ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f ]
Example runs on the first 5 test cases (a value of 1000 causes it to freeze the editor, and I can't be bothered to compile an executable right now):
! with floating point division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
! with rational division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
{ 1 3/4 11/16 63/100 6087/10000 }
Factor, (削除) 120 (削除ここまで) 113 bytes
I've spent class golfing this and I can't get it shorter.
Translation of: Julia.
[ [a,b] dup append 2 <combinations> [ members ] keep [ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f ]
Example runs on the first 5 test cases (a value of 1000 causes it to freeze the editor, and I can't be bothered to compile an executable right now):
! with floating point division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
! with rational division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
{ 1 3/4 11/16 63/100 6087/10000 }
#Factor, (削除) 120 (削除ここまで) 113 bytes
I've spent class golfing this and I can't get it shorter.
[ [a,b] dup append 2 <combinations> [ members ] keep [ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f ]
Example runs on the first 5 test cases (a value of 1000 causes it to freeze the editor, and I can't be bothered to compile an executable right now):
! with floating point division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
! with rational division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
{ 1 3/4 11/16 63/100 6087/10000 }
#Factor, (削除) 120 (削除ここまで) 113 bytes
I've spent class golfing this and I can't get it shorter.
Translation of: Julia.
[ [a,b] dup append 2 <combinations> [ members ] keep [ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f ]
Example runs on the first 5 test cases (a value of 1000 causes it to freeze the editor, and I can't be bothered to compile an executable right now):
! with floating point division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
! with rational division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
{ 1 3/4 11/16 63/100 6087/10000 }
#Factor, (削除) 120 (削除ここまで) 113 bytes
I've spent class golfing this and I can't get it shorter.
Translation of: Julia.
[ [a,b] dup append 2 <combinations> [ members ] keep [ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f ]
Example runs on the first 5 test cases (a value of 1000 causes it to freeze the editor, and I can't be bothered to compile an executable right now):
! with floating point division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
! with rational division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
{ 1 3/4 11/16 63/100 6087/10000 }
#Factor,(削除) 120 (削除ここまで) 113 bytes
I've spent class golfing this and I can't get it shorter.
Translation of: Julia.
[ [a,b] dup append 2 <combinations> [ members ] keep [ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f ]
Example runs on the first 5 test cases (a value of 1000 causes it to freeze the editor, and I can't be bothered to compile an executable right now):
! with floating point division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
! with rational division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
{ 1 3/4 11/16 63/100 6087/10000 }
#Factor, 113 bytes
I've spent class golfing this and I can't get it shorter.
Translation of: Julia.
[ [a,b] dup append 2 <combinations> [ members ] keep [ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f ]
Example runs on the first 5 test cases (a value of 1000 causes it to freeze the editor, and I can't be bothered to compile an executable right now):
! with floating point division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
! with rational division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
{ 1 3/4 11/16 63/100 6087/10000 }
#Factor,(削除) 120 (削除ここまで) 113 bytes
I've spent class golfing this and I can't get it shorter.
Translation of: Julia.
[ [a,b] dup append 2 <combinations> [ members ] keep [ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f ]
Example runs on the first 5 test cases (a value of 1000 causes it to freeze the editor, and I can't be bothered to compile an executable right now):
! with floating point division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /f
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
! with rational division
IN: scratchpad auto-use {
1
2
4
10
100
}
[
[1,b] dup append 2 <combinations> [ members ] keep
[ first2 coprime? ] filter [ length ] bi@ 2 /i 1 + swap /
]
map
--- Data stack:
{ 1.0 0.75 0.6875 0.63 0.6087 }
{ 1 3/4 11/16 63/100 6087/10000 }