@@ -249,3 +249,29 @@ pathological = [
249
249
for (fn_, x0_) in pathological
250
250
find_zero (fn_, x0_, Order0 ())
251
251
end
252
+
253
+ # # issue tests: put in tests to ensure closed issues don't reappear.
254
+
255
+ # # issue #94; tolerances not matching documentation
256
+ test_94 = function (;kwargs... )
257
+ g, T = 1.62850 , 14.60000
258
+ α, t1, tf = 0.00347 , 40.91375 , 131.86573
259
+ y, ya, yf = 0.0 , 9000.0 , 10000.0
260
+ vy = sqrt (2 g* (ya- y))
261
+ θ0, θ1 = atan (α* tf), atan (α* (tf- t1))
262
+ I_sintan (x) = tan (x)/ 2 cos (x) - atanh (tan (x/ 2 ))
263
+ I_sintan (x, y) = I_sintan (y) - I_sintan (x)
264
+ function lhs (θ)
265
+ tRem = (vy - T/ α* (sec (θ1) - sec (θ))) / g
266
+ val = - yf + y + vy* tRem - 0.5 g* tRem^ 2 - T/ α^ 2 * I_sintan (θ, θ1)
267
+ val
268
+ end
269
+
270
+ meth = Roots. FalsePosition ()
271
+ prob, options = Roots. derivative_free_setup (meth, lhs, [atan (α* tf), atan (α* (tf- t1))])
272
+ state = Roots. init_state (meth, prob. fs, prob. x0, prob. bracket)
273
+ find_zero (meth, prob. fs, state, options)
274
+
275
+ @test state. steps <= 15
276
+ end
277
+ test_94 ()
0 commit comments