text:
@testset "6.3.7 (d hyper)^m (a+b (c tanh)^n)^p" begin
    (a, b, c, d, x, ) = @variables a b c d x

    #= ::Package:: =#

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*sinh(e+f*x)^m*(a+b*tanh(e+f*x)^n)^p=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*sinh(e+f*x)^m*(a+b*tanh(e+f*x)^2)^p=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [sinh(c + d*x)^4*(a + b*tanh(c + d*x)^2), x, 5, (3/8)*(a + 5*b)*x - ((5*a + 9*b)*cosh(c + d*x)*sinh(c + d*x))/(8*d) + ((a + b)*cosh(c + d*x)^3*sinh(c + d*x))/(4*d) - (b*tanh(c + d*x))/d]
    @test_int [sinh(c + d*x)^3*(a + b*tanh(c + d*x)^2), x, 3, -(((a + 2*b)*cosh(c + d*x))/d) + ((a + b)*cosh(c + d*x)^3)/(3*d) - (b*sech(c + d*x))/d]
    @test_int [sinh(c + d*x)^2*(a + b*tanh(c + d*x)^2), x, 4, (-(1/2))*(a + 3*b)*x + ((a + b)*cosh(c + d*x)*sinh(c + d*x))/(2*d) + (b*tanh(c + d*x))/d]
    @test_int [sinh(c + d*x)^1*(a + b*tanh(c + d*x)^2), x, 3, ((a + b)*cosh(c + d*x))/d + (b*sech(c + d*x))/d]
    @test_int [csch(c + d*x)^1*(a + b*tanh(c + d*x)^2), x, 3, -((a*atanh(cosh(c + d*x)))/d) - (b*sech(c + d*x))/d]
    @test_int [csch(c + d*x)^2*(a + b*tanh(c + d*x)^2), x, 3, -((a*coth(c + d*x))/d) + (b*tanh(c + d*x))/d]
    @test_int [csch(c + d*x)^3*(a + b*tanh(c + d*x)^2), x, 4, ((a - 2*b)*atanh(cosh(c + d*x)))/(2*d) - (a*coth(c + d*x)*csch(c + d*x))/(2*d) + (b*sech(c + d*x))/d]
    @test_int [csch(c + d*x)^4*(a + b*tanh(c + d*x)^2), x, 3, ((a - b)*coth(c + d*x))/d - (a*coth(c + d*x)^3)/(3*d) - (b*tanh(c + d*x))/d]

    @test_int [sinh(c + d*x)^4*(a + b*tanh(c + d*x)^2)^2, x, 6, (1/8)*(3*a^2 + 30*a*b + 35*b^2)*x - ((a + b)*(a + 9*b)*cosh(c + d*x)*sinh(c + d*x))/(8*d) - ((a^2 + 10*a*b + 13*b^2)*tanh(c + d*x))/(4*d) + ((a + b)^2*sinh(c + d*x)^4*tanh(c + d*x))/(4*d) - (b^2*tanh(c + d*x)^3)/(3*d)]
    @test_int [sinh(c + d*x)^3*(a + b*tanh(c + d*x)^2)^2, x, 3, -(((a + b)*(a + 3*b)*cosh(c + d*x))/d) + ((a + b)^2*cosh(c + d*x)^3)/(3*d) - (b*(2*a + 3*b)*sech(c + d*x))/d + (b^2*sech(c + d*x)^3)/(3*d)]
    @test_int [sinh(c + d*x)^2*(a + b*tanh(c + d*x)^2)^2, x, 5, (-(1/2))*(a + b)*(a + 5*b)*x + ((a + b)*(a + 5*b)*tanh(c + d*x))/(2*d) + ((a + b)^2*sinh(c + d*x)^2*tanh(c + d*x))/(2*d) + (b^2*tanh(c + d*x)^3)/(3*d)]
    @test_int [sinh(c + d*x)^1*(a + b*tanh(c + d*x)^2)^2, x, 3, ((a + b)^2*cosh(c + d*x))/d + (2*b*(a + b)*sech(c + d*x))/d - (b^2*sech(c + d*x)^3)/(3*d)]
    @test_int [csch(c + d*x)^1*(a + b*tanh(c + d*x)^2)^2, x, 4, -((a^2*atanh(cosh(c + d*x)))/d) - (b*(2*a + b)*sech(c + d*x))/d + (b^2*sech(c + d*x)^3)/(3*d)]
    @test_int [csch(c + d*x)^2*(a + b*tanh(c + d*x)^2)^2, x, 3, -((a^2*coth(c + d*x))/d) + (2*a*b*tanh(c + d*x))/d + (b^2*tanh(c + d*x)^3)/(3*d)]
    @test_int [csch(c + d*x)^3*(a + b*tanh(c + d*x)^2)^2, x, 5, (a*(a - 4*b)*atanh(cosh(c + d*x)))/(2*d) - (a*(a - 4*b)*sech(c + d*x))/(2*d) - (a^2*csch(c + d*x)^2*sech(c + d*x))/(2*d) - (b^2*sech(c + d*x)^3)/(3*d)]
    @test_int [csch(c + d*x)^4*(a + b*tanh(c + d*x)^2)^2, x, 3, (a*(a - 2*b)*coth(c + d*x))/d - (a^2*coth(c + d*x)^3)/(3*d) - ((2*a - b)*b*tanh(c + d*x))/d - (b^2*tanh(c + d*x)^3)/(3*d)]

    @test_int [sinh(c + d*x)^4*(a + b*tanh(c + d*x)^2)^3, x, 6, (3/8)*(a + b)*(a^2 + 14*a*b + 21*b^2)*x - (3*(a + b)*(a^2 + 14*a*b + 21*b^2)*tanh(c + d*x))/(8*d) - (b*(6*a^2 + 35*a*b + 21*b^2)*tanh(c + d*x)^3)/(8*d) - (3*b^2*(5*a + 21*b)*tanh(c + d*x)^5)/(40*d) - (3*(a + 3*b)*sinh(c + d*x)^2*tanh(c + d*x)*(a + b*tanh(c + d*x)^2)^2)/(8*d) + (cosh(c + d*x)*sinh(c + d*x)^3*(a + b*tanh(c + d*x)^2)^3)/(4*d)]
    @test_int [sinh(c + d*x)^3*(a + b*tanh(c + d*x)^2)^3, x, 3, -(((a + b)^2*(a + 4*b)*cosh(c + d*x))/d) + ((a + b)^3*cosh(c + d*x)^3)/(3*d) - (3*b*(a + b)*(a + 2*b)*sech(c + d*x))/d + (b^2*(3*a + 4*b)*sech(c + d*x)^3)/(3*d) - (b^3*sech(c + d*x)^5)/(5*d)]
    @test_int [sinh(c + d*x)^2*(a + b*tanh(c + d*x)^2)^3, x, 6, -((a + b)^2*(a + 7*b)*x)/2 + (a + b)^3/(4*d*(1 - tanh(c + d*x))) + (3*b*(a + b)^2*tanh(c + d*x))/d + (b^2*(3*a + 2*b)*tanh(c + d*x)^3)/(3*d) + (b^3*tanh(c + d*x)^5)/(5*d) - (a + b)^3/(4*d*(1 + tanh(c + d*x))), (-(1/2))*(a + b)^2*(a + 7*b)*x + (b*(81*a^2 + 190*a*b + 105*b^2)*tanh(c + d*x))/(30*d) + (b*(33*a + 35*b)*tanh(c + d*x)*(a + b*tanh(c + d*x)^2))/(30*d) + (7*b*tanh(c + d*x)*(a + b*tanh(c + d*x)^2)^2)/(10*d) + (cosh(c + d*x)*sinh(c + d*x)*(a + b*tanh(c + d*x)^2)^3)/(2*d)]
    @test_int [sinh(c + d*x)^1*(a + b*tanh(c + d*x)^2)^3, x, 3, ((a + b)^3*cosh(c + d*x))/d + (3*b*(a + b)^2*sech(c + d*x))/d - (b^2*(a + b)*sech(c + d*x)^3)/d + (b^3*sech(c + d*x)^5)/(5*d)]
    @test_int [csch(c + d*x)^1*(a + b*tanh(c + d*x)^2)^3, x, 4, -((a^3*atanh(cosh(c + d*x)))/d) - (b*(3*a^2 + 3*a*b + b^2)*sech(c + d*x))/d + (b^2*(3*a + 2*b)*sech(c + d*x)^3)/(3*d) - (b^3*sech(c + d*x)^5)/(5*d)]
    @test_int [csch(c + d*x)^2*(a + b*tanh(c + d*x)^2)^3, x, 3, -((a^3*coth(c + d*x))/d) + (3*a^2*b*tanh(c + d*x))/d + (a*b^2*tanh(c + d*x)^3)/d + (b^3*tanh(c + d*x)^5)/(5*d)]
    @test_int [csch(c + d*x)^3*(a + b*tanh(c + d*x)^2)^3, x, 6, (a^2*(a - 6*b)*atanh(cosh(c + d*x)))/(2*d) + (b*(81*a^2 - 28*a*b - 4*b^2)*sech(c + d*x))/(30*d) + ((33*a - 2*b)*b*sech(c + d*x)*(a + b - b*sech(c + d*x)^2))/(30*d) + (7*b*sech(c + d*x)*(a + b - b*sech(c + d*x)^2)^2)/(10*d) - (coth(c + d*x)*csch(c + d*x)*(a + b - b*sech(c + d*x)^2)^3)/(2*d)]
    @test_int [csch(c + d*x)^4*(a + b*tanh(c + d*x)^2)^3, x, 3, (a^2*(a - 3*b)*coth(c + d*x))/d - (a^3*coth(c + d*x)^3)/(3*d) - (3*a*(a - b)*b*tanh(c + d*x))/d - ((3*a - b)*b^2*tanh(c + d*x)^3)/(3*d) - (b^3*tanh(c + d*x)^5)/(5*d)]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [sinh(c + d*x)^4/(a + b*tanh(c + d*x)^2), x, 6, ((3*a^2 - 6*a*b - b^2)*x)/(8*(a + b)^3) + (a^(3/2)*sqrt(b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/((a + b)^3*d) - ((5*a + b)*cosh(c + d*x)*sinh(c + d*x))/(8*(a + b)^2*d) + (cosh(c + d*x)^3*sinh(c + d*x))/(4*(a + b)*d)]
    @test_int [sinh(c + d*x)^3/(a + b*tanh(c + d*x)^2), x, 4, (a*sqrt(b)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/((a + b)^(5/2)*d) - (a*cosh(c + d*x))/((a + b)^2*d) + cosh(c + d*x)^3/(3*(a + b)*d)]
    @test_int [sinh(c + d*x)^2/(a + b*tanh(c + d*x)^2), x, 5, -(((a - b)*x)/(2*(a + b)^2)) - (sqrt(a)*sqrt(b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/((a + b)^2*d) + (cosh(c + d*x)*sinh(c + d*x))/(2*(a + b)*d)]
    @test_int [sinh(c + d*x)^1/(a + b*tanh(c + d*x)^2), x, 3, -((sqrt(b)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/((a + b)^(3/2)*d)) + cosh(c + d*x)/((a + b)*d)]
    @test_int [csch(c + d*x)^1/(a + b*tanh(c + d*x)^2), x, 4, -(atanh(cosh(c + d*x))/(a*d)) + (sqrt(b)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/(a*sqrt(a + b)*d)]
    @test_int [csch(c + d*x)^2/(a + b*tanh(c + d*x)^2), x, 3, -((sqrt(b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(a^(3/2)*d)) - coth(c + d*x)/(a*d)]
    @test_int [csch(c + d*x)^3/(a + b*tanh(c + d*x)^2), x, 5, ((a + 2*b)*atanh(cosh(c + d*x)))/(2*a^2*d) - (sqrt(b)*sqrt(a + b)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/(a^2*d) - (coth(c + d*x)*csch(c + d*x))/(2*a*d)]
    @test_int [csch(c + d*x)^4/(a + b*tanh(c + d*x)^2), x, 4, (sqrt(b)*(a + b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(a^(5/2)*d) + ((a + b)*coth(c + d*x))/(a^2*d) - coth(c + d*x)^3/(3*a*d)]

    @test_int [sinh(c + d*x)^4/(a + b*tanh(c + d*x)^2)^2, x, 7, (3*(a^2 - 6*a*b + b^2)*x)/(8*(a + b)^4) + (3*sqrt(a)*(a - b)*sqrt(b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*(a + b)^4*d) - ((5*a - b)*cosh(c + d*x)*sinh(c + d*x))/(8*(a + b)^2*d*(a + b*tanh(c + d*x)^2)) + (cosh(c + d*x)^3*sinh(c + d*x))/(4*(a + b)*d*(a + b*tanh(c + d*x)^2)) + (3*(3*a - b)*b*tanh(c + d*x))/(8*(a + b)^3*d*(a + b*tanh(c + d*x)^2))]
    @test_int [sinh(c + d*x)^3/(a + b*tanh(c + d*x)^2)^2, x, 5, ((3*a - 2*b)*sqrt(b)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/(2*(a + b)^(7/2)*d) - ((a - b)*cosh(c + d*x))/((a + b)^3*d) + cosh(c + d*x)^3/(3*(a + b)^2*d) + (a*b*sech(c + d*x))/(2*(a + b)^3*d*(a + b - b*sech(c + d*x)^2))]
    @test_int [sinh(c + d*x)^2/(a + b*tanh(c + d*x)^2)^2, x, 6, -(((a - 3*b)*x)/(2*(a + b)^3)) - ((3*a - b)*sqrt(b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*sqrt(a)*(a + b)^3*d) + (cosh(c + d*x)*sinh(c + d*x))/(2*(a + b)*d*(a + b*tanh(c + d*x)^2)) - (b*tanh(c + d*x))/((a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [sinh(c + d*x)^1/(a + b*tanh(c + d*x)^2)^2, x, 4, -((3*sqrt(b)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/(2*(a + b)^(5/2)*d)) + (3*cosh(c + d*x))/(2*(a + b)^2*d) - cosh(c + d*x)/(2*(a + b)*d*(a + b - b*sech(c + d*x)^2))]
    @test_int [csch(c + d*x)^1/(a + b*tanh(c + d*x)^2)^2, x, 5, -(atanh(cosh(c + d*x))/(a^2*d)) + (sqrt(b)*(3*a + 2*b)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/(2*a^2*(a + b)^(3/2)*d) + (b*sech(c + d*x))/(2*a*(a + b)*d*(a + b - b*sech(c + d*x)^2))]
    @test_int [csch(c + d*x)^2/(a + b*tanh(c + d*x)^2)^2, x, 4, (-3*sqrt(b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*a^(5/2)*d) - (3*coth(c + d*x))/(2*a^2*d) + coth(c + d*x)/(2*a*d*(a + b*tanh(c + d*x)^2))]
    @test_int [csch(c + d*x)^3/(a + b*tanh(c + d*x)^2)^2, x, 6, ((a + 4*b)*atanh(cosh(c + d*x)))/(2*a^3*d) - (sqrt(b)*(3*a + 4*b)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/(2*a^3*sqrt(a + b)*d) - (coth(c + d*x)*csch(c + d*x))/(2*a*d*(a + b - b*sech(c + d*x)^2)) - (b*sech(c + d*x))/(a^2*d*(a + b - b*sech(c + d*x)^2))]
    @test_int [csch(c + d*x)^4/(a + b*tanh(c + d*x)^2)^2, x, 5, (sqrt(b)*(3*a + 5*b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*a^(7/2)*d) + ((a + 2*b)*coth(c + d*x))/(a^3*d) - coth(c + d*x)^3/(3*a^2*d) + (b*(a + b)*tanh(c + d*x))/(2*a^3*d*(a + b*tanh(c + d*x)^2))]

    @test_int [sinh(c + d*x)^4/(a + b*tanh(c + d*x)^2)^3, x, 8, (3*(a^2 - 10*a*b + 5*b^2)*x)/(8*(a + b)^5) + (3*sqrt(b)*(5*a^2 - 10*a*b + b^2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*sqrt(a)*(a + b)^5*d) - ((5*a - 3*b)*cosh(c + d*x)*sinh(c + d*x))/(8*(a + b)^2*d*(a + b*tanh(c + d*x)^2)^2) + (cosh(c + d*x)^3*sinh(c + d*x))/(4*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) + ((7*a - 5*b)*b*tanh(c + d*x))/(8*(a + b)^3*d*(a + b*tanh(c + d*x)^2)^2) + (3*(a - b)*b*tanh(c + d*x))/(2*(a + b)^4*d*(a + b*tanh(c + d*x)^2))]
    @test_int [sinh(c + d*x)^3/(a + b*tanh(c + d*x)^2)^3, x, 6, (5*(3*a - 4*b)*sqrt(b)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/(8*(a + b)^(9/2)*d) - ((a - 2*b)*cosh(c + d*x))/((a + b)^4*d) + cosh(c + d*x)^3/(3*(a + b)^3*d) + (a*b*sech(c + d*x))/(4*(a + b)^3*d*(a + b - b*sech(c + d*x)^2)^2) + ((7*a - 4*b)*b*sech(c + d*x))/(8*(a + b)^4*d*(a + b - b*sech(c + d*x)^2))]
    @test_int [sinh(c + d*x)^2/(a + b*tanh(c + d*x)^2)^3, x, 7, -(((a - 5*b)*x)/(2*(a + b)^4)) - (sqrt(b)*(15*a^2 - 10*a*b - b^2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(3/2)*(a + b)^4*d) + (cosh(c + d*x)*sinh(c + d*x))/(2*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) - (3*b*tanh(c + d*x))/(4*(a + b)^2*d*(a + b*tanh(c + d*x)^2)^2) - ((11*a - b)*b*tanh(c + d*x))/(8*a*(a + b)^3*d*(a + b*tanh(c + d*x)^2))]
    @test_int [sinh(c + d*x)^1/(a + b*tanh(c + d*x)^2)^3, x, 5, -((15*sqrt(b)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/(8*(a + b)^(7/2)*d)) + (15*cosh(c + d*x))/(8*(a + b)^3*d) - cosh(c + d*x)/(4*(a + b)*d*(a + b - b*sech(c + d*x)^2)^2) - (5*cosh(c + d*x))/(8*(a + b)^2*d*(a + b - b*sech(c + d*x)^2))]
    @test_int [csch(c + d*x)^1/(a + b*tanh(c + d*x)^2)^3, x, 6, -(atanh(cosh(c + d*x))/(a^3*d)) + (sqrt(b)*(15*a^2 + 20*a*b + 8*b^2)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/(8*a^3*(a + b)^(5/2)*d) + (b*sech(c + d*x))/(4*a*(a + b)*d*(a + b - b*sech(c + d*x)^2)^2) + (b*(7*a + 4*b)*sech(c + d*x))/(8*a^2*(a + b)^2*d*(a + b - b*sech(c + d*x)^2))]
    @test_int [csch(c + d*x)^2/(a + b*tanh(c + d*x)^2)^3, x, 5, (-15*sqrt(b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(7/2)*d) - (15*coth(c + d*x))/(8*a^3*d) + coth(c + d*x)/(4*a*d*(a + b*tanh(c + d*x)^2)^2) + (5*coth(c + d*x))/(8*a^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [csch(c + d*x)^3/(a + b*tanh(c + d*x)^2)^3, x, 7, ((a + 6*b)*atanh(cosh(c + d*x)))/(2*a^4*d) - (sqrt(b)*(15*a^2 + 40*a*b + 24*b^2)*atanh((sqrt(b)*sech(c + d*x))/sqrt(a + b)))/(8*a^4*(a + b)^(3/2)*d) - (coth(c + d*x)*csch(c + d*x))/(2*a*d*(a + b - b*sech(c + d*x)^2)^2) - (3*b*sech(c + d*x))/(4*a^2*d*(a + b - b*sech(c + d*x)^2)^2) - (b*(11*a + 12*b)*sech(c + d*x))/(8*a^3*(a + b)*d*(a + b - b*sech(c + d*x)^2))]
    @test_int [csch(c + d*x)^4/(a + b*tanh(c + d*x)^2)^3, x, 6, (5*sqrt(b)*(3*a + 7*b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(9/2)*d) + ((a + 3*b)*coth(c + d*x))/(a^4*d) - coth(c + d*x)^3/(3*a^3*d) + (b*(a + b)*tanh(c + d*x))/(4*a^3*d*(a + b*tanh(c + d*x)^2)^2) + (b*(7*a + 11*b)*tanh(c + d*x))/(8*a^4*d*(a + b*tanh(c + d*x)^2))]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*sinh(e+f*x)^m*(a+b*tanh(e+f*x)^3)^p=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [sinh(c + d*x)^4*(a + b*tanh(c + d*x)^3), x, 8, -((3*(a + 8*b)*log(1 - tanh(c + d*x)))/(16*d)) + (3*(a - 8*b)*log(1 + tanh(c + d*x)))/(16*d) - (3*a*tanh(c + d*x))/(8*d) - (3*b*tanh(c + d*x)^2)/(2*d) + (sinh(c + d*x)^4*(b + a*tanh(c + d*x)))/(4*d) - (sinh(c + d*x)^2*tanh(c + d*x)*(a + 8*b*tanh(c + d*x)))/(8*d)]
    @test_int [sinh(c + d*x)^3*(a + b*tanh(c + d*x)^3), x, 9, (5*b*atan(sinh(c + d*x)))/(2*d) - (a*cosh(c + d*x))/d + (a*cosh(c + d*x)^3)/(3*d) - (5*b*sinh(c + d*x))/(2*d) + (5*b*sinh(c + d*x)^3)/(6*d) - (b*sinh(c + d*x)^3*tanh(c + d*x)^2)/(2*d)]
    @test_int [sinh(c + d*x)^2*(a + b*tanh(c + d*x)^3), x, 7, ((a + 4*b)*log(1 - tanh(c + d*x)))/(4*d) - ((a - 4*b)*log(1 + tanh(c + d*x)))/(4*d) + (a*tanh(c + d*x))/(2*d) + (b*tanh(c + d*x)^2)/(2*d) + (sinh(c + d*x)^2*(b + a*tanh(c + d*x)))/(2*d)]
    @test_int [sinh(c + d*x)^1*(a + b*tanh(c + d*x)^3), x, 7, (-3*b*atan(sinh(c + d*x)))/(2*d) + (a*cosh(c + d*x))/d + (3*b*sinh(c + d*x))/(2*d) - (b*sinh(c + d*x)*tanh(c + d*x)^2)/(2*d)]
    @test_int [csch(c + d*x)^1*(a + b*tanh(c + d*x)^3), x, 5, (b*atan(sinh(c + d*x)))/(2*d) - (a*atanh(cosh(c + d*x)))/d - (b*sech(c + d*x)*tanh(c + d*x))/(2*d)]
    @test_int [csch(c + d*x)^2*(a + b*tanh(c + d*x)^3), x, 3, -((a*coth(c + d*x))/d) + (b*tanh(c + d*x)^2)/(2*d)]
    @test_int [csch(c + d*x)^3*(a + b*tanh(c + d*x)^3), x, 6, (b*atan(sinh(c + d*x)))/(2*d) + (a*atanh(cosh(c + d*x)))/(2*d) - (a*coth(c + d*x)*csch(c + d*x))/(2*d) + (b*sech(c + d*x)*tanh(c + d*x))/(2*d)]
    @test_int [csch(c + d*x)^4*(a + b*tanh(c + d*x)^3), x, 3, (a*coth(c + d*x))/d - (a*coth(c + d*x)^3)/(3*d) + (b*log(tanh(c + d*x)))/d - (b*tanh(c + d*x)^2)/(2*d)]

    @test_int [sinh(c + d*x)^4*(a + b*tanh(c + d*x)^3)^2, x, 8, (3/8)*(a^2 + 21*b^2)*x + (6*a*b*log(cosh(c + d*x)))/d - (6*b^2*tanh(c + d*x))/d - (a*b*tanh(c + d*x)^2)/d - (b^2*tanh(c + d*x)^3)/d - (b^2*tanh(c + d*x)^5)/(5*d) + (cosh(c + d*x)^3*sinh(c + d*x)*(a^2 + b^2 + 2*a*b*tanh(c + d*x)))/(4*d) - (cosh(c + d*x)*sinh(c + d*x)*(5*a^2 + 17*b^2 + 20*a*b*tanh(c + d*x)))/(8*d), -((3*(a^2 + 16*a*b + 21*b^2)*log(1 - tanh(c + d*x)))/(16*d)) + (3*(a^2 - 16*a*b + 21*b^2)*log(1 + tanh(c + d*x)))/(16*d) - (3*(a^2 + 21*b^2)*tanh(c + d*x))/(8*d) - (3*a*b*tanh(c + d*x)^2)/d - (b^2*tanh(c + d*x)^3)/d - (b^2*tanh(c + d*x)^5)/(5*d) - (sinh(c + d*x)^2*tanh(c + d*x)*(a^2 + 13*b^2 + 16*a*b*tanh(c + d*x)))/(8*d) + (sinh(c + d*x)^4*(2*a*b + (a^2 + b^2)*tanh(c + d*x)))/(4*d)]
    @test_int [sinh(c + d*x)^3*(a + b*tanh(c + d*x)^3)^2, x, 12, (5*a*b*atan(sinh(c + d*x)))/d - (a^2*cosh(c + d*x))/d - (4*b^2*cosh(c + d*x))/d + (a^2*cosh(c + d*x)^3)/(3*d) + (b^2*cosh(c + d*x)^3)/(3*d) - (6*b^2*sech(c + d*x))/d + (4*b^2*sech(c + d*x)^3)/(3*d) - (b^2*sech(c + d*x)^5)/(5*d) - (5*a*b*sinh(c + d*x))/d + (5*a*b*sinh(c + d*x)^3)/(3*d) - (a*b*sinh(c + d*x)^3*tanh(c + d*x)^2)/d]
    @test_int [sinh(c + d*x)^2*(a + b*tanh(c + d*x)^3)^2, x, 7, (-(1/2))*(a^2 + 7*b^2)*x - (4*a*b*log(cosh(c + d*x)))/d + (3*b^2*tanh(c + d*x))/d + (a*b*tanh(c + d*x)^2)/d + (2*b^2*tanh(c + d*x)^3)/(3*d) + (b^2*tanh(c + d*x)^5)/(5*d) + (cosh(c + d*x)*sinh(c + d*x)*(a^2 + b^2 + 2*a*b*tanh(c + d*x)))/(2*d), ((a + b)*(a + 7*b)*log(1 - tanh(c + d*x)))/(4*d) - ((a - 7*b)*(a - b)*log(1 + tanh(c + d*x)))/(4*d) + ((a^2 + 7*b^2)*tanh(c + d*x))/(2*d) + (a*b*tanh(c + d*x)^2)/d + (2*b^2*tanh(c + d*x)^3)/(3*d) + (b^2*tanh(c + d*x)^5)/(5*d) + (sinh(c + d*x)^2*(2*a*b + (a^2 + b^2)*tanh(c + d*x)))/(2*d)]
    @test_int [sinh(c + d*x)^1*(a + b*tanh(c + d*x)^3)^2, x, 10, (-3*a*b*atan(sinh(c + d*x)))/d + (a^2*cosh(c + d*x))/d + (b^2*cosh(c + d*x))/d + (3*b^2*sech(c + d*x))/d - (b^2*sech(c + d*x)^3)/d + (b^2*sech(c + d*x)^5)/(5*d) + (3*a*b*sinh(c + d*x))/d - (a*b*sinh(c + d*x)*tanh(c + d*x)^2)/d]
    @test_int [csch(c + d*x)^1*(a + b*tanh(c + d*x)^3)^2, x, 8, (a*b*atan(sinh(c + d*x)))/d - (a^2*atanh(cosh(c + d*x)))/d - (b^2*sech(c + d*x))/d + (2*b^2*sech(c + d*x)^3)/(3*d) - (b^2*sech(c + d*x)^5)/(5*d) - (a*b*sech(c + d*x)*tanh(c + d*x))/d]
    @test_int [csch(c + d*x)^2*(a + b*tanh(c + d*x)^3)^2, x, 3, -((a^2*coth(c + d*x))/d) + (a*b*tanh(c + d*x)^2)/d + (b^2*tanh(c + d*x)^5)/(5*d)]
    @test_int [csch(c + d*x)^3*(a + b*tanh(c + d*x)^3)^2, x, 9, (a*b*atan(sinh(c + d*x)))/d + (a^2*atanh(cosh(c + d*x)))/(2*d) - (a^2*coth(c + d*x)*csch(c + d*x))/(2*d) - (b^2*sech(c + d*x)^3)/(3*d) + (b^2*sech(c + d*x)^5)/(5*d) + (a*b*sech(c + d*x)*tanh(c + d*x))/d]
    @test_int [csch(c + d*x)^4*(a + b*tanh(c + d*x)^3)^2, x, 3, (a^2*coth(c + d*x))/d - (a^2*coth(c + d*x)^3)/(3*d) + (2*a*b*log(tanh(c + d*x)))/d - (a*b*tanh(c + d*x)^2)/d + (b^2*tanh(c + d*x)^3)/(3*d) - (b^2*tanh(c + d*x)^5)/(5*d)]

    @test_int [sinh(c + d*x)^4*(a + b*tanh(c + d*x)^3)^3, x, 8, (3/8)*a*(a^2 + 63*b^2)*x + (3*b*(3*a^2 + 5*b^2)*log(cosh(c + d*x)))/d - (18*a*b^2*tanh(c + d*x))/d - (b*(3*a^2 + 10*b^2)*tanh(c + d*x)^2)/(2*d) - (3*a*b^2*tanh(c + d*x)^3)/d - (3*b^3*tanh(c + d*x)^4)/(2*d) - (3*a*b^2*tanh(c + d*x)^5)/(5*d) - (b^3*tanh(c + d*x)^6)/(2*d) - (b^3*tanh(c + d*x)^8)/(8*d) + (cosh(c + d*x)^3*sinh(c + d*x)*(a*(a^2 + 3*b^2) + b*(3*a^2 + b^2)*tanh(c + d*x)))/(4*d) - (cosh(c + d*x)*sinh(c + d*x)*(a*(5*a^2 + 51*b^2) + 2*b*(15*a^2 + 11*b^2)*tanh(c + d*x)))/(8*d), -((3*(a + b)*(a^2 + 23*a*b + 40*b^2)*log(1 - tanh(c + d*x)))/(16*d)) + (3*(a - b)*(a^2 - 23*a*b + 40*b^2)*log(1 + tanh(c + d*x)))/(16*d) - (3*a*(a^2 + 63*b^2)*tanh(c + d*x))/(8*d) - (3*b*(3*a^2 + 5*b^2)*tanh(c + d*x)^2)/(2*d) - (3*a*b^2*tanh(c + d*x)^3)/d - (3*b^3*tanh(c + d*x)^4)/(2*d) - (3*a*b^2*tanh(c + d*x)^5)/(5*d) - (b^3*tanh(c + d*x)^6)/(2*d) - (b^3*tanh(c + d*x)^8)/(8*d) + (sinh(c + d*x)^4*(b*(3*a^2 + b^2) + a*(a^2 + 3*b^2)*tanh(c + d*x)))/(4*d) - (sinh(c + d*x)^2*tanh(c + d*x)*(a*(a^2 + 39*b^2) + 4*b*(6*a^2 + 5*b^2)*tanh(c + d*x)))/(8*d)]
    @test_int [sinh(c + d*x)^3*(a + b*tanh(c + d*x)^3)^3, x, 20, (15*a^2*b*atan(sinh(c + d*x)))/(2*d) + (1155*b^3*atan(sinh(c + d*x)))/(128*d) - (a^3*cosh(c + d*x))/d - (12*a*b^2*cosh(c + d*x))/d + (a^3*cosh(c + d*x)^3)/(3*d) + (a*b^2*cosh(c + d*x)^3)/d - (18*a*b^2*sech(c + d*x))/d + (4*a*b^2*sech(c + d*x)^3)/d - (3*a*b^2*sech(c + d*x)^5)/(5*d) - (15*a^2*b*sinh(c + d*x))/(2*d) - (1155*b^3*sinh(c + d*x))/(128*d) + (5*a^2*b*sinh(c + d*x)^3)/(2*d) + (385*b^3*sinh(c + d*x)^3)/(128*d) - (3*a^2*b*sinh(c + d*x)^3*tanh(c + d*x)^2)/(2*d) - (231*b^3*sinh(c + d*x)^3*tanh(c + d*x)^2)/(128*d) - (33*b^3*sinh(c + d*x)^3*tanh(c + d*x)^4)/(64*d) - (11*b^3*sinh(c + d*x)^3*tanh(c + d*x)^6)/(48*d) - (b^3*sinh(c + d*x)^3*tanh(c + d*x)^8)/(8*d)]
    @test_int [sinh(c + d*x)^2*(a + b*tanh(c + d*x)^3)^3, x, 7, (-(1/2))*a*(a^2 + 21*b^2)*x - (b*(6*a^2 + 5*b^2)*log(cosh(c + d*x)))/d + (9*a*b^2*tanh(c + d*x))/d + (b*(3*a^2 + 4*b^2)*tanh(c + d*x)^2)/(2*d) + (2*a*b^2*tanh(c + d*x)^3)/d + (3*b^3*tanh(c + d*x)^4)/(4*d) + (3*a*b^2*tanh(c + d*x)^5)/(5*d) + (b^3*tanh(c + d*x)^6)/(3*d) + (b^3*tanh(c + d*x)^8)/(8*d) + (cosh(c + d*x)*sinh(c + d*x)*(a*(a^2 + 3*b^2) + b*(3*a^2 + b^2)*tanh(c + d*x)))/(2*d), ((a + b)^2*(a + 10*b)*log(1 - tanh(c + d*x)))/(4*d) - ((a - 10*b)*(a - b)^2*log(1 + tanh(c + d*x)))/(4*d) + (a*(a^2 + 21*b^2)*tanh(c + d*x))/(2*d) + (b*(3*a^2 + 4*b^2)*tanh(c + d*x)^2)/(2*d) + (2*a*b^2*tanh(c + d*x)^3)/d + (3*b^3*tanh(c + d*x)^4)/(4*d) + (3*a*b^2*tanh(c + d*x)^5)/(5*d) + (b^3*tanh(c + d*x)^6)/(3*d) + (b^3*tanh(c + d*x)^8)/(8*d) + (sinh(c + d*x)^2*(b*(3*a^2 + b^2) + a*(a^2 + 3*b^2)*tanh(c + d*x)))/(2*d)]
    @test_int [sinh(c + d*x)^1*(a + b*tanh(c + d*x)^3)^3, x, 17, (-9*a^2*b*atan(sinh(c + d*x)))/(2*d) - (315*b^3*atan(sinh(c + d*x)))/(128*d) + (a^3*cosh(c + d*x))/d + (3*a*b^2*cosh(c + d*x))/d + (9*a*b^2*sech(c + d*x))/d - (3*a*b^2*sech(c + d*x)^3)/d + (3*a*b^2*sech(c + d*x)^5)/(5*d) + (9*a^2*b*sinh(c + d*x))/(2*d) + (315*b^3*sinh(c + d*x))/(128*d) - (3*a^2*b*sinh(c + d*x)*tanh(c + d*x)^2)/(2*d) - (105*b^3*sinh(c + d*x)*tanh(c + d*x)^2)/(128*d) - (21*b^3*sinh(c + d*x)*tanh(c + d*x)^4)/(64*d) - (3*b^3*sinh(c + d*x)*tanh(c + d*x)^6)/(16*d) - (b^3*sinh(c + d*x)*tanh(c + d*x)^8)/(8*d)]
    @test_int [csch(c + d*x)^1*(a + b*tanh(c + d*x)^3)^3, x, 13, (3*a^2*b*atan(sinh(c + d*x)))/(2*d) + (35*b^3*atan(sinh(c + d*x)))/(128*d) - (a^3*atanh(cosh(c + d*x)))/d - (3*a*b^2*sech(c + d*x))/d + (2*a*b^2*sech(c + d*x)^3)/d - (3*a*b^2*sech(c + d*x)^5)/(5*d) - (3*a^2*b*sech(c + d*x)*tanh(c + d*x))/(2*d) - (35*b^3*sech(c + d*x)*tanh(c + d*x))/(128*d) - (35*b^3*sech(c + d*x)*tanh(c + d*x)^3)/(192*d) - (7*b^3*sech(c + d*x)*tanh(c + d*x)^5)/(48*d) - (b^3*sech(c + d*x)*tanh(c + d*x)^7)/(8*d)]
    @test_int [csch(c + d*x)^2*(a + b*tanh(c + d*x)^3)^3, x, 3, -((a^3*coth(c + d*x))/d) + (3*a^2*b*tanh(c + d*x)^2)/(2*d) + (3*a*b^2*tanh(c + d*x)^5)/(5*d) + (b^3*tanh(c + d*x)^8)/(8*d)]
    @test_int [csch(c + d*x)^3*(a + b*tanh(c + d*x)^3)^3, x, 14, (3*a^2*b*atan(sinh(c + d*x)))/(2*d) + (5*b^3*atan(sinh(c + d*x)))/(128*d) + (a^3*atanh(cosh(c + d*x)))/(2*d) - (a^3*coth(c + d*x)*csch(c + d*x))/(2*d) - (a*b^2*sech(c + d*x)^3)/d + (3*a*b^2*sech(c + d*x)^5)/(5*d) + (3*a^2*b*sech(c + d*x)*tanh(c + d*x))/(2*d) + (5*b^3*sech(c + d*x)*tanh(c + d*x))/(128*d) - (5*b^3*sech(c + d*x)^3*tanh(c + d*x))/(64*d) - (5*b^3*sech(c + d*x)^3*tanh(c + d*x)^3)/(48*d) - (b^3*sech(c + d*x)^3*tanh(c + d*x)^5)/(8*d)]
    @test_int [csch(c + d*x)^4*(a + b*tanh(c + d*x)^3)^3, x, 3, (a^3*coth(c + d*x))/d - (a^3*coth(c + d*x)^3)/(3*d) + (3*a^2*b*log(tanh(c + d*x)))/d - (3*a^2*b*tanh(c + d*x)^2)/(2*d) + (a*b^2*tanh(c + d*x)^3)/d - (3*a*b^2*tanh(c + d*x)^5)/(5*d) + (b^3*tanh(c + d*x)^6)/(6*d) - (b^3*tanh(c + d*x)^8)/(8*d)]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [sinh(c + d*x)^4/(a + b*tanh(c + d*x)^3), x, 11, -((a^(2/3)*b^(1/3)*(a^2 + 3*a^(4/3)*b^(2/3) - b^2)*atan((a^(1/3) - 2*b^(1/3)*tanh(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*(a^(4/3) + a^(2/3)*b^(2/3) + b^(4/3))^3*d)) - (3*a*(a - 5*b)*log(1 - tanh(c + d*x)))/(16*(a + b)^3*d) + (3*a*(a + 5*b)*log(1 + tanh(c + d*x)))/(16*(a - b)^3*d) - (a^(2/3)*b^(1/3)*(a^4 + 7*a^2*b^2 + b^4 + 3*a^(2/3)*b^(4/3)*(2*a^2 + b^2))*log(a^(1/3) + b^(1/3)*tanh(c + d*x)))/(3*(a^2 - b^2)^3*d) + (a^(2/3)*b^(1/3)*(a^4 + 7*a^2*b^2 + b^4 + 3*a^(2/3)*b^(4/3)*(2*a^2 + b^2))*log(a^(2/3) - a^(1/3)*b^(1/3)*tanh(c + d*x) + b^(2/3)*tanh(c + d*x)^2))/(6*(a^2 - b^2)^3*d) - (a^2*b*(a^2 + 2*b^2)*log(a + b*tanh(c + d*x)^3))/((a^2 - b^2)^3*d) + 1/(16*(a + b)*d*(1 - tanh(c + d*x))^2) - (5*a - b)/(16*(a + b)^2*d*(1 - tanh(c + d*x))) - 1/(16*(a - b)*d*(1 + tanh(c + d*x))^2) + (5*a + b)/(16*(a - b)^2*d*(1 + tanh(c + d*x)))]
    @test_int [sinh(c + d*x)^3/(a + b*tanh(c + d*x)^3), x, 0, im*Unintegrable(((-im)*sinh(c + d*x)^3)/(a + b*tanh(c + d*x)^3), x)]
    @test_int [sinh(c + d*x)^2/(a + b*tanh(c + d*x)^3), x, 11, (a^(2/3)*b^(1/3)*(a^2 - 3*a^(2/3)*b^(4/3) + 2*b^2)*atan((a^(1/3) - 2*b^(1/3)*tanh(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*(a^2 - b^2)^2*d) + ((a - 2*b)*log(1 - tanh(c + d*x)))/(4*(a + b)^2*d) - ((a + 2*b)*log(1 + tanh(c + d*x)))/(4*(a - b)^2*d) + (a^(2/3)*b^(1/3)*(a^2 + 3*a^(2/3)*b^(4/3) + 2*b^2)*log(a^(1/3) + b^(1/3)*tanh(c + d*x)))/(3*(a^2 - b^2)^2*d) - (a^(2/3)*b^(1/3)*(a^2 + 3*a^(2/3)*b^(4/3) + 2*b^2)*log(a^(2/3) - a^(1/3)*b^(1/3)*tanh(c + d*x) + b^(2/3)*tanh(c + d*x)^2))/(6*(a^2 - b^2)^2*d) + (b*(2*a^2 + b^2)*log(a + b*tanh(c + d*x)^3))/(3*(a^2 - b^2)^2*d) + 1/(4*(a + b)*d*(1 - tanh(c + d*x))) - 1/(4*(a - b)*d*(1 + tanh(c + d*x)))]
    @test_int [sinh(c + d*x)^1/(a + b*tanh(c + d*x)^3), x, 0, (-im)*Unintegrable((im*sinh(c + d*x))/(a + b*tanh(c + d*x)^3), x)]
    @test_int [csch(c + d*x)^1/(a + b*tanh(c + d*x)^3), x, 0, im*Unintegrable(((-im)*csch(c + d*x))/(a + b*tanh(c + d*x)^3), x)]
    @test_int [csch(c + d*x)^2/(a + b*tanh(c + d*x)^3), x, 8, (b^(1/3)*atan((a^(1/3) - 2*b^(1/3)*tanh(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*a^(4/3)*d) - coth(c + d*x)/(a*d) + (b^(1/3)*log(a^(1/3) + b^(1/3)*tanh(c + d*x)))/(3*a^(4/3)*d) - (b^(1/3)*log(a^(2/3) - a^(1/3)*b^(1/3)*tanh(c + d*x) + b^(2/3)*tanh(c + d*x)^2))/(6*a^(4/3)*d)]
    @test_int [csch(c + d*x)^3/(a + b*tanh(c + d*x)^3), x, 0, (-im)*Unintegrable((im*csch(c + d*x)^3)/(a + b*tanh(c + d*x)^3), x)]
    @test_int [csch(c + d*x)^4/(a + b*tanh(c + d*x)^3), x, 12, -((b^(1/3)*atan((a^(1/3) - 2*b^(1/3)*tanh(c + d*x))/(sqrt(3)*a^(1/3))))/(sqrt(3)*a^(4/3)*d)) + coth(c + d*x)/(a*d) - coth(c + d*x)^3/(3*a*d) - (b*log(tanh(c + d*x)))/(a^2*d) - (b^(1/3)*log(a^(1/3) + b^(1/3)*tanh(c + d*x)))/(3*a^(4/3)*d) + (b^(1/3)*log(a^(2/3) - a^(1/3)*b^(1/3)*tanh(c + d*x) + b^(2/3)*tanh(c + d*x)^2))/(6*a^(4/3)*d) + (b*log(a + b*tanh(c + d*x)^3))/(3*a^2*d)]

    #= ::Section:: =#
    #=Integrands*of*the*form*sinh(e+f*x)^m*(a+b*tanh(e+f*x)^4)^p=#

    #= ::Section:: =#
    #=Integrands*of*the*form*sinh(e+f*x)^m*(a+b*tanh(e+f*x)^n)^p=#

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*cosh(e+f*x)^m*(a+b*tanh(e+f*x)^n)^p=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*cosh(e+f*x)^m*(a+b*tanh(e+f*x)^2)^p=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [cosh(c + d*x)^4*(a + b*tanh(c + d*x)^2), x, 4, (1/8)*(3*a - b)*x + ((3*a - b)*cosh(c + d*x)*sinh(c + d*x))/(8*d) + ((a + b)*cosh(c + d*x)^3*sinh(c + d*x))/(4*d)]
    @test_int [cosh(c + d*x)^3*(a + b*tanh(c + d*x)^2), x, 2, (a*sinh(c + d*x))/d + ((a + b)*sinh(c + d*x)^3)/(3*d)]
    @test_int [cosh(c + d*x)^2*(a + b*tanh(c + d*x)^2), x, 3, (1/2)*(a - b)*x + ((a + b)*cosh(c + d*x)*sinh(c + d*x))/(2*d)]
    @test_int [cosh(c + d*x)^1*(a + b*tanh(c + d*x)^2), x, 3, -((b*atan(sinh(c + d*x)))/d) + ((a + b)*sinh(c + d*x))/d]
    @test_int [sech(c + d*x)^1*(a + b*tanh(c + d*x)^2), x, 3, ((2*a + b)*atan(sinh(c + d*x)))/(2*d) - (b*sech(c + d*x)*tanh(c + d*x))/(2*d)]
    @test_int [sech(c + d*x)^2*(a + b*tanh(c + d*x)^2), x, 2, (a*tanh(c + d*x))/d + (b*tanh(c + d*x)^3)/(3*d)]
    @test_int [sech(c + d*x)^3*(a + b*tanh(c + d*x)^2), x, 4, ((4*a + b)*atan(sinh(c + d*x)))/(8*d) + ((4*a + b)*sech(c + d*x)*tanh(c + d*x))/(8*d) - (b*sech(c + d*x)^3*tanh(c + d*x))/(4*d)]
    @test_int [sech(c + d*x)^4*(a + b*tanh(c + d*x)^2), x, 3, (a*tanh(c + d*x))/d - ((a - b)*tanh(c + d*x)^3)/(3*d) - (b*tanh(c + d*x)^5)/(5*d)]

    @test_int [cosh(c + d*x)^4*(a + b*tanh(c + d*x)^2)^2, x, 4, (1/8)*(3*a^2 - 2*a*b + 3*b^2)*x + (3*(a^2 - b^2)*cosh(c + d*x)*sinh(c + d*x))/(8*d) + ((a + b)*cosh(c + d*x)^3*sinh(c + d*x)*(a + b*tanh(c + d*x)^2))/(4*d)]
    @test_int [cosh(c + d*x)^3*(a + b*tanh(c + d*x)^2)^2, x, 4, (b^2*atan(sinh(c + d*x)))/d + ((a^2 - b^2)*sinh(c + d*x))/d + ((a + b)^2*sinh(c + d*x)^3)/(3*d)]
    @test_int [cosh(c + d*x)^2*(a + b*tanh(c + d*x)^2)^2, x, 5, (1/2)*(a - 3*b)*(a + b)*x + ((a + b)^2*cosh(c + d*x)*sinh(c + d*x))/(2*d) + (b^2*tanh(c + d*x))/d]
    @test_int [cosh(c + d*x)^1*(a + b*tanh(c + d*x)^2)^2, x, 5, -((b*(4*a + 3*b)*atan(sinh(c + d*x)))/(2*d)) + ((a + b)^2*sinh(c + d*x))/d + (b^2*sech(c + d*x)*tanh(c + d*x))/(2*d)]
    @test_int [sech(c + d*x)^1*(a + b*tanh(c + d*x)^2)^2, x, 4, ((8*a^2 + 8*a*b + 3*b^2)*atan(sinh(c + d*x)))/(8*d) - (3*b*(2*a + b)*sech(c + d*x)*tanh(c + d*x))/(8*d) - (b*sech(c + d*x)^3*(a + (a + b)*sinh(c + d*x)^2)*tanh(c + d*x))/(4*d)]
    @test_int [sech(c + d*x)^2*(a + b*tanh(c + d*x)^2)^2, x, 3, (a^2*tanh(c + d*x))/d + (2*a*b*tanh(c + d*x)^3)/(3*d) + (b^2*tanh(c + d*x)^5)/(5*d)]
    @test_int [sech(c + d*x)^3*(a + b*tanh(c + d*x)^2)^2, x, 5, ((8*a^2 + 4*a*b + b^2)*atan(sinh(c + d*x)))/(16*d) + ((8*a^2 + 4*a*b + b^2)*sech(c + d*x)*tanh(c + d*x))/(16*d) - (b*(8*a + 3*b)*sech(c + d*x)^3*tanh(c + d*x))/(24*d) - (b*sech(c + d*x)^5*(a + (a + b)*sinh(c + d*x)^2)*tanh(c + d*x))/(6*d)]
    @test_int [sech(c + d*x)^4*(a + b*tanh(c + d*x)^2)^2, x, 3, (a^2*tanh(c + d*x))/d - (a*(a - 2*b)*tanh(c + d*x)^3)/(3*d) - ((2*a - b)*b*tanh(c + d*x)^5)/(5*d) - (b^2*tanh(c + d*x)^7)/(7*d)]

    @test_int [cosh(c + d*x)^4*(a + b*tanh(c + d*x)^2)^3, x, 6, (3/8)*(a + b)*(a^2 - 2*a*b + 5*b^2)*x + (3*(a - 3*b)*(a + b)^2*cosh(c + d*x)*sinh(c + d*x))/(8*d) + ((a + b)^3*cosh(c + d*x)^3*sinh(c + d*x))/(4*d) - (b^3*tanh(c + d*x))/d]
    @test_int [cosh(c + d*x)^3*(a + b*tanh(c + d*x)^2)^3, x, 5, (b^2*(6*a + 5*b)*atan(sinh(c + d*x)))/(2*d) + ((a - 2*b)*(a + b)^2*sinh(c + d*x))/d + ((a + b)^3*sinh(c + d*x)^3)/(3*d) - (b^3*sech(c + d*x)*tanh(c + d*x))/(2*d)]
    @test_int [cosh(c + d*x)^2*(a + b*tanh(c + d*x)^2)^3, x, 5, (1/2)*(a - 5*b)*(a + b)^2*x + ((a + b)^3*cosh(c + d*x)*sinh(c + d*x))/(2*d) + (b^2*(3*a + 2*b)*tanh(c + d*x))/d + (b^3*tanh(c + d*x)^3)/(3*d)]
    @test_int [cosh(c + d*x)^1*(a + b*tanh(c + d*x)^2)^3, x, 6, -((3*b*(4*(a + b)^2 + (2*a + b)^2)*atan(sinh(c + d*x)))/(8*d)) + ((a + b)^3*sinh(c + d*x))/d + (3*b^2*(4*a + 3*b)*sech(c + d*x)*tanh(c + d*x))/(8*d) - (b^3*sech(c + d*x)^3*tanh(c + d*x))/(4*d)]
    @test_int [sech(c + d*x)^1*(a + b*tanh(c + d*x)^2)^3, x, 5, ((2*a + b)*(8*a^2 + 8*a*b + 5*b^2)*atan(sinh(c + d*x)))/(16*d) - (b*(44*a^2 + 44*a*b + 15*b^2)*sech(c + d*x)*tanh(c + d*x))/(48*d) - (5*b*(2*a + b)*sech(c + d*x)^3*(a + (a + b)*sinh(c + d*x)^2)*tanh(c + d*x))/(24*d) - (b*sech(c + d*x)^5*(a + (a + b)*sinh(c + d*x)^2)^2*tanh(c + d*x))/(6*d)]
    @test_int [sech(c + d*x)^2*(a + b*tanh(c + d*x)^2)^3, x, 3, (a^3*tanh(c + d*x))/d + (a^2*b*tanh(c + d*x)^3)/d + (3*a*b^2*tanh(c + d*x)^5)/(5*d) + (b^3*tanh(c + d*x)^7)/(7*d)]
    @test_int [sech(c + d*x)^3*(a + b*tanh(c + d*x)^2)^3, x, 6, ((64*a^3 + 48*a^2*b + 24*a*b^2 + 5*b^3)*atan(sinh(c + d*x)))/(128*d) + ((64*a^3 + 48*a^2*b + 24*a*b^2 + 5*b^3)*sech(c + d*x)*tanh(c + d*x))/(128*d) - (b*(72*a^2 + 52*a*b + 15*b^2)*sech(c + d*x)^3*tanh(c + d*x))/(192*d) - (b*(12*a + 5*b)*sech(c + d*x)^5*(a + (a + b)*sinh(c + d*x)^2)*tanh(c + d*x))/(48*d) - (b*sech(c + d*x)^7*(a + (a + b)*sinh(c + d*x)^2)^2*tanh(c + d*x))/(8*d)]
    @test_int [sech(c + d*x)^4*(a + b*tanh(c + d*x)^2)^3, x, 3, (a^3*tanh(c + d*x))/d - (a^2*(a - 3*b)*tanh(c + d*x)^3)/(3*d) - (3*a*(a - b)*b*tanh(c + d*x)^5)/(5*d) - ((3*a - b)*b^2*tanh(c + d*x)^7)/(7*d) - (b^3*tanh(c + d*x)^9)/(9*d)]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [cosh(c + d*x)^4/(a + b*tanh(c + d*x)^2), x, 6, ((3*a^2 + 10*a*b + 15*b^2)*x)/(8*(a + b)^3) + (b^(5/2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(sqrt(a)*(a + b)^3*d) + ((3*a + 7*b)*cosh(c + d*x)*sinh(c + d*x))/(8*(a + b)^2*d) + (cosh(c + d*x)^3*sinh(c + d*x))/(4*(a + b)*d)]
    @test_int [cosh(c + d*x)^3/(a + b*tanh(c + d*x)^2), x, 4, (b^2*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(sqrt(a)*(a + b)^(5/2)*d) + ((a + 2*b)*sinh(c + d*x))/((a + b)^2*d) + sinh(c + d*x)^3/(3*(a + b)*d)]
    @test_int [cosh(c + d*x)^2/(a + b*tanh(c + d*x)^2), x, 5, ((a + 3*b)*x)/(2*(a + b)^2) + (b^(3/2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(sqrt(a)*(a + b)^2*d) + (cosh(c + d*x)*sinh(c + d*x))/(2*(a + b)*d)]
    @test_int [cosh(c + d*x)^1/(a + b*tanh(c + d*x)^2), x, 3, (b*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(sqrt(a)*(a + b)^(3/2)*d) + sinh(c + d*x)/((a + b)*d)]
    @test_int [sech(c + d*x)^1/(a + b*tanh(c + d*x)^2), x, 2, atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a))/(sqrt(a)*sqrt(a + b)*d)]
    @test_int [sech(c + d*x)^2/(a + b*tanh(c + d*x)^2), x, 2, atan((sqrt(b)*tanh(c + d*x))/sqrt(a))/(sqrt(a)*sqrt(b)*d)]
    @test_int [sech(c + d*x)^3/(a + b*tanh(c + d*x)^2), x, 4, -(atan(sinh(c + d*x))/(b*d)) + (sqrt(a + b)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(sqrt(a)*b*d)]
    @test_int [sech(c + d*x)^4/(a + b*tanh(c + d*x)^2), x, 3, ((a + b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(sqrt(a)*b^(3/2)*d) - tanh(c + d*x)/(b*d)]
    @test_int [sech(c + d*x)^5/(a + b*tanh(c + d*x)^2), x, 5, -(((2*a + 3*b)*atan(sinh(c + d*x)))/(2*b^2*d)) + ((a + b)^(3/2)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(sqrt(a)*b^2*d) - (sech(c + d*x)*tanh(c + d*x))/(2*b*d)]
    @test_int [sech(c + d*x)^6/(a + b*tanh(c + d*x)^2), x, 4, ((a + b)^2*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(sqrt(a)*b^(5/2)*d) - ((a + 2*b)*tanh(c + d*x))/(b^2*d) + tanh(c + d*x)^3/(3*b*d)]

    @test_int [cosh(c + d*x)^3/(a + b*tanh(c + d*x)^2)^2, x, 5, (b^2*(6*a + b)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(2*a^(3/2)*(a + b)^(7/2)*d) + ((a + 3*b)*sinh(c + d*x))/((a + b)^3*d) + sinh(c + d*x)^3/(3*(a + b)^2*d) + (b^3*sinh(c + d*x))/(2*a*(a + b)^3*d*(a + (a + b)*sinh(c + d*x)^2))]
    @test_int [cosh(c + d*x)^2/(a + b*tanh(c + d*x)^2)^2, x, 6, ((a + 5*b)*x)/(2*(a + b)^3) + (b^(3/2)*(5*a + b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*a^(3/2)*(a + b)^3*d) + (cosh(c + d*x)*sinh(c + d*x))/(2*(a + b)*d*(a + b*tanh(c + d*x)^2)) - ((a - b)*b*tanh(c + d*x))/(2*a*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [cosh(c + d*x)^1/(a + b*tanh(c + d*x)^2)^2, x, 5, (b*(4*a + b)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(2*a^(3/2)*(a + b)^(5/2)*d) + sinh(c + d*x)/((a + b)^2*d) + (b^2*sinh(c + d*x))/(2*a*(a + b)^2*d*(a + (a + b)*sinh(c + d*x)^2))]
    @test_int [sech(c + d*x)^1/(a + b*tanh(c + d*x)^2)^2, x, 3, ((2*a + b)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(2*a^(3/2)*(a + b)^(3/2)*d) + (b*sinh(c + d*x))/(2*a*(a + b)*d*(a + (a + b)*sinh(c + d*x)^2))]
    @test_int [sech(c + d*x)^2/(a + b*tanh(c + d*x)^2)^2, x, 3, atan((sqrt(b)*tanh(c + d*x))/sqrt(a))/(2*a^(3/2)*sqrt(b)*d) + tanh(c + d*x)/(2*a*d*(a + b*tanh(c + d*x)^2))]
    @test_int [sech(c + d*x)^3/(a + b*tanh(c + d*x)^2)^2, x, 3, atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a))/(2*a^(3/2)*sqrt(a + b)*d) + sinh(c + d*x)/(2*a*d*(a + (a + b)*sinh(c + d*x)^2))]
    @test_int [sech(c + d*x)^4/(a + b*tanh(c + d*x)^2)^2, x, 3, -((a - b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*a^(3/2)*b^(3/2)*d) + ((a + b)*tanh(c + d*x))/(2*a*b*d*(a + b*tanh(c + d*x)^2))]
    @test_int [sech(c + d*x)^5/(a + b*tanh(c + d*x)^2)^2, x, 5, atan(sinh(c + d*x))/(b^2*d) - ((2*a - b)*sqrt(a + b)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(2*a^(3/2)*b^2*d) + ((a + b)*sinh(c + d*x))/(2*a*b*d*(a + (a + b)*sinh(c + d*x)^2))]
    @test_int [sech(c + d*x)^6/(a + b*tanh(c + d*x)^2)^2, x, 5, -(((3*a - b)*(a + b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*a^(3/2)*b^(5/2)*d)) + tanh(c + d*x)/(b^2*d) + ((a + b)^2*tanh(c + d*x))/(2*a*b^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [sech(c + d*x)^7/(a + b*tanh(c + d*x)^2)^2, x, 6, ((4*a + 5*b)*atan(sinh(c + d*x)))/(2*b^3*d) - ((4*a - b)*(a + b)^(3/2)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(2*a^(3/2)*b^3*d) + ((a + b)*(2*a + b)*sinh(c + d*x))/(2*a*b^2*d*(a + (a + b)*sinh(c + d*x)^2)) - (sech(c + d*x)*tanh(c + d*x))/(2*b*d*(a + (a + b)*sinh(c + d*x)^2))]

    @test_int [cosh(c + d*x)^2/(a + b*tanh(c + d*x)^2)^3, x, 7, ((a + 7*b)*x)/(2*(a + b)^4) + (b^(3/2)*(35*a^2 + 14*a*b + 3*b^2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(5/2)*(a + b)^4*d) + (cosh(c + d*x)*sinh(c + d*x))/(2*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) - ((2*a - b)*b*tanh(c + d*x))/(4*a*(a + b)^2*d*(a + b*tanh(c + d*x)^2)^2) - ((a - 3*b)*b*(4*a + b)*tanh(c + d*x))/(8*a^2*(a + b)^3*d*(a + b*tanh(c + d*x)^2))]
    @test_int [cosh(c + d*x)^1/(a + b*tanh(c + d*x)^2)^3, x, 6, (3*b*(8*a^2 + 4*a*b + b^2)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(8*a^(5/2)*(a + b)^(7/2)*d) + sinh(c + d*x)/((a + b)^3*d) + (b^3*sinh(c + d*x))/(4*a*(a + b)^3*d*(a + (a + b)*sinh(c + d*x)^2)^2) + (3*b^2*(4*a + b)*sinh(c + d*x))/(8*a^2*(a + b)^3*d*(a + (a + b)*sinh(c + d*x)^2))]
    @test_int [sech(c + d*x)^1/(a + b*tanh(c + d*x)^2)^3, x, 4, ((8*a^2 + 8*a*b + 3*b^2)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(8*a^(5/2)*(a + b)^(5/2)*d) + (b*cosh(c + d*x)^2*sinh(c + d*x))/(4*a*(a + b)*d*(a + (a + b)*sinh(c + d*x)^2)^2) + (3*b*(2*a + b)*sinh(c + d*x))/(8*a^2*(a + b)^2*d*(a + (a + b)*sinh(c + d*x)^2))]
    @test_int [sech(c + d*x)^2/(a + b*tanh(c + d*x)^2)^3, x, 4, (3*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(5/2)*sqrt(b)*d) + tanh(c + d*x)/(4*a*d*(a + b*tanh(c + d*x)^2)^2) + (3*tanh(c + d*x))/(8*a^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [sech(c + d*x)^3/(a + b*tanh(c + d*x)^2)^3, x, 4, ((4*a + 3*b)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(8*a^(5/2)*(a + b)^(3/2)*d) + (b*sinh(c + d*x))/(4*a*(a + b)*d*(a + (a + b)*sinh(c + d*x)^2)^2) + ((4*a + 3*b)*sinh(c + d*x))/(8*a^2*(a + b)*d*(a + (a + b)*sinh(c + d*x)^2))]
    @test_int [sech(c + d*x)^4/(a + b*tanh(c + d*x)^2)^3, x, 4, -((a - 3*b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(5/2)*b^(3/2)*d) + ((a + b)*tanh(c + d*x))/(4*a*b*d*(a + b*tanh(c + d*x)^2)^2) - ((a - 3*b)*tanh(c + d*x))/(8*a^2*b*d*(a + b*tanh(c + d*x)^2))]
    @test_int [sech(c + d*x)^5/(a + b*tanh(c + d*x)^2)^3, x, 4, (3*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(8*a^(5/2)*sqrt(a + b)*d) + sinh(c + d*x)/(4*a*d*(a + (a + b)*sinh(c + d*x)^2)^2) + (3*sinh(c + d*x))/(8*a^2*d*(a + (a + b)*sinh(c + d*x)^2))]
    @test_int [sech(c + d*x)^6/(a + b*tanh(c + d*x)^2)^3, x, 4, ((3*a^2 - 2*a*b + 3*b^2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(5/2)*b^(5/2)*d) + ((a + b)*sech(c + d*x)^2*tanh(c + d*x))/(4*a*b*d*(a + b*tanh(c + d*x)^2)^2) + (3*(1/a^2 - 1/b^2)*tanh(c + d*x))/(8*d*(a + b*tanh(c + d*x)^2))]
    @test_int [sech(c + d*x)^7/(a + b*tanh(c + d*x)^2)^3, x, 6, -(atan(sinh(c + d*x))/(b^3*d)) + (sqrt(a + b)*(8*a^2 - 4*a*b + 3*b^2)*atan((sqrt(a + b)*sinh(c + d*x))/sqrt(a)))/(8*a^(5/2)*b^3*d) + ((a + b)*sinh(c + d*x))/(4*a*b*d*(a + (a + b)*sinh(c + d*x)^2)^2) - ((4*a - 3*b)*(a + b)*sinh(c + d*x))/(8*a^2*b^2*d*(a + (a + b)*sinh(c + d*x)^2))]

    #= ::Section:: =#
    #=Integrands*of*the*form*cosh(e+f*x)^m*(a+b*tanh(e+f*x)^3)^p=#

    #= ::Section:: =#
    #=Integrands*of*the*form*cosh(e+f*x)^m*(a+b*tanh(e+f*x)^4)^p=#

    #= ::Section:: =#
    #=Integrands*of*the*form*cosh(e+f*x)^m*(a+b*tanh(e+f*x)^n)^p=#

    #= ::Title::Closed:: =#
    #=Integrands*of*the*form*tanh(e+f*x)^m*(a+b*tanh(e+f*x)^n)^p=#

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*tanh(e+f*x)^m*(a+b*tanh(e+f*x)^2)^p=#

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*tanh(e+f*x)^m*(a+b*tanh(e+f*x)^2)^p=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [tanh(c + d*x)^4*(a + b*tanh(c + d*x)^2), x, 4, (a + b)*x - ((a + b)*tanh(c + d*x))/d - ((a + b)*tanh(c + d*x)^3)/(3*d) - (b*tanh(c + d*x)^5)/(5*d)]
    @test_int [tanh(c + d*x)^3*(a + b*tanh(c + d*x)^2), x, 3, ((a + b)*log(cosh(c + d*x)))/d - ((a + b)*tanh(c + d*x)^2)/(2*d) - (b*tanh(c + d*x)^4)/(4*d)]
    @test_int [tanh(c + d*x)^2*(a + b*tanh(c + d*x)^2), x, 3, (a + b)*x - ((a + b)*tanh(c + d*x))/d - (b*tanh(c + d*x)^3)/(3*d)]
    @test_int [tanh(c + d*x)^1*(a + b*tanh(c + d*x)^2), x, 2, ((a + b)*log(cosh(c + d*x)))/d - (b*tanh(c + d*x)^2)/(2*d)]
    @test_int [tanh(c + d*x)^0*(a + b*tanh(c + d*x)^2), x, 3, a*x + b*x - (b*tanh(c + d*x))/d]
    @test_int [coth(c + d*x)^1*(a + b*tanh(c + d*x)^2), x, 3, (b*log(cosh(c + d*x)))/d + (a*log(sinh(c + d*x)))/d]
    @test_int [coth(c + d*x)^2*(a + b*tanh(c + d*x)^2), x, 2, (a + b)*x - (a*coth(c + d*x))/d]
    @test_int [coth(c + d*x)^3*(a + b*tanh(c + d*x)^2), x, 3, -(a*coth(c + d*x)^2)/(2*d) + ((a + b)*log(sinh(c + d*x)))/d]
    @test_int [coth(c + d*x)^4*(a + b*tanh(c + d*x)^2), x, 4, (a + b)*x - ((a + b)*coth(c + d*x))/d - (a*coth(c + d*x)^3)/(3*d)]
    @test_int [coth(c + d*x)^5*(a + b*tanh(c + d*x)^2), x, 4, -(((a + b)*coth(c + d*x)^2)/(2*d)) - (a*coth(c + d*x)^4)/(4*d) + ((a + b)*log(sinh(c + d*x)))/d]

    @test_int [tanh(c + d*x)^4*(a + b*tanh(c + d*x)^2)^2, x, 4, (a + b)^2*x - ((a + b)^2*tanh(c + d*x))/d - ((a + b)^2*tanh(c + d*x)^3)/(3*d) - (b*(2*a + b)*tanh(c + d*x)^5)/(5*d) - (b^2*tanh(c + d*x)^7)/(7*d)]
    @test_int [tanh(c + d*x)^3*(a + b*tanh(c + d*x)^2)^2, x, 4, ((a + b)^2*log(cosh(c + d*x)))/d - ((a + b)^2*tanh(c + d*x)^2)/(2*d) - (b*(2*a + b)*tanh(c + d*x)^4)/(4*d) - (b^2*tanh(c + d*x)^6)/(6*d)]
    @test_int [tanh(c + d*x)^2*(a + b*tanh(c + d*x)^2)^2, x, 4, (a + b)^2*x - ((a + b)^2*tanh(c + d*x))/d - (b*(2*a + b)*tanh(c + d*x)^3)/(3*d) - (b^2*tanh(c + d*x)^5)/(5*d)]
    @test_int [tanh(c + d*x)^1*(a + b*tanh(c + d*x)^2)^2, x, 4, ((a + b)^2*log(cosh(c + d*x)))/d - (b*(a + b)*tanh(c + d*x)^2)/(2*d) - (a + b*tanh(c + d*x)^2)^2/(4*d)]
    @test_int [tanh(c + d*x)^0*(a + b*tanh(c + d*x)^2)^2, x, 4, (a + b)^2*x - (b*(2*a + b)*tanh(c + d*x))/d - (b^2*tanh(c + d*x)^3)/(3*d)]
    @test_int [coth(c + d*x)^1*(a + b*tanh(c + d*x)^2)^2, x, 4, ((a + b)^2*log(cosh(c + d*x)))/d + (a^2*log(tanh(c + d*x)))/d - (b^2*tanh(c + d*x)^2)/(2*d)]
    @test_int [coth(c + d*x)^2*(a + b*tanh(c + d*x)^2)^2, x, 4, (a + b)^2*x - (a^2*coth(c + d*x))/d - (b^2*tanh(c + d*x))/d]
    @test_int [coth(c + d*x)^3*(a + b*tanh(c + d*x)^2)^2, x, 4, -((a^2*coth(c + d*x)^2)/(2*d)) + ((a + b)^2*log(cosh(c + d*x)))/d + (a*(a + 2*b)*log(tanh(c + d*x)))/d]
    @test_int [coth(c + d*x)^4*(a + b*tanh(c + d*x)^2)^2, x, 4, (a + b)^2*x - (a*(a + 2*b)*coth(c + d*x))/d - (a^2*coth(c + d*x)^3)/(3*d)]
    @test_int [coth(c + d*x)^5*(a + b*tanh(c + d*x)^2)^2, x, 4, -((a*(a + 2*b)*coth(c + d*x)^2)/(2*d)) - (a^2*coth(c + d*x)^4)/(4*d) + ((a + b)^2*log(cosh(c + d*x)))/d + ((a + b)^2*log(tanh(c + d*x)))/d]
    @test_int [coth(c + d*x)^6*(a + b*tanh(c + d*x)^2)^2, x, 4, (a + b)^2*x - ((a + b)^2*coth(c + d*x))/d - (a*(a + 2*b)*coth(c + d*x)^3)/(3*d) - (a^2*coth(c + d*x)^5)/(5*d)]
    @test_int [coth(c + d*x)^7*(a + b*tanh(c + d*x)^2)^2, x, 4, -(((a + b)^2*coth(c + d*x)^2)/(2*d)) - (a*(a + 2*b)*coth(c + d*x)^4)/(4*d) - (a^2*coth(c + d*x)^6)/(6*d) + ((a + b)^2*log(cosh(c + d*x)))/d + ((a + b)^2*log(tanh(c + d*x)))/d]

    @test_int [tanh(c + d*x)^4*(a + b*tanh(c + d*x)^2)^3, x, 4, (a + b)^3*x - ((a + b)^3*tanh(c + d*x))/d - ((a + b)^3*tanh(c + d*x)^3)/(3*d) - (b*(3*a^2 + 3*a*b + b^2)*tanh(c + d*x)^5)/(5*d) - (b^2*(3*a + b)*tanh(c + d*x)^7)/(7*d) - (b^3*tanh(c + d*x)^9)/(9*d)]
    @test_int [tanh(c + d*x)^3*(a + b*tanh(c + d*x)^2)^3, x, 4, ((a + b)^3*log(cosh(c + d*x)))/d - ((a + b)^3*tanh(c + d*x)^2)/(2*d) - (b*(3*a^2 + 3*a*b + b^2)*tanh(c + d*x)^4)/(4*d) - (b^2*(3*a + b)*tanh(c + d*x)^6)/(6*d) - (b^3*tanh(c + d*x)^8)/(8*d)]
    @test_int [tanh(c + d*x)^2*(a + b*tanh(c + d*x)^2)^3, x, 4, (a + b)^3*x - ((a + b)^3*tanh(c + d*x))/d - (b*(3*a^2 + 3*a*b + b^2)*tanh(c + d*x)^3)/(3*d) - (b^2*(3*a + b)*tanh(c + d*x)^5)/(5*d) - (b^3*tanh(c + d*x)^7)/(7*d)]
    @test_int [tanh(c + d*x)^1*(a + b*tanh(c + d*x)^2)^3, x, 4, ((a + b)^3*log(cosh(c + d*x)))/d - (b*(a + b)^2*tanh(c + d*x)^2)/(2*d) - ((a + b)*(a + b*tanh(c + d*x)^2)^2)/(4*d) - (a + b*tanh(c + d*x)^2)^3/(6*d)]
    @test_int [tanh(c + d*x)^0*(a + b*tanh(c + d*x)^2)^3, x, 4, (a + b)^3*x - (b*(3*a^2 + 3*a*b + b^2)*tanh(c + d*x))/d - (b^2*(3*a + b)*tanh(c + d*x)^3)/(3*d) - (b^3*tanh(c + d*x)^5)/(5*d)]
    @test_int [coth(c + d*x)^1*(a + b*tanh(c + d*x)^2)^3, x, 4, ((a + b)^3*log(cosh(c + d*x)))/d + (a^3*log(tanh(c + d*x)))/d - (b^2*(3*a + b)*tanh(c + d*x)^2)/(2*d) - (b^3*tanh(c + d*x)^4)/(4*d)]
    @test_int [coth(c + d*x)^2*(a + b*tanh(c + d*x)^2)^3, x, 4, (a + b)^3*x - (a^3*coth(c + d*x))/d - (b^2*(3*a + b)*tanh(c + d*x))/d - (b^3*tanh(c + d*x)^3)/(3*d)]
    @test_int [coth(c + d*x)^3*(a + b*tanh(c + d*x)^2)^3, x, 4, -((a^3*coth(c + d*x)^2)/(2*d)) + ((a + b)^3*log(cosh(c + d*x)))/d + (a^2*(a + 3*b)*log(tanh(c + d*x)))/d - (b^3*tanh(c + d*x)^2)/(2*d)]
    @test_int [coth(c + d*x)^4*(a + b*tanh(c + d*x)^2)^3, x, 4, (a + b)^3*x - (a^2*(a + 3*b)*coth(c + d*x))/d - (a^3*coth(c + d*x)^3)/(3*d) - (b^3*tanh(c + d*x))/d]
    @test_int [coth(c + d*x)^5*(a + b*tanh(c + d*x)^2)^3, x, 4, -((a^2*(a + 3*b)*coth(c + d*x)^2)/(2*d)) - (a^3*coth(c + d*x)^4)/(4*d) + ((a + b)^3*log(cosh(c + d*x)))/d + (a*(a^2 + 3*a*b + 3*b^2)*log(tanh(c + d*x)))/d]
    @test_int [coth(c + d*x)^6*(a + b*tanh(c + d*x)^2)^3, x, 4, (a + b)^3*x - (a*(a^2 + 3*a*b + 3*b^2)*coth(c + d*x))/d - (a^2*(a + 3*b)*coth(c + d*x)^3)/(3*d) - (a^3*coth(c + d*x)^5)/(5*d)]
    @test_int [coth(c + d*x)^7*(a + b*tanh(c + d*x)^2)^3, x, 4, -((a*(a^2 + 3*a*b + 3*b^2)*coth(c + d*x)^2)/(2*d)) - (a^2*(a + 3*b)*coth(c + d*x)^4)/(4*d) - (a^3*coth(c + d*x)^6)/(6*d) + ((a + b)^3*log(cosh(c + d*x)))/d + ((a + b)^3*log(tanh(c + d*x)))/d]

    @test_int [tanh(c + d*x)^0*(a + b*tanh(c + d*x)^2)^4, x, 4, (a + b)^4*x - (b*(2*a + b)*(2*a^2 + 2*a*b + b^2)*tanh(c + d*x))/d - (b^2*(6*a^2 + 4*a*b + b^2)*tanh(c + d*x)^3)/(3*d) - (b^3*(4*a + b)*tanh(c + d*x)^5)/(5*d) - (b^4*tanh(c + d*x)^7)/(7*d)]

    @test_int [tanh(c + d*x)^0*(a + b*tanh(c + d*x)^2)^5, x, 4, (a + b)^5*x - (b*(5*a^4 + 10*a^3*b + 10*a^2*b^2 + 5*a*b^3 + b^4)*tanh(c + d*x))/d - (b^2*(10*a^3 + 10*a^2*b + 5*a*b^2 + b^3)*tanh(c + d*x)^3)/(3*d) - (b^3*(10*a^2 + 5*a*b + b^2)*tanh(c + d*x)^5)/(5*d) - (b^4*(5*a + b)*tanh(c + d*x)^7)/(7*d) - (b^5*tanh(c + d*x)^9)/(9*d)]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [tanh(c + d*x)^5/(a + b*tanh(c + d*x)^2), x, 4, log(cosh(c + d*x))/((a + b)*d) + (a^2*log(a + b*tanh(c + d*x)^2))/(2*b^2*(a + b)*d) - tanh(c + d*x)^2/(2*b*d)]
    @test_int [tanh(c + d*x)^4/(a + b*tanh(c + d*x)^2), x, 5, x/(a + b) + (a^(3/2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(b^(3/2)*(a + b)*d) - tanh(c + d*x)/(b*d)]
    @test_int [tanh(c + d*x)^3/(a + b*tanh(c + d*x)^2), x, 4, log(cosh(c + d*x))/((a + b)*d) - (a*log(a + b*tanh(c + d*x)^2))/(2*b*(a + b)*d)]
    @test_int [tanh(c + d*x)^2/(a + b*tanh(c + d*x)^2), x, 4, x/(a + b) - (sqrt(a)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(sqrt(b)*(a + b)*d)]
    @test_int [tanh(c + d*x)^1/(a + b*tanh(c + d*x)^2), x, 5, log(cosh(c + d*x))/((a + b)*d) + log(a + b*tanh(c + d*x)^2)/(2*(a + b)*d)]
    @test_int [tanh(c + d*x)^0/(a + b*tanh(c + d*x)^2), x, 3, x/(a + b) + (sqrt(b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(sqrt(a)*(a + b)*d)]
    @test_int [coth(c + d*x)^1/(a + b*tanh(c + d*x)^2), x, 4, log(cosh(c + d*x))/((a + b)*d) + log(tanh(c + d*x))/(a*d) - (b*log(a + b*tanh(c + d*x)^2))/(2*a*(a + b)*d)]
    @test_int [coth(c + d*x)^2/(a + b*tanh(c + d*x)^2), x, 5, x/(a + b) - (b^(3/2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(a^(3/2)*(a + b)*d) - coth(c + d*x)/(a*d)]
    @test_int [coth(c + d*x)^3/(a + b*tanh(c + d*x)^2), x, 4, -(coth(c + d*x)^2/(2*a*d)) + log(cosh(c + d*x))/((a + b)*d) + ((a - b)*log(tanh(c + d*x)))/(a^2*d) + (b^2*log(a + b*tanh(c + d*x)^2))/(2*a^2*(a + b)*d)]
    @test_int [coth(c + d*x)^4/(a + b*tanh(c + d*x)^2), x, 6, x/(a + b) + (b^(5/2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(a^(5/2)*(a + b)*d) - ((a - b)*coth(c + d*x))/(a^2*d) - coth(c + d*x)^3/(3*a*d)]

    @test_int [tanh(c + d*x)^5/(a + b*tanh(c + d*x)^2)^2, x, 4, log(cosh(c + d*x))/((a + b)^2*d) - (a*(a + 2*b)*log(a + b*tanh(c + d*x)^2))/(2*b^2*(a + b)^2*d) - a^2/(2*b^2*(a + b)*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^4/(a + b*tanh(c + d*x)^2)^2, x, 5, x/(a + b)^2 - (sqrt(a)*(a + 3*b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*b^(3/2)*(a + b)^2*d) + (a*tanh(c + d*x))/(2*b*(a + b)*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^3/(a + b*tanh(c + d*x)^2)^2, x, 4, log(cosh(c + d*x))/((a + b)^2*d) + log(a + b*tanh(c + d*x)^2)/(2*(a + b)^2*d) + a/(2*b*(a + b)*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^2/(a + b*tanh(c + d*x)^2)^2, x, 5, x/(a + b)^2 - ((a - b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*sqrt(a)*sqrt(b)*(a + b)^2*d) - tanh(c + d*x)/(2*(a + b)*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^1/(a + b*tanh(c + d*x)^2)^2, x, 4, log(cosh(c + d*x))/((a + b)^2*d) + log(a + b*tanh(c + d*x)^2)/(2*(a + b)^2*d) - 1/(2*(a + b)*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^0/(a + b*tanh(c + d*x)^2)^2, x, 5, x/(a + b)^2 + (sqrt(b)*(3*a + b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*a^(3/2)*(a + b)^2*d) + (b*tanh(c + d*x))/(2*a*(a + b)*d*(a + b*tanh(c + d*x)^2))]
    @test_int [coth(c + d*x)^1/(a + b*tanh(c + d*x)^2)^2, x, 4, log(cosh(c + d*x))/((a + b)^2*d) + log(tanh(c + d*x))/(a^2*d) - (b*(2*a + b)*log(a + b*tanh(c + d*x)^2))/(2*a^2*(a + b)^2*d) + b/(2*a*(a + b)*d*(a + b*tanh(c + d*x)^2))]
    @test_int [coth(c + d*x)^2/(a + b*tanh(c + d*x)^2)^2, x, 6, x/(a + b)^2 - (b^(3/2)*(5*a + 3*b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*a^(5/2)*(a + b)^2*d) - ((2*a + 3*b)*coth(c + d*x))/(2*a^2*(a + b)*d) + (b*coth(c + d*x))/(2*a*(a + b)*d*(a + b*tanh(c + d*x)^2))]
    @test_int [coth(c + d*x)^3/(a + b*tanh(c + d*x)^2)^2, x, 4, -(coth(c + d*x)^2/(2*a^2*d)) + log(cosh(c + d*x))/((a + b)^2*d) + ((a - 2*b)*log(tanh(c + d*x)))/(a^3*d) + (b^2*(3*a + 2*b)*log(a + b*tanh(c + d*x)^2))/(2*a^3*(a + b)^2*d) - b^2/(2*a^2*(a + b)*d*(a + b*tanh(c + d*x)^2))]
    @test_int [coth(c + d*x)^4/(a + b*tanh(c + d*x)^2)^2, x, 7, x/(a + b)^2 + (b^(5/2)*(7*a + 5*b)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(2*a^(7/2)*(a + b)^2*d) - ((2*a^2 - 2*a*b - 5*b^2)*coth(c + d*x))/(2*a^3*(a + b)*d) - ((2*a + 5*b)*coth(c + d*x)^3)/(6*a^2*(a + b)*d) + (b*coth(c + d*x)^3)/(2*a*(a + b)*d*(a + b*tanh(c + d*x)^2))]

    @test_int [tanh(c + d*x)^6/(a + b*tanh(c + d*x)^2)^3, x, 6, x/(a + b)^3 - (sqrt(a)*(3*a^2 + 10*a*b + 15*b^2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*b^(5/2)*(a + b)^3*d) + (a*tanh(c + d*x)^3)/(4*b*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) + (a*(3*a + 7*b)*tanh(c + d*x))/(8*b^2*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^5/(a + b*tanh(c + d*x)^2)^3, x, 4, log(cosh(c + d*x))/((a + b)^3*d) + log(a + b*tanh(c + d*x)^2)/(2*(a + b)^3*d) - a^2/(4*b^2*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) + (a*(a + 2*b))/(2*b^2*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^4/(a + b*tanh(c + d*x)^2)^3, x, 6, x/(a + b)^3 - ((a^2 + 6*a*b - 3*b^2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*sqrt(a)*b^(3/2)*(a + b)^3*d) + (a*tanh(c + d*x))/(4*b*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) - ((a + 5*b)*tanh(c + d*x))/(8*b*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^3/(a + b*tanh(c + d*x)^2)^3, x, 4, log(cosh(c + d*x))/((a + b)^3*d) + log(a + b*tanh(c + d*x)^2)/(2*(a + b)^3*d) + a/(4*b*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) - 1/(2*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^2/(a + b*tanh(c + d*x)^2)^3, x, 6, x/(a + b)^3 - ((3*a^2 - 6*a*b - b^2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(3/2)*sqrt(b)*(a + b)^3*d) - tanh(c + d*x)/(4*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) - ((3*a - b)*tanh(c + d*x))/(8*a*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^1/(a + b*tanh(c + d*x)^2)^3, x, 4, log(cosh(c + d*x))/((a + b)^3*d) + log(a + b*tanh(c + d*x)^2)/(2*(a + b)^3*d) - 1/(4*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) - 1/(2*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [tanh(c + d*x)^0/(a + b*tanh(c + d*x)^2)^3, x, 6, x/(a + b)^3 + (sqrt(b)*(15*a^2 + 10*a*b + 3*b^2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(5/2)*(a + b)^3*d) + (b*tanh(c + d*x))/(4*a*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) + (b*(7*a + 3*b)*tanh(c + d*x))/(8*a^2*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [coth(c + d*x)^1/(a + b*tanh(c + d*x)^2)^3, x, 4, log(cosh(c + d*x))/((a + b)^3*d) + log(tanh(c + d*x))/(a^3*d) - (b*(3*a^2 + 3*a*b + b^2)*log(a + b*tanh(c + d*x)^2))/(2*a^3*(a + b)^3*d) + b/(4*a*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) + (b*(2*a + b))/(2*a^2*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [coth(c + d*x)^2/(a + b*tanh(c + d*x)^2)^3, x, 7, x/(a + b)^3 - (b^(3/2)*(35*a^2 + 42*a*b + 15*b^2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(7/2)*(a + b)^3*d) - ((8*a^2 + 27*a*b + 15*b^2)*coth(c + d*x))/(8*a^3*(a + b)^2*d) + (b*coth(c + d*x))/(4*a*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) + (b*(9*a + 5*b)*coth(c + d*x))/(8*a^2*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [coth(c + d*x)^3/(a + b*tanh(c + d*x)^2)^3, x, 4, -(coth(c + d*x)^2/(2*a^3*d)) + log(cosh(c + d*x))/((a + b)^3*d) + ((a - 3*b)*log(tanh(c + d*x)))/(a^4*d) + (b^2*(6*a^2 + 8*a*b + 3*b^2)*log(a + b*tanh(c + d*x)^2))/(2*a^4*(a + b)^3*d) - b^2/(4*a^2*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) - (b^2*(3*a + 2*b))/(2*a^3*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]
    @test_int [coth(c + d*x)^4/(a + b*tanh(c + d*x)^2)^3, x, 8, x/(a + b)^3 + (b^(5/2)*(63*a^2 + 90*a*b + 35*b^2)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(8*a^(9/2)*(a + b)^3*d) - ((8*a^3 - 8*a^2*b - 55*a*b^2 - 35*b^3)*coth(c + d*x))/(8*a^4*(a + b)^2*d) - ((8*a^2 + 55*a*b + 35*b^2)*coth(c + d*x)^3)/(24*a^3*(a + b)^2*d) + (b*coth(c + d*x)^3)/(4*a*(a + b)*d*(a + b*tanh(c + d*x)^2)^2) + (b*(11*a + 7*b)*coth(c + d*x)^3)/(8*a^2*(a + b)^2*d*(a + b*tanh(c + d*x)^2))]

    @test_int [tanh(c + d*x)^0/(a + b*tanh(c + d*x)^2)^4,x, 7, x/(a + b)^4 + (sqrt(b)*(35*a^3 + 35*a^2*b + 21*a*b^2 + 5*b^3)*atan((sqrt(b)*tanh(c + d*x))/sqrt(a)))/(16*a^(7/2)*(a + b)^4*d) + (b*tanh(c + d*x))/(6*a*(a + b)*d*(a + b*tanh(c + d*x)^2)^3) + (b*(11*a + 5*b)*tanh(c + d*x))/(24*a^2*(a + b)^2*d*(a + b*tanh(c + d*x)^2)^2) + (b*(19*a^2 + 16*a*b + 5*b^2)*tanh(c + d*x))/(16*a^3*(a + b)^3*d*(a + b*tanh(c + d*x)^2))]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*tanh(e+f*x)^m*(a+b*tanh(e+f*x)^2)^(p/2)*when*a+b=0=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [sqrt(1 - tanh(x)^2), x, 3, asin(tanh(x))]
    @test_int [sqrt(-1 + tanh(x)^2), x, 4, -atanh(tanh(x)/sqrt(-sech(x)^2))]

    @test_int [(1 - tanh(x)^2)^(3/2), x, 4, (1/2)*asin(tanh(x)) + (1/2)*sqrt(sech(x)^2)*tanh(x)]
    @test_int [(-1 + tanh(x)^2)^(3/2), x, 5, (1/2)*atanh(tanh(x)/sqrt(-sech(x)^2)) - (1/2)*sqrt(-sech(x)^2)*tanh(x)]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [1/sqrt(1 - tanh(x)^2), x, 3, tanh(x)/sqrt(sech(x)^2)]
    @test_int [1/sqrt(-1 + tanh(x)^2), x, 3, tanh(x)/sqrt(-sech(x)^2)]

    #= ::Subsection::Closed:: =#
    #=Integrands*of*the*form*tanh(e+f*x)^m*(a+b*tanh(e+f*x)^2)^(p/2)=#

    #= ::Subsubsection::Closed:: =#
    #=p>0=#

    @test_int [tanh(x)^5*sqrt(a + b*tanh(x)^2), x, 7, sqrt(a + b)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b)) - sqrt(a + b*tanh(x)^2) + ((a - b)*(a + b*tanh(x)^2)^(3/2))/(3*b^2) - (a + b*tanh(x)^2)^(5/2)/(5*b^2)]
    @test_int [tanh(x)^4*sqrt(a + b*tanh(x)^2), x, 8, ((a^2 - 4*a*b - 8*b^2)*atanh((sqrt(b)*tanh(x))/sqrt(a + b*tanh(x)^2)))/(8*b^(3/2)) + sqrt(a + b)*atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2)) - ((a + 4*b)*tanh(x)*sqrt(a + b*tanh(x)^2))/(8*b) - (1/4)*tanh(x)^3*sqrt(a + b*tanh(x)^2)]
    @test_int [tanh(x)^3*sqrt(a + b*tanh(x)^2), x, 6, sqrt(a + b)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b)) - sqrt(a + b*tanh(x)^2) - (a + b*tanh(x)^2)^(3/2)/(3*b)]
    @test_int [tanh(x)^2*sqrt(a + b*tanh(x)^2), x, 7, -(((a + 2*b)*atanh((sqrt(b)*tanh(x))/sqrt(a + b*tanh(x)^2)))/(2*sqrt(b))) + sqrt(a + b)*atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2)) - (1/2)*tanh(x)*sqrt(a + b*tanh(x)^2)]
    @test_int [tanh(x)^1*sqrt(a + b*tanh(x)^2), x, 5, sqrt(a + b)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b)) - sqrt(a + b*tanh(x)^2)]
    @test_int [tanh(x)^0*sqrt(a + b*tanh(x)^2), x, 6, (-sqrt(b))*atanh((sqrt(b)*tanh(x))/sqrt(a + b*tanh(x)^2)) + sqrt(a + b)*atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))]
    @test_int [coth(x)^1*sqrt(a + b*tanh(x)^2), x, 7, (-sqrt(a))*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a)) + sqrt(a + b)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))]
    @test_int [coth(x)^2*sqrt(a + b*tanh(x)^2), x, 5, sqrt(a + b)*atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2)) - coth(x)*sqrt(a + b*tanh(x)^2)]
    @test_int [coth(x)^3*sqrt(a + b*tanh(x)^2), x, 8, -(((2*a + b)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a)))/(2*sqrt(a))) + sqrt(a + b)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b)) - (1/2)*coth(x)^2*sqrt(a + b*tanh(x)^2)]
    @test_int [coth(x)^4*sqrt(a + b*tanh(x)^2), x, 6, sqrt(a + b)*atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2)) - ((3*a + b)*coth(x)*sqrt(a + b*tanh(x)^2))/(3*a) - (1/3)*coth(x)^3*sqrt(a + b*tanh(x)^2)]
    @test_int [coth(x)^5*sqrt(a + b*tanh(x)^2), x, 9, -(((8*a^2 + 4*a*b - b^2)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a)))/(8*a^(3/2))) + sqrt(a + b)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b)) - ((4*a + b)*coth(x)^2*sqrt(a + b*tanh(x)^2))/(8*a) - (1/4)*coth(x)^4*sqrt(a + b*tanh(x)^2)]

    @test_int [tanh(x)^3*(a + b*tanh(x)^2)^(3/2), x, 7, (a + b)^(3/2)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b)) - (a + b)*sqrt(a + b*tanh(x)^2) - (1/3)*(a + b*tanh(x)^2)^(3/2) - (a + b*tanh(x)^2)^(5/2)/(5*b)]
    @test_int [tanh(x)^2*(a + b*tanh(x)^2)^(3/2), x, 8, -(((3*a^2 + 12*a*b + 8*b^2)*atanh((sqrt(b)*tanh(x))/sqrt(a + b*tanh(x)^2)))/(8*sqrt(b))) + (a + b)^(3/2)*atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2)) - (1/8)*(5*a + 4*b)*tanh(x)*sqrt(a + b*tanh(x)^2) - (1/4)*b*tanh(x)^3*sqrt(a + b*tanh(x)^2)]
    @test_int [tanh(x)^1*(a + b*tanh(x)^2)^(3/2), x, 6, (a + b)^(3/2)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b)) - (a + b)*sqrt(a + b*tanh(x)^2) - (1/3)*(a + b*tanh(x)^2)^(3/2)]
    @test_int [tanh(x)^0*(a + b*tanh(x)^2)^(3/2), x, 7, (-(1/2))*sqrt(b)*(3*a + 2*b)*atanh((sqrt(b)*tanh(x))/sqrt(a + b*tanh(x)^2)) + (a + b)^(3/2)*atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2)) - (1/2)*b*tanh(x)*sqrt(a + b*tanh(x)^2)]
    @test_int [coth(x)^1*(a + b*tanh(x)^2)^(3/2), x, 8, (-a^(3/2))*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a)) + (a + b)^(3/2)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b)) - b*sqrt(a + b*tanh(x)^2)]
    @test_int [coth(x)^2*(a + b*tanh(x)^2)^(3/2), x, 7, (-b^(3/2))*atanh((sqrt(b)*tanh(x))/sqrt(a + b*tanh(x)^2)) + (a + b)^(3/2)*atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2)) - a*coth(x)*sqrt(a + b*tanh(x)^2)]

    @test_int [sqrt(1 + tanh(x)^2), x, 5, -asinh(tanh(x)) + sqrt(2)*atanh((sqrt(2)*tanh(x))/sqrt(1 + tanh(x)^2))]
    @test_int [sqrt(-1 - tanh(x)^2), x, 6, atan(tanh(x)/sqrt(-1 - tanh(x)^2)) - sqrt(2)*atan((sqrt(2)*tanh(x))/sqrt(-1 - tanh(x)^2))]

    @test_int [(1 + tanh(x)^2)^(3/2), x, 6, (-(5/2))*asinh(tanh(x)) + 2*sqrt(2)*atanh((sqrt(2)*tanh(x))/sqrt(1 + tanh(x)^2)) - (1/2)*tanh(x)*sqrt(1 + tanh(x)^2)]
    @test_int [(-1 - tanh(x)^2)^(3/2), x, 7, (-(5/2))*atan(tanh(x)/sqrt(-1 - tanh(x)^2)) + 2*sqrt(2)*atan((sqrt(2)*tanh(x))/sqrt(-1 - tanh(x)^2)) + (1/2)*tanh(x)*sqrt(-1 - tanh(x)^2)]

    #= ::Subsubsection::Closed:: =#
    #=p<0=#

    @test_int [tanh(x)^5/sqrt(a + b*tanh(x)^2), x, 6, atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/sqrt(a + b) + ((a - b)*sqrt(a + b*tanh(x)^2))/b^2 - (a + b*tanh(x)^2)^(3/2)/(3*b^2)]
    @test_int [tanh(x)^4/sqrt(a + b*tanh(x)^2), x, 7, ((a - 2*b)*atanh((sqrt(b)*tanh(x))/sqrt(a + b*tanh(x)^2)))/(2*b^(3/2)) + atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/sqrt(a + b) - (tanh(x)*sqrt(a + b*tanh(x)^2))/(2*b)]
    @test_int [tanh(x)^3/sqrt(a + b*tanh(x)^2), x, 5, atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/sqrt(a + b) - sqrt(a + b*tanh(x)^2)/b]
    @test_int [tanh(x)^2/sqrt(a + b*tanh(x)^2), x, 6, -(atanh((sqrt(b)*tanh(x))/sqrt(a + b*tanh(x)^2))/sqrt(b)) + atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/sqrt(a + b)]
    @test_int [tanh(x)^1/sqrt(a + b*tanh(x)^2), x, 4, atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/sqrt(a + b)]
    @test_int [tanh(x)^0/sqrt(a + b*tanh(x)^2), x, 3, atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/sqrt(a + b)]
    @test_int [coth(x)^1/sqrt(a + b*tanh(x)^2), x, 7, -(atanh(sqrt(a + b*tanh(x)^2)/sqrt(a))/sqrt(a)) + atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/sqrt(a + b)]
    @test_int [coth(x)^2/sqrt(a + b*tanh(x)^2), x, 5, atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/sqrt(a + b) - (coth(x)*sqrt(a + b*tanh(x)^2))/a]
    @test_int [coth(x)^3/sqrt(a + b*tanh(x)^2), x, 8, -(((2*a - b)*atanh(sqrt(a + b*tanh(x)^2)/sqrt(a)))/(2*a^(3/2))) + atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/sqrt(a + b) - (coth(x)^2*sqrt(a + b*tanh(x)^2))/(2*a)]

    @test_int [tanh(x)^5/(a + b*tanh(x)^2)^(3/2), x, 6, atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/(a + b)^(3/2) - a^2/(b^2*(a + b)*sqrt(a + b*tanh(x)^2)) - sqrt(a + b*tanh(x)^2)/b^2]
    @test_int [tanh(x)^4/(a + b*tanh(x)^2)^(3/2), x, 7, -(atanh((sqrt(b)*tanh(x))/sqrt(a + b*tanh(x)^2))/b^(3/2)) + atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/(a + b)^(3/2) + (a*tanh(x))/(b*(a + b)*sqrt(a + b*tanh(x)^2))]
    @test_int [tanh(x)^3/(a + b*tanh(x)^2)^(3/2), x, 5, atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/(a + b)^(3/2) + a/(b*(a + b)*sqrt(a + b*tanh(x)^2))]
    @test_int [tanh(x)^2/(a + b*tanh(x)^2)^(3/2), x, 4, atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/(a + b)^(3/2) - tanh(x)/((a + b)*sqrt(a + b*tanh(x)^2))]
    @test_int [tanh(x)^1/(a + b*tanh(x)^2)^(3/2), x, 5, atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/(a + b)^(3/2) - 1/((a + b)*sqrt(a + b*tanh(x)^2))]
    @test_int [tanh(x)^0/(a + b*tanh(x)^2)^(3/2), x, 4, atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/(a + b)^(3/2) + (b*tanh(x))/(a*(a + b)*sqrt(a + b*tanh(x)^2))]
    @test_int [coth(x)^1/(a + b*tanh(x)^2)^(3/2), x, 8, -(atanh(sqrt(a + b*tanh(x)^2)/sqrt(a))/a^(3/2)) + atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/(a + b)^(3/2) + b/(a*(a + b)*sqrt(a + b*tanh(x)^2))]
    @test_int [coth(x)^2/(a + b*tanh(x)^2)^(3/2), x, 6, atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/(a + b)^(3/2) + (b*coth(x))/(a*(a + b)*sqrt(a + b*tanh(x)^2)) - ((a + 2*b)*coth(x)*sqrt(a + b*tanh(x)^2))/(a^2*(a + b))]

    @test_int [tanh(x)^6/(a + b*tanh(x)^2)^(5/2), x, 8, -(atanh((sqrt(b)*tanh(x))/sqrt(a + b*tanh(x)^2))/b^(5/2)) + atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/(a + b)^(5/2) + (a*tanh(x)^3)/(3*b*(a + b)*(a + b*tanh(x)^2)^(3/2)) + (a*(a + 2*b)*tanh(x))/(b^2*(a + b)^2*sqrt(a + b*tanh(x)^2))]
    @test_int [tanh(x)^5/(a + b*tanh(x)^2)^(5/2), x, 6, atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/(a + b)^(5/2) - a^2/(3*b^2*(a + b)*(a + b*tanh(x)^2)^(3/2)) + (a*(a + 2*b))/(b^2*(a + b)^2*sqrt(a + b*tanh(x)^2))]
    @test_int [tanh(x)^4/(a + b*tanh(x)^2)^(5/2), x, 6, atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/(a + b)^(5/2) + (a*tanh(x))/(3*b*(a + b)*(a + b*tanh(x)^2)^(3/2)) - ((a + 4*b)*tanh(x))/(3*b*(a + b)^2*sqrt(a + b*tanh(x)^2))]
    @test_int [tanh(x)^3/(a + b*tanh(x)^2)^(5/2), x, 6, atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/(a + b)^(5/2) + a/(3*b*(a + b)*(a + b*tanh(x)^2)^(3/2)) - 1/((a + b)^2*sqrt(a + b*tanh(x)^2))]
    @test_int [tanh(x)^2/(a + b*tanh(x)^2)^(5/2), x, 6, atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/(a + b)^(5/2) - tanh(x)/(3*(a + b)*(a + b*tanh(x)^2)^(3/2)) - ((2*a - b)*tanh(x))/(3*a*(a + b)^2*sqrt(a + b*tanh(x)^2))]
    @test_int [tanh(x)^1/(a + b*tanh(x)^2)^(5/2), x, 6, atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/(a + b)^(5/2) - 1/(3*(a + b)*(a + b*tanh(x)^2)^(3/2)) - 1/((a + b)^2*sqrt(a + b*tanh(x)^2))]
    @test_int [tanh(x)^0/(a + b*tanh(x)^2)^(5/2), x, 6, atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/(a + b)^(5/2) + (b*tanh(x))/(3*a*(a + b)*(a + b*tanh(x)^2)^(3/2)) + (b*(5*a + 2*b)*tanh(x))/(3*a^2*(a + b)^2*sqrt(a + b*tanh(x)^2))]
    @test_int [coth(x)^1/(a + b*tanh(x)^2)^(5/2), x, 9, -(atanh(sqrt(a + b*tanh(x)^2)/sqrt(a))/a^(5/2)) + atanh(sqrt(a + b*tanh(x)^2)/sqrt(a + b))/(a + b)^(5/2) + b/(3*a*(a + b)*(a + b*tanh(x)^2)^(3/2)) + (b*(2*a + b))/(a^2*(a + b)^2*sqrt(a + b*tanh(x)^2))]
    @test_int [coth(x)^2/(a + b*tanh(x)^2)^(5/2), x, 7, atanh((sqrt(a + b)*tanh(x))/sqrt(a + b*tanh(x)^2))/(a + b)^(5/2) + (b*coth(x))/(3*a*(a + b)*(a + b*tanh(x)^2)^(3/2)) + (b*(7*a + 4*b)*coth(x))/(3*a^2*(a + b)^2*sqrt(a + b*tanh(x)^2)) - ((3*a + 2*b)*(a + 4*b)*coth(x)*sqrt(a + b*tanh(x)^2))/(3*a^3*(a + b)^2)]

    @test_int [1/sqrt(1 + tanh(x)^2), x, 3, atanh((sqrt(2)*tanh(x))/sqrt(1 + tanh(x)^2))/sqrt(2)]
    @test_int [1/sqrt(-1 - tanh(x)^2), x, 3, atan((sqrt(2)*tanh(x))/sqrt(-1 - tanh(x)^2))/sqrt(2)]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*tanh(e+f*x)^m*(a+b*tanh(e+f*x)^3)^p=#

    @test_int [(a + b*tanh(c + d*x)^3)^2, x, 6, (a^2 + b^2)*x + (2*a*b*log(cosh(c + d*x)))/d - (b^2*tanh(c + d*x))/d - (a*b*tanh(c + d*x)^2)/d - (b^2*tanh(c + d*x)^3)/(3*d) - (b^2*tanh(c + d*x)^5)/(5*d), -(((a + b)^2*log(1 - tanh(c + d*x)))/(2*d)) + ((a - b)^2*log(1 + tanh(c + d*x)))/(2*d) - (b^2*tanh(c + d*x))/d - (a*b*tanh(c + d*x)^2)/d - (b^2*tanh(c + d*x)^3)/(3*d) - (b^2*tanh(c + d*x)^5)/(5*d)]

    @test_int [1/(1 + tanh(x)^3), x, 6, x/2 - (2*atan((1 - 2*tanh(x))/sqrt(3)))/(3*sqrt(3)) - 1/(6*(1 + tanh(x)))]

    #= ::Section::Closed:: =#
    #=Integrands*of*the*form*tanh(e+f*x)^m*(a+b*tanh(e+f*x)^4)^p=#

    @test_int [tanh(x)*(a + b*tanh(x)^4)^(3/2), x, 9, (-(1/4))*sqrt(b)*(3*a + 2*b)*atanh((sqrt(b)*tanh(x)^2)/sqrt(a + b*tanh(x)^4)) + (1/2)*(a + b)^(3/2)*atanh((a + b*tanh(x)^2)/(sqrt(a + b)*sqrt(a + b*tanh(x)^4))) - (1/4)*(2*(a + b) + b*tanh(x)^2)*sqrt(a + b*tanh(x)^4) - (1/6)*(a + b*tanh(x)^4)^(3/2)]
    @test_int [tanh(x)*(a + b*tanh(x)^4)^(1/2), x, 8, (-(1/2))*sqrt(b)*atanh((sqrt(b)*tanh(x)^2)/sqrt(a + b*tanh(x)^4)) + (1/2)*sqrt(a + b)*atanh((a + b*tanh(x)^2)/(sqrt(a + b)*sqrt(a + b*tanh(x)^4))) - (1/2)*sqrt(a + b*tanh(x)^4)]
    @test_int [tanh(x)/(a + b*tanh(x)^4)^(1/2), x, 4, atanh((a + b*tanh(x)^2)/(sqrt(a + b)*sqrt(a + b*tanh(x)^4)))/(2*sqrt(a + b))]
    @test_int [tanh(x)/(a + b*tanh(x)^4)^(3/2), x, 6, atanh((a + b*tanh(x)^2)/(sqrt(a + b)*sqrt(a + b*tanh(x)^4)))/(2*(a + b)^(3/2)) - (a - b*tanh(x)^2)/(2*a*(a + b)*sqrt(a + b*tanh(x)^4))]
    @test_int [tanh(x)/(a + b*tanh(x)^4)^(5/2), x, 7, atanh((a + b*tanh(x)^2)/(sqrt(a + b)*sqrt(a + b*tanh(x)^4)))/(2*(a + b)^(5/2)) - (a - b*tanh(x)^2)/(6*a*(a + b)*(a + b*tanh(x)^4)^(3/2)) - (3*a^2 - b*(5*a + 2*b)*tanh(x)^2)/(6*a^2*(a + b)^2*sqrt(a + b*tanh(x)^4))]

    #= ::Section:: =#
    #=Integrands*of*the*form*tanh(e+f*x)^m*(a+b*tanh(e+f*x)^n)^p=#
    end

max_stars_repo_path: test/6 Hyperbolic functions/6.3 Hyperbolic tangent/6.3.7 (d hyper)^m (a+b (c tanh)^n)^p.jl


text:
# ---
# jupyter:
#   jupytext:
#     formats: ipynb,jl:hydrogen
#     text_representation:
#       extension: .jl
#       format_name: hydrogen
#       format_version: '1.3'
#       jupytext_version: 1.11.2
#   kernelspec:
#     display_name: Julia 1.6.2
#     language: julia
#     name: julia-1.6
# ---

# %% [markdown]
# cf. https://github.com/genkuroki/public/blob/main/0019/ConcreteStructs.jl%20with%20Parameters.jl.ipynb

# %%
using TypeParams

macro macroexpand_rmln(code)
    :(macroexpand($__module__, $(QuoteNode(code)), recursive=true) |>
        Base.remove_linenums!)
end

# %%
@macroexpand_rmln @typeparams struct Foo_typedef
    a::{}
    b::{}
    c::{}
end

# %%
@macroexpand_rmln @typeparams struct Foo_typedef
    a::{}
    b::{}
    c::{<:AbstractString}
end

# %%
@macroexpand_rmln Base.@kwdef @typeparams struct Foo_typedef
    a::{} = 1
    b::{} = 2.0
    c::{<:AbstractString} = "three"
end

# %%
using Parameters

# %%
Base.@kwdef @typeparams struct Foo_typedef
    a::{} = 1
    b::{} = 2.0
    c::{<:AbstractString} = "three"
end

Foo_typedef()

# %%
@with_kw @typeparams struct Foo_with_jw
    a::{} = 1
    b::{} = 2.0
    c::{<:AbstractString} = "three"
end

# %% [markdown]
# cf. https://github.com/JuliaLang/julia/blob/4931faa34a8a1c98b39fb52ed4eb277729120128/base/util.jl#L455

# %%
@eval Parameters macro with_kw(typedef)
    typedef = macroexpand(__module__, typedef) # inserted
    return esc(with_kw(typedef, __module__, true))
end

# %%
@with_kw @typeparams struct Foo_with_kw
    a::{} = 1
    b::{} = 2.0
    c::{<:AbstractString} = "three"
end

Foo_with_kw()

# %%
@macroexpand_rmln @with_kw @typeparams struct Foo_with_kw
    a::{} = 1
    b::{} = 2.0
    c::{<:AbstractString} = "three"
end

# %%

ext: jl

max_stars_repo_path: 0019/On TypeParams.jl.jl

max_stars_repo_name: genkuroki/public

max_issues_repo_path: 0019/On TypeParams.jl.jl

max_issues_repo_name: genkuroki/public

max_forks_repo_path: 0019/On TypeParams.jl.jl

max_forks_repo_name: genkuroki/public


text:
function get_first_item(items)
    try
        items[1]
    catch e
        if isa(e, BoundsError)
            println("Error: Empty collection")
        elseif isa(e, KeyError)
            println("Error: Key not found")
        else
            println("Error: $e")
        end
    end
end

get_first_item(["a", "b", "c"]) # "a"
get_first_item([]) # Error: Empty collection (error message)
get_first_item(Dict(:a=>1, :b=>2)) # Error: KeyError(1) (error message)

f = open("sample.txt")
try
    for line in readlines(f)[1:5]
        println("line: $line")
    end
finally
    close(f)
end


text:
# TODO: Fix image birghtness when writing images out to file

using DelimitedFiles
using LinearAlgebra
using Images
using ImageIO

# Function to output a set of points as an image
function create_image_array(points, ranges, res; point_offset = 10)
    output_array = zeros(res)

    range_diffs = [ranges[1,2] - ranges[1,1], ranges[2,2] - ranges[2,1]]

    # bin the pixels
    for i = point_offset:size(points)[1]

        yval = floor(Int, (points[i,1] - ranges[2,1]) /
                          (range_diffs[2]/ res[2]))
        xval = floor(Int, (points[i,2] - ranges[1,1]) /
                          (range_diffs[1] / res[1]))

        if (xval < res[1] && yval < res[2] && xval > 0 && yval > 0)
            output_array[xval,yval] += 1.0
        end
    end

    if maximum(output_array) > 0
        return normalize(output_array)
    else
        return zeros(size(output_array))
    end

end

function write_image(points, ranges, res, filename; point_offset = 10)
    img_array = create_image_array(points, ranges, res;
                                   point_offset = point_offset)
    write_image(img_array, filename)

end

function write_image(img_array, filename)
    save(filename, reverse(img_array / maximum(img_array),dims=1))
end

# Create a set of affine transforms for function system
function create_sierpinski_set(A, B, C)
    return [[[0.5 0 A[1]*0.5; 0 0.5 A[2]*0.5; 0 0 1], .33],
            [[0.5 0 B[1]*0.5; 0 0.5 B[2]*0.5; 0 0 1], 0.33],
            [[0.5 0 C[1]*0.5; 0 0.5 C[2]*0.5; 0 0 1], 0.34]]
end

function create_barnsley_set()
    return [[[0.0 0.0 0.0; 0.0 0.16 0.0; 0.0 0.0 1.0], 0.01],
            [[0.85 0.04 0.0; -0.04 0.85 1.60; 0.0 0.0 1.0], 0.85],
            [[0.20 -0.26 0.0; 0.23 0.22 1.60; 0.0 0.0 1.0], 0.07],
            [[-0.15 0.28 0.0; 0.26 0.24 0.44; 0.0 0.0 1.0], 0.07]]
end

function select_array(hutchinson)

    rnd = rand()
    if rnd < hutchinson[1][2]
        return hutchinson[1][1]
    end

    rnd_sum = hutchinson[1][2]

    for i = 2:length(hutchinson)
        if rnd > rnd_sum && rnd < rnd_sum + hutchinson[i][2]
            return hutchinson[i][1]
        end
        rnd_sum += hutchinson[i][2]
    end

    return hutchinson[end][2]

end

# This is a function to simulate a "chaos game"
function chaos_game(n::Int, hutchinson)

    # Initializing the output array and the initial point
    output_points = zeros(n,2)
    point = [rand(), rand(), 1]

    for i = 1:n
        output_points[i,:] .= point[1:2]
        point = select_array(hutchinson)*point
    end

    return output_points

end

function main()
    #hutchinson = create_sierpinski_set([0.0, 0.0], [0.5, sqrt(0.75)], [1.0, 0.0])
    hutchinson = create_barnsley_set()
    output_points = chaos_game(100000000, hutchinson)
    #println(output_points)
    writedlm("out.dat", output_points)
    return output_points
end

max_stars_repo_name: leios/simuleios

max_issues_repo_name: leios/simuleios

max_forks_repo_name: leios/simuleios


text:
#=
    Algorithm for testing cop numbers 1,2,3
    By Jérémie Turcotte

    Algorithm inspired by those suggested, for example, in https://math.ryerson.ca/~abonato/papers/distcops_bcp030109.pdf, https://www.sciencedirect.com/science/article/pii/S0012365X12000064 and https://pub.tik.ee.ethz.ch/students/2016-HS/BA-2016-20.pdf.

    Also includes an example of how to scan various files of graphs, in the g6 format, for which to breakdown the number of graphs of each cop number.

    As codes for the various cop numbers are very similar, we only comment the code for cop number 2.
=#

using LightGraphs, GraphIO, Base

# Returns true if the line i in mat (of size n^2) is all true
function convertToBool1(mat,i)
    return !(false in mat[i,:])
end

# Returns true if the line ij in mat (of size n^3) is all true
function convertToBool2(mat,i,j)
    return !(false in mat[i,j,:])
end

# Returns true if the line ijl in mat (of size n^4) is all true
function convertToBool3(mat,i,j,l)
    return !(false in mat[i,j,l,:])
end

# Returns true if c(G)=1, false if c(G)>1
function oneCopWin(g)
    n=nv(g)
    configs=falses(n,n)
    queued=trues(n)

    for i in 1:n
        for k in 1:n
            templist=vcat(neighbors(g,k),k)
            if i in templist
                configs[i,k]=true
            end
        end
    end

    for i in 1:n
        if (convertToBool1(configs,i))
            return true
        end
    end

    bigchange=true

    while bigchange
        bigchange=false

        for i in 1:n
            if queued[i]
                queued[i]=false
                for ip in vcat(neighbors(g,i),i)

                    changed=false

                    for kp in 1:n
                        if !configs[ip,kp]
                            temp=true

                            for k in vcat(neighbors(g,kp),kp)
                                if !configs[i,k]
                                    temp=false
                                    break
                                end
                            end

                            if temp
                                configs[ip,kp]=true
                                changed=true

                                if (convertToBool1(configs,ip))
                                    return true
                                end
                            end
                        end
                    end

                    if changed
                        queued[ip]=true
                        bigchange=true
                    end
                end
            end
        end
    end

    return false
end

# Returns true if c(G)<=2, false if c(G)>2
function twoCopWin(g)
    n=nv(g) # number of vertices in g

    configs=falses(n,n,n)
    #=
        At any given moment in the code, configs[i,j,k] will be true if we know that there is a strategy to win if there are cops on i and j and a robber on k (and it is cops' turn).
        Will be false if either we do not know yet, or there is no winning strategy in that position (which is why we start by initializing the array to all false).
        The idea of the algorithm is to progressively fill up the matrix by finding new winning strategies, going backwards starting from the final turn.
    =#

    queued=trues(n,n) # Will represent the positions (i,j) that think we should verify soon. We start by deeming all positions interesting.

    # If either i or j is in the neighbourhood of k, then with cops on i and j, a robber on k will immediately be caught.
    for i in 1:n
        for j in 1:i
            for k in 1:n
                templist=vcat(neighbors(g,k),k)
                if i in templist || j in templist
                    configs[i,j,k]=true
                    configs[j,i,k]=true # To not repeat the same calculations, we only chose j between 1 and i : the order of (i,j) does not matter.
                end
            end
        end
    end

    # If there exists a choice of starting positions (i,j) for the cops such that for any choice of robber position k there is a winning strategy, then 2 cops can win.
    # Checking this now amounts to verifying if there is a dominating set of size 2 in the graph.
    for i in 1:n
        for j in 1:i
            if (convertToBool2(configs,i,j))
                return true
            end
        end
    end

    bigchange=true

    while bigchange # If the matrix did not see any change in the last iteration, then there will not be any further change at any time: 2 cops cannot win.
        bigchange=false

        for i in 1:n
            for j in 1:i
                if queued[i,j] # Suppose we consider (i,j) to be an interesting position: either because we are in the start of the algorithm or because for some k mat[i,j,k] changed value recently, and we want to see if this impacts neighbouring positions.

                    queued[i,j]=false

                    for ip in vcat(neighbors(g,i),i), jp in vcat(neighbors(g,j),j) # We choose (ip,jp) such that cops can move to (i,j) in 1 turn.

                        changed=false

                        for kp in 1:n # We consider every possible position for the robber

                            if !configs[ip,jp,kp] # We only need to consider those kp such that we don't already know gives a winning position
                                temp=true

                                for k in vcat(neighbors(g,kp),kp) # We consider the vertices k that the robber can move to from kp
                                    if !configs[i,j,k] # If there is a vertex k where the robber can go such that the move (ip,jp)->(i,j) does not yield a winning position, we cannot say anything new.
                                        temp=false
                                        break
                                    end
                                end

                                if temp # Otherwise, if the move (ip,jp)->(i,j) gives a winning position whatever the robber does (for every choice of k), we know that (ip,jp,kp) is a winning position.
                                    configs[ip,jp,kp]=true
                                    configs[jp,ip,kp]=true

                                    if (convertToBool2(configs,ip,jp)) # We verify if this gives us a winning starting position (ip,jp), if so we are done.
                                        return true
                                    end

                                    changed=true # Indicates that at least one triple (ip,jp,kp) has changed value.
                                end
                            end
                        end

                        if changed # If at least one triple (ip,jp,kp) changed value, then we deem that (ip,jp) might be interesting : this means we may "be ready" to find winning strategies for neighbour positions.
                            queued[ip,jp]=true
                            queued[jp,ip]=true
                            bigchange=true
                        end
                    end
                end
            end
        end
    end

    return false
end

# Returns true if c(G)<=3, false if c(G)>3
function threeCopWin(g)
    n=nv(g)
    configs=falses(n,n,n,n)
    queued=trues(n,n,n)

    for i in 1:n
        for j in 1:i
            for l in 1 : j
                for k in 1:n
                    templist=vcat(neighbors(g,k),k)
                    if i in templist || j in templist || l in templist
                        configs[i,j,l,k]=true
                        configs[j,i,l,k]=true
                        configs[i,l,j,k]=true
                        configs[j,l,i,k]=true
                        configs[l,i,j,k]=true
                        configs[l,j,i,k]=true
                    end
                end
            end
        end
    end

    for i in 1:n
        for j in 1:i
            for k in 1:j
                if (convertToBool3(configs,i,j,k))
                    return true
                end
            end
        end
    end

    bigchange=true

    while bigchange
        bigchange=false

        for i in 1:n
            for j in 1:i
                for l in 1:j
                    if queued[i,j,l]
                        queued[i,j,l]=false
                        for ip in vcat(neighbors(g,i),i), jp in vcat(neighbors(g,j),j), lp in vcat(neighbors(g,l),l)

                            changed=false

                            for kp in 1:n
                                if !configs[ip,jp,lp,kp]
                                    temp=true

                                    for k in vcat(neighbors(g,kp),kp)
                                        if !configs[i,j,l,k]
                                            temp=false
                                            break
                                        end
                                    end

                                    if temp
                                        configs[ip,jp,lp,kp]=true
                                        configs[jp,ip,lp,kp]=true
                                        configs[ip,lp,jp,kp]=true
                                        configs[jp,lp,ip,kp]=true
                                        configs[lp,ip,jp,kp]=true
                                        configs[lp,jp,ip,kp]=true

                                        changed=true

                                        if (convertToBool3(configs,ip,jp,lp))
                                            return true
                                        end
                                    end
                                end
                            end

                            if changed
                                queued[ip,jp,lp]=true
                                queued[jp,ip,lp]=true
                                queued[ip,lp,jp]=true
                                queued[jp,lp,ip]=true
                                queued[lp,ip,jp]=true
                                queued[lp,jp,ip]=true
                                bigchange=true
                            end
                        end
                    end
                end
            end
        end
    end

    return false
end

# Example of function to load a file of graphs in the graph6 format
function loadList(i)
    return collect(values(loadgraphs(string("/n20d2D3/graphs_20_2_3_",i,"_20000.g6"), GraphIO.Graph6.Graph6Format())));
end

#=
    Example of function to manage reading each file and breaking down the cop numbers

    Will print the breakdown of the cop numbers of the graphs and will save the graphs needing 3 and 4 cops in files

    This example supports multithreading, see https://julialang.org/blog/2019/07/multithreading/ to change the number of threads.
    Experimentally, speedup of almost factor 2 between 1 and 2 threads but does not improve much after 4 threads.
=#

function fctThreaded(part)
    totalonecopcount=0
    totaltwocopcount=0
    totalthreecopcount=0
    totalfourcopcount=0

    d3=Dict{AbstractString,AbstractGraph}()
    d4=Dict{AbstractString,AbstractGraph}()

    start=(part-1)*400
    stop=part*400-1

    for i in start:stop

        localonecopcount=Threads.Atomic{Int}(0)
        localtwocopcount=Threads.Atomic{Int}(0)
        localthreecopcount=Threads.Atomic{Int}(0)
        localfourcopcount=Threads.Atomic{Int}(0)

        liste=loadList(i)

        Threads.@threads for g in liste
            if oneCopWin(g)
                Threads.atomic_add!(localonecopcount,1)
            elseif twoCopWin(g)
                Threads.atomic_add!(localtwocopcount,1)
            elseif threeCopWin(g)
                Threads.atomic_add!(localthreecopcount,1)
                d3[string(i,"--",part,"--",Threads.threadid(),"--",localthreecopcount[])]=g
            else
                Threads.atomic_add!(localfourcopcount,1)
                d4[string(i,"--",part,"--",Threads.threadid(),"--",localfourcopcount[])]=g
            end
        end

        totalonecopcount=totalonecopcount+localonecopcount[]
        totaltwocopcount=totaltwocopcount+localtwocopcount[]
        totalthreecopcount=totalthreecopcount+localthreecopcount[]
        totalfourcopcount=totalfourcopcount+localfourcopcount[]

        println(string(i," ",localonecopcount[]," ",localtwocopcount[]," ",localthreecopcount[]," ",localfourcopcount[]," "))
        flush(stdout)
    end

    savegraph(string("./n14d1D4_3cops_part",part,".g6"), d3, GraphIO.Graph6.Graph6Format())
    savegraph(string("./n14d1D4_4cops_part",part,".g6"), d4, GraphIO.Graph6.Graph6Format())

    println(string("Total : ", totalonecopcount," ",totaltwocopcount," ",totalthreecopcount," ",totalfourcopcount," "))
end

# To start the program from the command line
@time fctThreaded(parse(Int64, ARGS[1]))

max_stars_repo_path: Cop number/copnumber.jl

max_stars_repo_name: tjeremie/Cops-and-robbers

max_issues_repo_path: Cop number/copnumber.jl

max_issues_repo_name: tjeremie/Cops-and-robbers

max_forks_repo_path: Cop number/copnumber.jl

max_forks_repo_name: tjeremie/Cops-and-robbers


text:
import RDatasets
import DataFrames: DataFrame
using LowRankModels, FullRankModels
import FirstOrderOptimization: PrismaParams

# pick a data set
df = RDatasets.dataset("psych", "msq")

# just fit four of the columns, to try out all four data types
dd = DataFrame([df[s] for s in [:TOD, :Scale, :Vigorous, :Wakeful]])
dd[end] = (dd[end].==1)
datatypes = [:real, :cat, :ord, :bool]

# form model
glrm = GLRM(dd, 2, datatypes; scale=false, offset=false)

# full rank model
gfrm = GFRM(glrm; force=true, use_reg_scale = false)

# XXX for now...
train_error, test_error, train_glrms, test_glrms = cross_validate(gfrm, nfolds=5, params=PrismaParams(maxiter = 3))

U, ch = fit!(gfrm, PrismaParams(maxiter = 3))

# fit it!
glrmp = GLRM(gfrm, 3)
fit!(glrmp)

println("the difference between the model fit by the GLRM and the GFRM is")
@show(vecnorm(glrmp.X'*glrmp.Y - U)/vecnorm(U))

### test cross validation

do_cv_tests = true
do_cv = true
do_cv_by_iter = true
do_reg_path = true
do_plot = false

if do_cv && do_cv_tests
    println("Computing cross validation error for each fold")
	train_error, test_error, train_glrms, test_glrms = cross_validate(gfrm, nfolds=5, params=PrismaParams(maxiter = 3))
    df = DataFrame(train_error = train_error, test_error = test_error)
end

if do_cv_by_iter && do_cv_tests
    println("Computing training and testing error as a function of iteration number")
    train_error, test_error = cv_by_iter(gfrm)
    df = DataFrame(train_error = train_error, test_error = test_error)
end

if do_reg_path && do_cv_tests
    println("Computing regularization path")
    train_error, test_error, train_time, model_onenorm, reg_params =
    regularization_path(gfrm, params=params, reg_params=logspace(2,-2,5))
    df = DataFrame(train_error = train_error, test_error = test_error,
                   train_time = train_time, model_onenorm=model_onenorm, reg_param = reg_params)
end


text:
"""MethodAnalysis Tutorial
Credits go to:
Tim Holy -  youtube
(as a Part of Series of High-Performance Computing Series)

# Pearl1
only bit of code, defining method(add2): Doing different things when given differnt Inputs (me: Julia helps that by automatic allocation (of data types?))

# Pearl2
julia adds this method the list, upon reading this new DataType Input(Vector{Int64} (alias for Array{Int64, 1})) -returns final answer (as all variables initialized)

 """
addTwo(x) = x[1] + x[2]  # Pearl1 : MethodInstance for addTwo(::Vector{Int64})
typeof(addTwo(x)) #thought this suffice ##ERROR: need variable to be defined- methodinstances to use instead
#######################
addTwo([1.0, 2.0]) # Pearl2 2-element Vector{Core.MethodInstance}: MethodInstance for addTwo(::Vector{Int64}) MethodInstance for addTwo(::Vector{Float64})

addTwo([1, 2])

"""
```
One way to Produce multiple Appetites, is to Produce Multiple Methods - Tim Holy
```

running methods tells us that
how many Number of Methods
"""

methods(addTwo)
"""to Extract the Method (to be called) giveen types (of Argument)
Julia Defines (at) which macro, so that you can
"""
m = @which addTwo([1, 2]) # same pronoun

function whichMacro(fun = addTwo([1, 2]))
    return @which addTwo([1, 2])
end

using MethodAnalysis
"""
A package with:

methodinstances(@which add())
"""

methodinstances(@which addTwo([1, 2]))

# For DataType ( int or  float) #- its just a 2 ways of "mthod specization "

@code lowered add2([1, 2]) #- represents the method, not a particular mrthodinstance

"""

one method 2 or more method specialization

you Can create methods, that depend on specific types

that is one created by a compiler a.k.a **compiler specialization**
me: see- multidispatching
#----

Let's make another

"""

addTwo((1, 2.0))

methodinstances(whichMacro(addTwo((1, 2.0))))
"""
3-element Vector{Core.MethodInstance}:
 MethodInstance for addTwo(::Vector{Int64})
 MethodInstance for addTwo(::Vector{Float64})
 MethodInstance for addTwo(::Tuple{Int64, Float64})

Redundancy-free

- Julia creates these first time ,call add2 with a new type

- On second call(later call), julia just uses the code it has already compiled

all compilation: the ammount of work to be done to compile all these methods & instances
can actually take long-time

sinc it has the code, in the running session , when you call function

'''if already done (julia allocated session with this function in memory)
then let's just run that

"""

#---what differences betwen MethodInstancees
#=
running macro @code

    macro code_lowered(ex0...)
    thecall = gen_call_with_extracted_types_and_kwargs(__module__, :code_lowered, ex0)
    quote
        results = $thecall
        length(results) == 1 ? results[1] : results
    end
end
=#

"""
gives a representation of a specific method
that is applicable

CodeInfo(
1 ─ %1 = Base.getindex(x, 1) x[1] implemented as a call `getindex(x,1)` (defined in Base)
│   %2 = Base.getindex(x, 2)
│   %3 = %1 + %2
└──      return %3
)

"""
@code_lowered addTwo([1, 2])

#=

%3 = %1 + %2
are the compiler lingo, some other markers
indicate blocks of code that execute
codeblock:
executes without branches (no if,while,... within the block)

why? the reson is, no additional specialization
look to now at mthod instances
how? by Switching to Another Macro

note:
optimize = false : turns off some julia optimization
(Inference Engine) is willing to make
=#

"""addTwo
specialized for whatever type its Arguments are

    code_typed optimize
Like code_lowered with type annotations

"""
@code_typed optimize = false addTwo([1, 2]) #represents the specific methodinstances
"""addTwo
specialized for whatever type its Arguments are

    code_typed optimize

    @code_typed optimize = false addTwo([1, 2])
CodeInfo(
1 ─ %1 = Base.getindex(x, 1)::Int64
│   %2 = Base.getindex(x, 2)::Int64
│   %3 = (%1 + %2)::Int64
└──      return %3
) => Int64
"""

@code_typed optimize = false addTwo([1.0, 2.0])

"""
CodeInfo(
1 ─ %1 = Base.getindex(x, 1)::Float64
│   %2 = Base.getindex(x, 2)::Float64
│   %3 = (%1 + %2)::Float64
└──      return %3
) => Float64
"""
#--- mixed input : 1 int, 2 float
@code_typed optimize = false addTwo((1, 2.0))

"""

CodeInfo(
1 ─ %1 = Base.getindex(x, 1)::Int64
│   %2 = Base.getindex(x, 2)::Float64
│   %3 = (%1 + %2)::Float64
└──      return %3
) => Float64
"""
#--- how julia knows about this: Type Inference

typeof([1, 2])

@code_typed optimize = false getindex([1, 2], 1)
#=
CodeInfo(
1 ─ %1 = Base.arrayref($(Expr(:boundscheck)), A, i1)::Int64
└──      return %1
) => Int64
=#
@code_typed optimize = false 1 + 2

#=
CodeInfo(
1 ─ %1 = Base.mul_int(x, y)::Int64
└──      return %1
) => Int64

=#

"""julia is built on top of a set of v. primitive operations
that ar essentially built-in
add_int is a primitive , built-in (not a generic type)
-it's one of the 80 (or so) primitives that julia is built on
"""

@code_typed optimize = false Base.add_int(1, 2) # 1 * 2 #cannot further introspect

"""
arametrization.jl:213

CodeInfo(
1 ─ %1 = Base.promote(x, y)::Tuple{Float64, Float64} # promotes the first 2 different types
│   %2 = Core._apply_iterate(Base.iterate, Base.:+, %1)::Float64 # calls plus
└──      return %2
) => Float64

Note: same syntax for a variable argument - multiple arguments passed into the same function

that is inefficient, but julia optimizes that thing

how by turning optimization feature of code_typed

CodeInfo(
1 ─ %1 = Base.sitofp(Float64, x)::Float64
│   %2 = Base.add_float(%1, y)::Float64
└──      return %2
) => Float64

converts integer to Float64
2 then it adds 2 Float64

"""

@code_typed optimize = true 1 + 2.0

#--- llvm

"""
Note: this is as far as you go to Diagnose your problems

julia also converts code deeper to
 llnm
format that interacts with compiler using macros

@code_llvm

@code_native  - the final CPU  instructions, optimized for your specific Machine

"""
s = nothing
"""
code llvm

@code_llvm optimize = false 1 + 2

;  @ int.jl:87 within `+'
; Function Attrs: uwtable
define i64 @"julia_+_2061"(i64 signext %0, i64 signext %1) #0 {
top:
  %2 = call {}*** @julia.ptls_states()
  %3 = bitcast {}*** %2 to {}**
  %4 = getelementptr inbounds {}*, {}** %3, i64 4
  %5 = bitcast {}** %4 to i64**
  %6 = load i64*, i64** %5, align 8
  %7 = add i64 %0, %1
  ret i64 %7
}
"""
@code_llvm optimize = true 1 + 2

#=
;  @ promotion.jl:321 within `+'
; Function Attrs: uwtable
define double @"julia_+_2096"(i64 signext %0, double %1) #0 {
top:
  %2 = call {}*** @julia.ptls_states()
  %3 = bitcast {}*** %2 to {}**
  %4 = getelementptr inbounds {}*, {}** %3, i64 4
  %5 = bitcast {}** %4 to i64**
  %6 = load i64*, i64** %5, align 8
; ┌ @ promotion.jl:292 within `promote'
; │┌ @ promotion.jl:269 within `_promote'
; ││┌ @ number.jl:7 within `convert'
; │││┌ @ float.jl:94 within `Float64'
      %7 = sitofp i64 %0 to double
; └└└└
;  @ promotion.jl:321 within `+' @ float.jl:326
  %8 = fadd double %7, %1
;  @ promotion.jl:321 within `+'
  ret double %8
}

-----
;  @ promotion.jl:321 within `+'
; Function Attrs: uwtable
define double @"julia_+_2094"(i64 signext %0, double %1) #0 {
top:
; ┌ @ promotion.jl:292 within `promote'
; │┌ @ promotion.jl:269 within `_promote'
; ││┌ @ number.jl:7 within `convert'
; │││┌ @ float.jl:94 within `Float64'
      %2 = sitofp i64 %0 to double
; └└└└
;  @ promotion.jl:321 within `+' @ float.jl:326
  %3 = fadd double %2, %1
;  @ promotion.jl:321 within `+'
  ret double %3
}
=#

@code_llvm optimize = false 1 + 2.0

#=@code_native 1 + 2
        .text
; ┌ @ int.jl:87 within `+'
        pushq   %rbp
        movq    %rsp, %rbp
        leaq    (%rcx,%rdx), %rax
        popq    %rbp
        retq
        nopw    (%rax,%rax)
; └

julia> ) => Float64

//---------------------------
julia> @code_native 1 + 2.0
        .text
; ┌ @ promotion.jl:321 within `+'
        pushq   %rbp
        movq    %rsp, %rbp
; │┌ @ promotion.jl:292 within `promote'
; ││┌ @ promotion.jl:269 within `_promote'
; │││┌ @ number.jl:7 within `convert'
; ││││┌ @ float.jl:94 within `Float64'
        vcvtsi2sd       %rcx, %xmm0, %xmm0
; │└└└└
; │ @ promotion.jl:321 within `+' @ float.jl:326
        vaddsd  %xmm1, %xmm0, %xmm0
; │ @ promotion.jl:321 within `+'
        popq    %rbp
        retq
        nop
; └

=#

#= @code_native addTwo(1, 2)

as it is a generic function , There is no matching native code for it
ERROR: LoadError: no unique matching method found for the specified argument
types
=#

#= @code_llvm addTwo(1, 2)
ERROR: LoadError: no unique matching method found for the specified argument
types
=# #uncomment line for testing only
#@code_llvm addTwo(1, 2)

max_stars_repo_path: Tutorial/Tim Holy/codeInspection.jl

max_stars_repo_name: adamwillisMastery/DeepLearner

max_issues_repo_path: Tutorial/Tim Holy/codeInspection.jl

max_issues_repo_name: adamwillisMastery/DeepLearner

max_forks_repo_path: Tutorial/Tim Holy/codeInspection.jl

max_forks_repo_name: adamwillisXanax/DeepLearner


text:
view_x(d::AbstractDataContainer, indices) = view(d.X, indices)
view_y(::AbstractLikelihood, y::AbstractVector, i::AbstractVector) = view(y, i)
function view_y(l::AbstractLikelihood, d::AbstractDataContainer, i::AbstractVector)
    return view_y(l, output(d), i)
end
function view_y(l::AbstractLikelihood, d::MODataContainer, i::AbstractVector)
    return view_y.(l, output(d), Ref(i))
end
function view_y(
    l::Tuple{Vararg{<:AbstractLikelihood}}, d::MODataContainer, i::AbstractVector
)
    return view_y.(l, output(d), Ref(i))
end

# Verify that the data is self-consistent and consistent with the likelihood ##
function check_data!(y::AbstractArray, likelihood::Union{Distribution,AbstractLikelihood})
    return treat_labels!(y, likelihood)
end

function wrap_data(X, y, likelihood::AbstractLikelihood)
    y = check_data!(y, likelihood)
    return wrap_data(X, y)
end

function wrap_data(X, y, likelihoods::Tuple{Vararg{<:AbstractLikelihood}})
    ys = map(check_data!, y, likelihoods)
    return wrap_modata(X, ys)
end


text:
using JSON, JSON3, Test, JsonGrinder

@testset "JSON and JSON3 parity" begin
    j1 = """{"a": 4, "b": {"a":[1,2,3],"b": 1},"c": { "a": {"a":[1,2,3],"b":[4,5,6]}}}"""
	j2 = """{"a": 4, "c": { "a": {"a":[2,3],"b":[5,6]}}}"""
	j3 = """{"a": 4, "b": {"a":[1,2,3],"b": 1}}"""
	j4 = """{"a": 4, "b": {}}"""
	j5 = """{"b": {}}"""
	j6 = """{}"""

	sch1 = JsonGrinder.schema([j1,j2,j3,j4,j5,j6], JSON.parse)
	sch2 = JsonGrinder.schema([j1,j2,j3,j4,j5,j6], JSON3.read)
    @test sch1 == sch2
end