Skip to main content
Commonmark migration
Source Link

#APL(NARS), 49 chars, 98 bytes

APL(NARS), 49 chars, 98 bytes

{k←1.9208⋄(2+n÷k)÷⍨(1+⍺÷k)+¯1 1×√1+2×⍺×⍵÷k×n←⍺+⍵} 

test

 f←{k←1.9208⋄(2+n÷k)÷⍨(1+⍺÷k)+¯1 1×√1+2×⍺×⍵÷k×n←⍺+⍵} 25 f 75 0.17545094 0.3430464637 0 f 1 0 0.7934567085 1 f 0 0.2065432915 1 

#APL(NARS), 49 chars, 98 bytes

{k←1.9208⋄(2+n÷k)÷⍨(1+⍺÷k)+¯1 1×√1+2×⍺×⍵÷k×n←⍺+⍵} 

test

 f←{k←1.9208⋄(2+n÷k)÷⍨(1+⍺÷k)+¯1 1×√1+2×⍺×⍵÷k×n←⍺+⍵} 25 f 75 0.17545094 0.3430464637 0 f 1 0 0.7934567085 1 f 0 0.2065432915 1 

APL(NARS), 49 chars, 98 bytes

{k←1.9208⋄(2+n÷k)÷⍨(1+⍺÷k)+¯1 1×√1+2×⍺×⍵÷k×n←⍺+⍵} 

test

 f←{k←1.9208⋄(2+n÷k)÷⍨(1+⍺÷k)+¯1 1×√1+2×⍺×⍵÷k×n←⍺+⍵} 25 f 75 0.17545094 0.3430464637 0 f 1 0 0.7934567085 1 f 0 0.2065432915 1 
deleted 11 characters in body
Source Link
user58988
user58988

#APL(NARS), 5449 chars, 10898 bytes

{q←z×z←1k←1.96⋄h←z×√(⍺×⍵÷n←⍺+⍵)+q÷4⋄9208⋄(n+q2+n÷k)÷⍨(⍺+q÷2)+(-h1+⍺÷k)h+¯1 1×√1+2×⍺×⍵÷k×n←⍺+⍵} 

test:

 f←{q←z×z←1k←1.96⋄h←z×√(⍺×⍵÷n←⍺+⍵)+q÷4⋄9208⋄(n+q2+n÷k)÷⍨(⍺+q÷2)+(-h1+⍺÷k)h+¯1 1×√1+2×⍺×⍵÷k×n←⍺+⍵} 025 f 175 0.17545094 0.79345670853430464637 250 f 751 0.17545094 0.34304646377934567085 1 f 0 0.2065432915 1  

#APL(NARS), 54 chars, 108 bytes

{q←z×z←1.96⋄h←z×√(⍺×⍵÷n←⍺+⍵)+q÷4⋄(n+q)÷⍨(⍺+q÷2)+(-h)h} 

test:

 f←{q←z×z←1.96⋄h←z×√(⍺×⍵÷n←⍺+⍵)+q÷4⋄(n+q)÷⍨(⍺+q÷2)+(-h)h} 0 f 1 0 0.7934567085 25 f 75 0.17545094 0.3430464637 1 f 0 0.2065432915 1 

#APL(NARS), 49 chars, 98 bytes

{k←1.9208⋄(2+n÷k)÷⍨(1+⍺÷k)+¯1 1×√1+2×⍺×⍵÷k×n←⍺+⍵} 

test

 f←{k←1.9208⋄(2+n÷k)÷⍨(1+⍺÷k)+¯1 1×√1+2×⍺×⍵÷k×n←⍺+⍵} 25 f 75 0.17545094 0.3430464637 0 f 1 0 0.7934567085 1 f 0 0.2065432915 1  
deleted 1 character in body
Source Link
user58988
user58988

#APL(NARS), 5754 chars, 114 byte108 bytes

{n←⍺+⍵⋄q←z×z←1q←z×z←1.96⋄h←z×√(⍺×⍵÷n⍺×⍵÷n←⍺+⍵)+q÷4⋄(n+q)÷⍨(⍺+q÷2)+(-h) h} 

test:

  f←{n←⍺+⍵⋄q←z×z←1q←z×z←1.96⋄h←z×√(⍺×⍵÷n⍺×⍵÷n←⍺+⍵)+q÷4⋄(n+q)÷⍨(⍺+q÷2)+(-h) h} 0 f 1 0 0.7934567085 125 f 075 0.206543291517545094 10.3430464637 251 f 75 0.17545094   0.34304646372065432915 1 

#APL(NARS), 57 chars, 114 byte

{n←⍺+⍵⋄q←z×z←1.96⋄h←z×√(⍺×⍵÷n)+q÷4⋄(n+q)÷⍨(⍺+q÷2)+(-h) h} 

test:

 f←{n←⍺+⍵⋄q←z×z←1.96⋄h←z×√(⍺×⍵÷n)+q÷4⋄(n+q)÷⍨(⍺+q÷2)+(-h) h} 0 f 1 0 0.7934567085 1 f 0 0.2065432915 1 25 f 75 0.17545094 0.3430464637 

#APL(NARS), 54 chars, 108 bytes

{q←z×z←1.96⋄h←z×√(⍺×⍵÷n←⍺+⍵)+q÷4⋄(n+q)÷⍨(⍺+q÷2)+(-h)h} 

test:

  f←{q←z×z←1.96⋄h←z×√(⍺×⍵÷n←⍺+⍵)+q÷4⋄(n+q)÷⍨(⍺+q÷2)+(-h)h} 0 f 1 0 0.7934567085 25 f 75 0.17545094 0.3430464637 1 f 0  0.2065432915 1 
Source Link
user58988
user58988
Loading