Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

2026-10-26 Nonlinear Regression

Last time

  • Discuss projects

  • Gradient-based optimization for linear models

  • Effect of conditioning on convergence rate

Today

  • Nonlinear models

  • Computing derivatives

    • numeric

    • analytic by hand

    • algorithmic (automatic) differentiation

using LinearAlgebra
using Plots
default(linewidth=4, legendfontsize=12)

function vander(x, k=nothing)
    if isnothing(k)
        k = length(x)
    end
    m = length(x)
    V = ones(m, k)
    for j in 2:k
        V[:, j] = V[:, j-1] .* x
    end
    V
end

function vander_chebyshev(x, n=nothing)
    if isnothing(n)
        n = length(x) # Square by default
    end
    m = length(x)
    T = ones(m, n)
    if n > 1
        T[:, 2] = x
    end
    for k in 3:n
        #T[:, k] = x .* T[:, k-1]
        T[:, k] = 2 * x .* T[:,k-1] - T[:, k-2]
    end
    T
end

function chebyshev_regress_eval(x, xx, n)
    V = vander_chebyshev(x, n)
    vander_chebyshev(xx, n) / V
end

runge(x) = 1 / (1 + 10*x^2)
runge_noisy(x, sigma) = runge.(x) + randn(size(x)) * sigma

CosRange(a, b, n) = (a + b)/2 .+ (b - a)/2 * cos.(LinRange(-pi, 0, n))

vcond(mat, points, nmax) = [cond(mat(points(-1, 1, n))) for n in 2:nmax]
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling RecipesBase [3cdcf5f2-1ef4-517c-9805-6587b60abb01](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling RecipesBase [3cdcf5f2-1ef4-517c-9805-6587b60abb01] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing RecipesBase [3cdcf5f2-1ef4-517c-9805-6587b60abb01].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling PlotThemes [ccf2f8ad-2431-5c83-bf29-c5338b663b6a](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling PlotThemes [ccf2f8ad-2431-5c83-bf29-c5338b663b6a] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing PlotThemes [ccf2f8ad-2431-5c83-bf29-c5338b663b6a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling PlotUtils [995b91a9-d308-5afd-9ec6-746e21dbc043](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling PlotUtils [995b91a9-d308-5afd-9ec6-746e21dbc043] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing PlotUtils [995b91a9-d308-5afd-9ec6-746e21dbc043].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling ColorSchemes [35d6a980-a343-548e-a6ea-1d62b119f2f4](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling ColorSchemes [35d6a980-a343-548e-a6ea-1d62b119f2f4] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing ColorSchemes [35d6a980-a343-548e-a6ea-1d62b119f2f4].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling RecipesPipeline [01d81517-befc-4cb6-b9ec-a95719d0359c](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling RecipesPipeline [01d81517-befc-4cb6-b9ec-a95719d0359c] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module RecipesBase with build ID ffffffff-ffff-ffff-842d-ff4542b30881 is missing from the cache.
│ This may mean RecipesBase [3cdcf5f2-1ef4-517c-9805-6587b60abb01] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing RecipesPipeline [01d81517-befc-4cb6-b9ec-a95719d0359c].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling JLFzf [1019f520-868f-41f5-a6de-eb00f4b6a39c](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling JLFzf [1019f520-868f-41f5-a6de-eb00f4b6a39c] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing JLFzf [1019f520-868f-41f5-a6de-eb00f4b6a39c].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling fzf_jll [214eeab7-80f7-51ab-84ad-2988db7cef09](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling fzf_jll [214eeab7-80f7-51ab-84ad-2988db7cef09] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing fzf_jll [214eeab7-80f7-51ab-84ad-2988db7cef09].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling JSON [682c06a0-de6a-54ab-a142-c8b1cf79cde6](cache misses: wrong dep version loaded (1), incompatible header (4))
[ Info: Precompiling JSON [682c06a0-de6a-54ab-a142-c8b1cf79cde6] (cache misses: wrong dep version loaded (2), incompatible header (8))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing JSON [682c06a0-de6a-54ab-a142-c8b1cf79cde6].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Parsers [69de0a69-1ddd-5017-9359-2bf0b02dc9f0](cache misses: wrong dep version loaded (1), incompatible header (4))
[ Info: Precompiling Parsers [69de0a69-1ddd-5017-9359-2bf0b02dc9f0] (cache misses: wrong dep version loaded (2), incompatible header (8))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Parsers [69de0a69-1ddd-5017-9359-2bf0b02dc9f0].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling FFMPEG_jll [b22a6f82-2f65-5046-a5b2-351ab43fb4e5](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling FFMPEG_jll [b22a6f82-2f65-5046-a5b2-351ab43fb4e5] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing FFMPEG_jll [b22a6f82-2f65-5046-a5b2-351ab43fb4e5].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling libass_jll [0ac62f75-1d6f-5e53-bd7c-93b484bb37c0](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling libass_jll [0ac62f75-1d6f-5e53-bd7c-93b484bb37c0] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing libass_jll [0ac62f75-1d6f-5e53-bd7c-93b484bb37c0].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling FreeType2_jll [d7e528f0-a631-5988-bf34-fe36492bcfd7](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling FreeType2_jll [d7e528f0-a631-5988-bf34-fe36492bcfd7] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing FreeType2_jll [d7e528f0-a631-5988-bf34-fe36492bcfd7].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Bzip2_jll [6e34b625-4abd-537c-b88f-471c36dfa7a0](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Bzip2_jll [6e34b625-4abd-537c-b88f-471c36dfa7a0] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Bzip2_jll [6e34b625-4abd-537c-b88f-471c36dfa7a0].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling FriBidi_jll [559328eb-81f9-559d-9380-de523a88c83c](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling FriBidi_jll [559328eb-81f9-559d-9380-de523a88c83c] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing FriBidi_jll [559328eb-81f9-559d-9380-de523a88c83c].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling HarfBuzz_jll [2e76f6c2-a576-52d4-95c1-20adfe4de566](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling HarfBuzz_jll [2e76f6c2-a576-52d4-95c1-20adfe4de566] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing HarfBuzz_jll [2e76f6c2-a576-52d4-95c1-20adfe4de566].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Cairo_jll [83423d85-b0ee-5818-9007-b63ccbeb887a](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Cairo_jll [83423d85-b0ee-5818-9007-b63ccbeb887a] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Cairo_jll [83423d85-b0ee-5818-9007-b63ccbeb887a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Glib_jll [7746bdde-850d-59dc-9ae8-88ece973131d](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Glib_jll [7746bdde-850d-59dc-9ae8-88ece973131d] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Glib_jll [7746bdde-850d-59dc-9ae8-88ece973131d].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling GettextRuntime_jll [b0724c58-0f36-5564-988d-3bb0596ebc4a](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling GettextRuntime_jll [b0724c58-0f36-5564-988d-3bb0596ebc4a] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing GettextRuntime_jll [b0724c58-0f36-5564-988d-3bb0596ebc4a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Libiconv_jll [94ce4f54-9a6c-5748-9c1c-f9c7231a4531](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Libiconv_jll [94ce4f54-9a6c-5748-9c1c-f9c7231a4531] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Libiconv_jll [94ce4f54-9a6c-5748-9c1c-f9c7231a4531].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Libffi_jll [e9f186c6-92d2-5b65-8a66-fee21dc1b490](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Libffi_jll [e9f186c6-92d2-5b65-8a66-fee21dc1b490] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Libffi_jll [e9f186c6-92d2-5b65-8a66-fee21dc1b490].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Libmount_jll [4b2f31a3-9ecc-558c-b454-b3730dcb73e9](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Libmount_jll [4b2f31a3-9ecc-558c-b454-b3730dcb73e9] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Libmount_jll [4b2f31a3-9ecc-558c-b454-b3730dcb73e9].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Pixman_jll [30392449-352a-5448-841d-b1acce4e97dc](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Pixman_jll [30392449-352a-5448-841d-b1acce4e97dc] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Pixman_jll [30392449-352a-5448-841d-b1acce4e97dc].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling libpng_jll [b53b4c65-9356-5827-b1ea-8c7a1a84506f](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling libpng_jll [b53b4c65-9356-5827-b1ea-8c7a1a84506f] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing libpng_jll [b53b4c65-9356-5827-b1ea-8c7a1a84506f].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Fontconfig_jll [a3f928ae-7b40-5064-980b-68af3947d34b](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Fontconfig_jll [a3f928ae-7b40-5064-980b-68af3947d34b] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Fontconfig_jll [a3f928ae-7b40-5064-980b-68af3947d34b].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Libuuid_jll [38a345b3-de98-5d2b-a5d3-14cd9215e700](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Libuuid_jll [38a345b3-de98-5d2b-a5d3-14cd9215e700] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Libuuid_jll [38a345b3-de98-5d2b-a5d3-14cd9215e700].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Expat_jll [2e619515-83b5-522b-bb60-26c02a35a201](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Expat_jll [2e619515-83b5-522b-bb60-26c02a35a201] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Expat_jll [2e619515-83b5-522b-bb60-26c02a35a201].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libXext_jll [1082639a-0dae-5f34-9b06-72781eeb8cb3](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_libXext_jll [1082639a-0dae-5f34-9b06-72781eeb8cb3] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libXext_jll [1082639a-0dae-5f34-9b06-72781eeb8cb3].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libX11_jll [4f6342f7-b3d2-589e-9d20-edeb45f2b2bc](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_libX11_jll [4f6342f7-b3d2-589e-9d20-edeb45f2b2bc] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libX11_jll [4f6342f7-b3d2-589e-9d20-edeb45f2b2bc].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libxcb_jll [c7cfdc94-dc32-55de-ac96-5a1b8d977c5b](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_libxcb_jll [c7cfdc94-dc32-55de-ac96-5a1b8d977c5b] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libxcb_jll [c7cfdc94-dc32-55de-ac96-5a1b8d977c5b].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libXau_jll [0c0b7dd1-d40b-584c-a123-a41640f87eec](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_libXau_jll [0c0b7dd1-d40b-584c-a123-a41640f87eec] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libXau_jll [0c0b7dd1-d40b-584c-a123-a41640f87eec].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libXdmcp_jll [a3789734-cfe1-5b06-b2d0-1dd0d9d62d05](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_libXdmcp_jll [a3789734-cfe1-5b06-b2d0-1dd0d9d62d05] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libXdmcp_jll [a3789734-cfe1-5b06-b2d0-1dd0d9d62d05].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_xtrans_jll [c5fb5394-a638-5e4d-96e5-b29de1b5cf10](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_xtrans_jll [c5fb5394-a638-5e4d-96e5-b29de1b5cf10] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_xtrans_jll [c5fb5394-a638-5e4d-96e5-b29de1b5cf10].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libXrender_jll [ea2f1a96-1ddc-540d-b46f-429655e07cfa](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_libXrender_jll [ea2f1a96-1ddc-540d-b46f-429655e07cfa] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libXrender_jll [ea2f1a96-1ddc-540d-b46f-429655e07cfa].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Graphite2_jll [3b182d85-2403-5c21-9c21-1e1f0cc25472](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Graphite2_jll [3b182d85-2403-5c21-9c21-1e1f0cc25472] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Graphite2_jll [3b182d85-2403-5c21-9c21-1e1f0cc25472].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling libfdk_aac_jll [f638f0a6-7fb0-5443-88ba-1cc74229b280](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling libfdk_aac_jll [f638f0a6-7fb0-5443-88ba-1cc74229b280] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing libfdk_aac_jll [f638f0a6-7fb0-5443-88ba-1cc74229b280].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling LAME_jll [c1c5ebd0-6772-5130-a774-d5fcae4a789d](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling LAME_jll [c1c5ebd0-6772-5130-a774-d5fcae4a789d] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing LAME_jll [c1c5ebd0-6772-5130-a774-d5fcae4a789d].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling libvorbis_jll [f27f6e37-5d2b-51aa-960f-b287f2bc3b7a](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling libvorbis_jll [f27f6e37-5d2b-51aa-960f-b287f2bc3b7a] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing libvorbis_jll [f27f6e37-5d2b-51aa-960f-b287f2bc3b7a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Ogg_jll [e7412a2a-1a6e-54c0-be00-318e2571c051](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Ogg_jll [e7412a2a-1a6e-54c0-be00-318e2571c051] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Ogg_jll [e7412a2a-1a6e-54c0-be00-318e2571c051].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling libaom_jll [a4ae2306-e953-59d6-aa16-d00cac43593b](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling libaom_jll [a4ae2306-e953-59d6-aa16-d00cac43593b] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing libaom_jll [a4ae2306-e953-59d6-aa16-d00cac43593b].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling x264_jll [1270edf5-f2f9-52d2-97e9-ab00b5d0237a](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling x264_jll [1270edf5-f2f9-52d2-97e9-ab00b5d0237a] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing x264_jll [1270edf5-f2f9-52d2-97e9-ab00b5d0237a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling x265_jll [dfaa095f-4041-5dcd-9319-2fabd8486b76](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling x265_jll [dfaa095f-4041-5dcd-9319-2fabd8486b76] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing x265_jll [dfaa095f-4041-5dcd-9319-2fabd8486b76].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Opus_jll [91d4177d-7536-5919-b921-800302f37372](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Opus_jll [91d4177d-7536-5919-b921-800302f37372] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Opus_jll [91d4177d-7536-5919-b921-800302f37372].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling libva_jll [9a156e7d-b971-5f62-b2c9-67348b8fb97c](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling libva_jll [9a156e7d-b971-5f62-b2c9-67348b8fb97c] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing libva_jll [9a156e7d-b971-5f62-b2c9-67348b8fb97c].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling libdrm_jll [8e53e030-5e6c-5a89-a30b-be5b7263a166](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling libdrm_jll [8e53e030-5e6c-5a89-a30b-be5b7263a166] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing libdrm_jll [8e53e030-5e6c-5a89-a30b-be5b7263a166].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libpciaccess_jll [a65dc6b1-eb27-53a1-bb3e-dea574b5389e](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_libpciaccess_jll [a65dc6b1-eb27-53a1-bb3e-dea574b5389e] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libpciaccess_jll [a65dc6b1-eb27-53a1-bb3e-dea574b5389e].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libXfixes_jll [d091e8ba-531a-589c-9de9-94069b037ed8](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_libXfixes_jll [d091e8ba-531a-589c-9de9-94069b037ed8] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libXfixes_jll [d091e8ba-531a-589c-9de9-94069b037ed8].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling GR [28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling GR [28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing GR [28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Qt6Wayland_jll [e99dba38-086e-5de3-a5b1-6e4c66e897c3](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Qt6Wayland_jll [e99dba38-086e-5de3-a5b1-6e4c66e897c3] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Qt6Wayland_jll [e99dba38-086e-5de3-a5b1-6e4c66e897c3].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Qt6Base_jll [c0090381-4147-56d7-9ebc-da0b1113ec56](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Qt6Base_jll [c0090381-4147-56d7-9ebc-da0b1113ec56] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Qt6Base_jll [c0090381-4147-56d7-9ebc-da0b1113ec56].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling libinput_jll [36db933b-70db-51c0-b978-0f229ee0e533](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling libinput_jll [36db933b-70db-51c0-b978-0f229ee0e533] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing libinput_jll [36db933b-70db-51c0-b978-0f229ee0e533].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling eudev_jll [35ca27e7-8b34-5b7f-bca9-bdc33f59eb06](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling eudev_jll [35ca27e7-8b34-5b7f-bca9-bdc33f59eb06] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing eudev_jll [35ca27e7-8b34-5b7f-bca9-bdc33f59eb06].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling mtdev_jll [009596ad-96f7-51b1-9f1b-5ce2d5e8a71e](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling mtdev_jll [009596ad-96f7-51b1-9f1b-5ce2d5e8a71e] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing mtdev_jll [009596ad-96f7-51b1-9f1b-5ce2d5e8a71e].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling libevdev_jll [2db6ffa8-e38f-5e21-84af-90c45d0032cc](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling libevdev_jll [2db6ffa8-e38f-5e21-84af-90c45d0032cc] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing libevdev_jll [2db6ffa8-e38f-5e21-84af-90c45d0032cc].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_xcb_util_wm_jll [c22f9ab0-d5fe-5066-847c-f4bb1cd4e361](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_xcb_util_wm_jll [c22f9ab0-d5fe-5066-847c-f4bb1cd4e361] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_xcb_util_wm_jll [c22f9ab0-d5fe-5066-847c-f4bb1cd4e361].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_xcb_util_jll [2def613f-5ad1-5310-b15b-b15d46f528f5](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_xcb_util_jll [2def613f-5ad1-5310-b15b-b15d46f528f5] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_xcb_util_jll [2def613f-5ad1-5310-b15b-b15d46f528f5].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_xcb_util_cursor_jll [e920d4aa-a673-5f3a-b3d7-f755a4d47c43](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_xcb_util_cursor_jll [e920d4aa-a673-5f3a-b3d7-f755a4d47c43] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_xcb_util_cursor_jll [e920d4aa-a673-5f3a-b3d7-f755a4d47c43].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_xcb_util_image_jll [12413925-8142-5f55-bb0e-6d7ca50bb09b](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_xcb_util_image_jll [12413925-8142-5f55-bb0e-6d7ca50bb09b] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_xcb_util_image_jll [12413925-8142-5f55-bb0e-6d7ca50bb09b].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_xcb_util_renderutil_jll [0d47668e-0667-5a69-a72c-f761630bfb7e](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_xcb_util_renderutil_jll [0d47668e-0667-5a69-a72c-f761630bfb7e] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_xcb_util_renderutil_jll [0d47668e-0667-5a69-a72c-f761630bfb7e].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_xcb_util_keysyms_jll [975044d2-76e6-5fbe-bf08-97ce7c6574c7](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_xcb_util_keysyms_jll [975044d2-76e6-5fbe-bf08-97ce7c6574c7] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_xcb_util_keysyms_jll [975044d2-76e6-5fbe-bf08-97ce7c6574c7].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libSM_jll [c834827a-8449-5923-a945-d239c165b7dd](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_libSM_jll [c834827a-8449-5923-a945-d239c165b7dd] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libSM_jll [c834827a-8449-5923-a945-d239c165b7dd].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libICE_jll [f67eecfb-183a-506d-b269-f58e52b52d7c](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Xorg_libICE_jll [f67eecfb-183a-506d-b269-f58e52b52d7c] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libICE_jll [f67eecfb-183a-506d-b269-f58e52b52d7c].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling xkbcommon_jll [d8fb68d0-12a3-5cfd-a85a-d49703b185fd](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling xkbcommon_jll [d8fb68d0-12a3-5cfd-a85a-d49703b185fd] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing xkbcommon_jll [d8fb68d0-12a3-5cfd-a85a-d49703b185fd].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_xkeyboard_config_jll [33bec58e-1273-512f-9401-5d533626f822](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_xkeyboard_config_jll [33bec58e-1273-512f-9401-5d533626f822] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_xkeyboard_config_jll [33bec58e-1273-512f-9401-5d533626f822].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_xkbcomp_jll [35661453-b289-5fab-8a00-3d9160c6a3a4](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_xkbcomp_jll [35661453-b289-5fab-8a00-3d9160c6a3a4] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_xkbcomp_jll [35661453-b289-5fab-8a00-3d9160c6a3a4].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libxkbfile_jll [cc61e674-0454-545c-8b26-ed2c68acab7a](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_libxkbfile_jll [cc61e674-0454-545c-8b26-ed2c68acab7a] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libxkbfile_jll [cc61e674-0454-545c-8b26-ed2c68acab7a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Libglvnd_jll [7e76a0d4-f3c7-5321-8279-8d96eeed0f29](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Libglvnd_jll [7e76a0d4-f3c7-5321-8279-8d96eeed0f29] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Libglvnd_jll [7e76a0d4-f3c7-5321-8279-8d96eeed0f29].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Vulkan_Loader_jll [a44049a8-05dd-5a78-86c9-5fde0876e88c](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Vulkan_Loader_jll [a44049a8-05dd-5a78-86c9-5fde0876e88c] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Vulkan_Loader_jll [a44049a8-05dd-5a78-86c9-5fde0876e88c].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libXrandr_jll [ec84b674-ba8e-5d96-8ba1-2a689ba10484](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_libXrandr_jll [ec84b674-ba8e-5d96-8ba1-2a689ba10484] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libXrandr_jll [ec84b674-ba8e-5d96-8ba1-2a689ba10484].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Wayland_jll [a2964d1f-97da-50d4-b82a-358c7fce9d89](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Wayland_jll [a2964d1f-97da-50d4-b82a-358c7fce9d89] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Wayland_jll [a2964d1f-97da-50d4-b82a-358c7fce9d89].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Qt6Declarative_jll [629bc702-f1f5-5709-abd5-49b8460ea067](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Qt6Declarative_jll [629bc702-f1f5-5709-abd5-49b8460ea067] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Qt6Declarative_jll [629bc702-f1f5-5709-abd5-49b8460ea067].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Qt6ShaderTools_jll [ce943373-25bb-56aa-8eca-768745ed7b5a](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Qt6ShaderTools_jll [ce943373-25bb-56aa-8eca-768745ed7b5a] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Qt6ShaderTools_jll [ce943373-25bb-56aa-8eca-768745ed7b5a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Qt6Svg_jll [6de9746b-f93d-5813-b365-ba18ad4a9cf3](cache misses: wrong dep version loaded (1))
[ Info: Precompiling Qt6Svg_jll [6de9746b-f93d-5813-b365-ba18ad4a9cf3] (cache misses: wrong dep version loaded (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Qt6Svg_jll [6de9746b-f93d-5813-b365-ba18ad4a9cf3].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling GR_jll [d2c73de3-f751-5644-a686-071e5b155ba9](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling GR_jll [d2c73de3-f751-5644-a686-071e5b155ba9] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing GR_jll [d2c73de3-f751-5644-a686-071e5b155ba9].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling GLFW_jll [0656b61e-2033-5cc2-a64a-77c0f6c09b89](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling GLFW_jll [0656b61e-2033-5cc2-a64a-77c0f6c09b89] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing GLFW_jll [0656b61e-2033-5cc2-a64a-77c0f6c09b89].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling libdecor_jll [1183f4f0-6f2a-5f1a-908b-139f9cdfea6f](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling libdecor_jll [1183f4f0-6f2a-5f1a-908b-139f9cdfea6f] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing libdecor_jll [1183f4f0-6f2a-5f1a-908b-139f9cdfea6f].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Dbus_jll [ee1fde0b-3d02-5ea6-8484-8dfef6360eab](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Dbus_jll [ee1fde0b-3d02-5ea6-8484-8dfef6360eab] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Dbus_jll [ee1fde0b-3d02-5ea6-8484-8dfef6360eab].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Pango_jll [36c8627f-9965-5494-a995-c6b170f724f3](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Pango_jll [36c8627f-9965-5494-a995-c6b170f724f3] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Pango_jll [36c8627f-9965-5494-a995-c6b170f724f3].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libXcursor_jll [935fb764-8cf2-53bf-bb30-45bb1f8bf724](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_libXcursor_jll [935fb764-8cf2-53bf-bb30-45bb1f8bf724] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libXcursor_jll [935fb764-8cf2-53bf-bb30-45bb1f8bf724].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libXi_jll [a51aa0fd-4e3c-5386-b890-e753decda492](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_libXi_jll [a51aa0fd-4e3c-5386-b890-e753decda492] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libXi_jll [a51aa0fd-4e3c-5386-b890-e753decda492].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Xorg_libXinerama_jll [d1454406-59df-5ea1-beac-c340f2130bc3](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Xorg_libXinerama_jll [d1454406-59df-5ea1-beac-c340f2130bc3] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Xorg_libXinerama_jll [d1454406-59df-5ea1-beac-c340f2130bc3].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling JpegTurbo_jll [aacddb02-875f-59d6-b918-886e6ef4fbf8](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling JpegTurbo_jll [aacddb02-875f-59d6-b918-886e6ef4fbf8] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing JpegTurbo_jll [aacddb02-875f-59d6-b918-886e6ef4fbf8].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Libtiff_jll [89763e89-9b03-5906-acba-b20f662cd828](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Libtiff_jll [89763e89-9b03-5906-acba-b20f662cd828] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Libtiff_jll [89763e89-9b03-5906-acba-b20f662cd828].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling LERC_jll [88015f11-f218-50d7-93a8-a6af411a945d](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling LERC_jll [88015f11-f218-50d7-93a8-a6af411a945d] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing LERC_jll [88015f11-f218-50d7-93a8-a6af411a945d].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling XZ_jll [ffd25f8a-64ca-5728-b0f7-c24cf3aae800](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling XZ_jll [ffd25f8a-64ca-5728-b0f7-c24cf3aae800] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing XZ_jll [ffd25f8a-64ca-5728-b0f7-c24cf3aae800].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Zstd_jll [3161d3a3-bdf6-5164-811a-617609db77b4](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling Zstd_jll [3161d3a3-bdf6-5164-811a-617609db77b4] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Zstd_jll [3161d3a3-bdf6-5164-811a-617609db77b4].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling IJuliaExt [64482eec-cc57-5312-bea1-9f24eb636db7](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling IJuliaExt [64482eec-cc57-5312-bea1-9f24eb636db7] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module GR with build ID ffffffff-ffff-ffff-30a5-f1a49c9b01ef is missing from the cache.
│ This may mean GR [28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing IJuliaExt [64482eec-cc57-5312-bea1-9f24eb636db7].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling IJuliaExt [2f4121a4-3b3a-5ce6-9c5e-1f2673ce168a](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling IJuliaExt [2f4121a4-3b3a-5ce6-9c5e-1f2673ce168a] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module Plots with build ID ffffffff-ffff-ffff-ffc2-5034aaf80f88 is missing from the cache.
│ This may mean Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing IJuliaExt [2f4121a4-3b3a-5ce6-9c5e-1f2673ce168a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
vcond (generic function with 1 method)

Gradient descent

Instead of solving the least squares problem using linear algebra (QR factorization), we could solve it using gradient descent. That is, on each iteration, we’ll take a step in the direction of the negative gradient.

function grad_descent(loss, grad, c0; gamma=1e-3, tol=1e-5)
    """Minimize loss(c) via gradient descent with initial guess c0
    using learning rate gamma.  Declares convergence when gradient
    is less than tol or after 500 steps.
    """
    c = copy(c0)
    chist = [copy(c)]
    lhist = [loss(c)]
    for it in 1:500
        g = grad(c)
        c -= gamma * g
        push!(chist, copy(c))
        push!(lhist, loss(c))
        if norm(g) < tol
            break
        end
    end
    (c, hcat(chist...), lhist)
end
grad_descent (generic function with 1 method)

Quadratic model

A = [1 1; 1 8]
@show cond(A)
loss(c) = .5 * c' * A * c
grad(c) = A * c

c, chist, lhist = grad_descent(loss, grad, [.9, .9],
    gamma=.22)
plot(lhist, yscale=:log10, xlims=(0, 80))
cond(A) = 9.46578492882319
Image produced in Jupyter
plot(chist[1, :], chist[2, :], marker=:circle)
x = LinRange(-1, 1, 30)
contour!(x, x, (x,y) -> loss([x, y]))
Image produced in Jupyter

Chebyshev regression via optimization

x = LinRange(-1, 1, 200)
sigma = 0.5; n = 8
y = runge_noisy(x, sigma)
V = vander_chebyshev(x, n) # or vander_chebyshev
function loss(c)
    r = V * c - y
    .5 * r' * r
end
function grad(c)
    r = V * c - y
    V' * r
end
c, _, lhist = grad_descent(loss, grad, ones(n),
    gamma=0.008)
c
8-element Vector{Float64}: 0.29884188624714414 -0.12534353849349622 -0.24572753809178896 -0.02811652868862459 0.16081263947650243 0.06926222236044383 -0.11911257591474915 0.01361840367463182
c0 = V \ y
l0 = 0.5 * norm(V * c0 - y)^2
@show cond(V)
@show cond(V' * V)
plot(lhist, yscale=:log10, ylim=(15, 50))
plot!(i -> l0, color=:black)
cond(V) = 3.0429192116168466
cond(V' * V) = 9.259357328426905
Image produced in Jupyter

Why use QR vs gradient-based optimization?

Nonlinear models

Instead of the linear model

f(x,c)=V(x)c=c0+c1x⏟T1(x)+c2T2(x)+⋯f(x,c) = V(x) c = c_0 + c_1 \underbrace{x}_{T_1(x)} + c_2 T_2(x) + \dotsb

let’s consider a rational model with only three parameters

f(x,c)=1c1+c2x+c3x2=(c1+c2x+c3x2)−1.f(x,c) = \frac{1}{c_1 + c_2 x + c_3 x^2} = (c_1 + c_2 x + c_3 x^2)^{-1} .

We’ll use the same loss function

L(c;x,y)=12∥f(x,c)−y∥2.L(c; x,y) = \frac 1 2 \lVert f(x,c) - y \rVert^2 .

We will also need the gradient

∇cL(c;x,y)=(f(x,c)−y)T∇cf(x,c)\nabla_c L(c; x,y) = \big( f(x,c) - y \big)^T \nabla_c f(x,c)

where

∂f(x,c)∂c1=−(c1+c2x+c3x2)−2=−f(x,c)2∂f(x,c)∂c2=−(c1+c2x+c3x2)−2x=−f(x,c)2x∂f(x,c)∂c3=−(c1+c2x+c3x2)−2x2=−f(x,c)2x2.\begin{align} \frac{\partial f(x,c)}{\partial c_1} &= -(c_1 + c_2 x + c_3 x^2)^{-2} = - f(x,c)^2 \\ \frac{\partial f(x,c)}{\partial c_2} &= -(c_1 + c_2 x + c_3 x^2)^{-2} x = - f(x,c)^2 x \\ \frac{\partial f(x,c)}{\partial c_3} &= -(c_1 + c_2 x + c_3 x^2)^{-2} x^2 = - f(x,c)^2 x^2 . \end{align}

Fitting a rational function

f(x, c) = 1 ./ (c[1] .+ c[2].*x + c[3].*x.^2)
function gradf(x, c)
    f2 = f(x, c).^2
    [-f2 -f2.*x -f2.*x.^2]
end
function loss(c)
    r = f(x, c) - y
    0.5 * r' * r
end
function gradient(c)
    r = f(x, c) - y
    #@show size(r)
    #@show size(r' * gradf(x, c))
    vec(r' * gradf(x, c))
end
gradient (generic function with 1 method)
c, _, lhist = grad_descent(loss, gradient, ones(3),
  gamma=8e-2)
@show c
plot(lhist, yscale=:identity, ylim=(20, 60), xlim=(0, 400), title="Loss $(lhist[end])")
c = [1.1253975104528766, -0.10651777197020476, 9.662968441676597]
Image produced in Jupyter

Compare fits on noisy data

scatter(x, y)
V = vander_chebyshev(x, 20)
plot!(x -> runge(x), color=:black, label="Runge")
plot!(x, V * (V \ y), label="Chebyshev fit")
plot!(x -> f(x, c), label="Rational fit")
Image produced in Jupyter

How do we compute those derivatives as the model gets complicated?

lim⁡h→0f(x+h)−f(x)h\lim_{h\to 0} \frac{f(x+h) - f(x)}{h}
  • How should we choose hh?

Taylor series

Classical accuracy analysis assumes that functions are sufficiently smooth, meaning that derivatives exist and Taylor expansions are valid within a neighborhood. In particular,

f(x+h)=f(x)+f′(x)h+f′′(x)h22!+f′′′(x)h33!+⋯⏟O(h3).f(x+h) = f(x) + f'(x) h + f''(x) \frac{h^2}{2!} + \underbrace{f'''(x) \frac{h^3}{3!} + \dotsb}_{O(h^3)} .

The big-OO notation is meant in the limit h→0h\to 0. Specifically, a function g(h)∈O(hp)g(h) \in O(h^p) (sometimes written g(h)=O(hp)g(h) = O(h^p)) when there exists a constant CC such that

g(h)≤Chpg(h) \le C h^p

for all sufficiently small hh.

Rounding error

We have an additional source of error, rounding error, which comes from not being able to compute f(x)f(x) or f(x+h)f(x+h) exactly, nor subtract them exactly. Suppose that we can, however, compute these functions with a relative error on the order of ϵmachine\epsilon_{\text{machine}}. This leads to

f~(x)=f(x)(1+ϵ1)f~(x⊕h)=f~((x+h)(1+ϵ2))=f((x+h)(1+ϵ2))(1+ϵ3)=[f(x+h)+f′(x+h)(x+h)ϵ2+O(ϵ22)](1+ϵ3)=f(x+h)(1+ϵ3)+f′(x+h)xϵ2+O(ϵmachine2+ϵmachineh)\begin{split} \tilde f(x) &= f(x)(1 + \epsilon_1) \\ \tilde f(x \oplus h) &= \tilde f((x+h)(1 + \epsilon_2)) \\ &= f((x + h)(1 + \epsilon_2))(1 + \epsilon_3) \\ &= [f(x+h) + f'(x+h)(x+h)\epsilon_2 + O(\epsilon_2^2)](1 + \epsilon_3) \\ &= f(x+h)(1 + \epsilon_3) + f'(x+h)x\epsilon_2 + O(\epsilon_{\text{machine}}^2 + \epsilon_{\text{machine}} h) \end{split}

Tedious error propagation

∣f~(x+h)⊖f~(x)h−f(x+h)−f(x)h∣=∣f(x+h)(1+ϵ3)+f′(x+h)xϵ2+O(ϵmachine2+ϵmachineh)−f(x)(1+ϵ1)−f(x+h)+f(x)h∣≤∣f(x+h)ϵ3∣+∣f′(x+h)xϵ2∣+∣f(x)ϵ1∣+O(ϵmachine2+ϵmachineh)h≤(2max⁡[x,x+h]∣f∣+max⁡[x,x+h]∣f′x∣ϵmachine+O(ϵmachine2+ϵmachineh)h=(2max⁡∣f∣+max⁡∣f′x∣)ϵmachineh+O(ϵmachine)\begin{split} \left\lvert \frac{\tilde f(x+h) \ominus \tilde f(x)}{h} - \frac{f(x+h) - f(x)}{h} \right\rvert &= \left\lvert \frac{f(x+h)(1 + \epsilon_3) + f'(x+h)x\epsilon_2 + O(\epsilon_{\text{machine}}^2 + \epsilon_{\text{machine}} h) - f(x)(1 + \epsilon_1) - f(x+h) + f(x)}{h} \right\rvert \\ &\le \frac{|f(x+h)\epsilon_3| + |f'(x+h)x\epsilon_2| + |f(x)\epsilon_1| + O(\epsilon_{\text{machine}}^2 + \epsilon_{\text{machine}}h)}{h} \\ &\le \frac{(2 \max_{[x,x+h]} |f| + \max_{[x,x+h]} |f' x| \epsilon_{\text{machine}} + O(\epsilon_{\text{machine}}^2 + \epsilon_{\text{machine}} h)}{h} \\ &= (2\max|f| + \max|f'x|) \frac{\epsilon_{\text{machine}}}{h} + O(\epsilon_{\text{machine}}) \\ \end{split}

where we have assumed that h≥ϵmachineh \ge \epsilon_{\text{machine}}. This error becomes large (relative to f′f' -- we are concerned with relative error after all)

  • ff is large compared to f′f'

  • xx is large

  • hh is too small

Automatic step size selection

  • Walker and Pernice

  • Dennis and Schnabel

diff(f, x; h=1e-8) = (f(x+h) - f(x)) / h

function diff_wp(f, x; h=1e-8)
    """Diff using Walker and Pernice (1998) choice of step"""
    h *= (1 + abs(x))
    (f(x+h) - f(x)) / h
end

x = 1000
diff_wp(sin, x) - cos(x)
-4.139506408429305e-6

Symbolic differentiation

using Symbolics

@variables x
Dx = Differential(x)

y = sin(x)
Dx(y)
[ Info: Precompiling Symbolics [0c5d862f-8b57-4792-8d23-62f2024744c7](cache misses: incompatible header (1))
[ Info: Precompiling Symbolics [0c5d862f-8b57-4792-8d23-62f2024744c7] (cache misses: incompatible header (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Symbolics [0c5d862f-8b57-4792-8d23-62f2024744c7].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling DomainSets [5b8099bc-c8ec-5219-889f-1d9e522a28bf](cache misses: wrong dep version loaded (1), incompatible header (1))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
[ Info: Precompiling DomainSets [5b8099bc-c8ec-5219-889f-1d9e522a28bf] (cache misses: wrong dep version loaded (2), incompatible header (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing DomainSets [5b8099bc-c8ec-5219-889f-1d9e522a28bf].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling StaticArrays [90137ffa-7385-5640-81b9-e52037218182](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling StaticArrays [90137ffa-7385-5640-81b9-e52037218182] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing StaticArrays [90137ffa-7385-5640-81b9-e52037218182].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling StaticArraysStatisticsExt [3453fcb0-342e-5e4a-a93b-f2e19ba3ba0f](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling StaticArraysStatisticsExt [3453fcb0-342e-5e4a-a93b-f2e19ba3ba0f] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module StaticArrays with build ID ffffffff-ffff-ffff-98c2-7fc2f2b78d9d is missing from the cache.
│ This may mean StaticArrays [90137ffa-7385-5640-81b9-e52037218182] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing StaticArraysStatisticsExt [3453fcb0-342e-5e4a-a93b-f2e19ba3ba0f].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling IntervalSetsRecipesBaseExt [37015e66-589a-58b1-bfae-83565f1dedb3](cache misses: wrong dep version loaded (1), incompatible header (1))
[ Info: Precompiling IntervalSetsRecipesBaseExt [37015e66-589a-58b1-bfae-83565f1dedb3] (cache misses: wrong dep version loaded (2), incompatible header (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module RecipesBase with build ID ffffffff-ffff-ffff-842d-ff4542b30881 is missing from the cache.
│ This may mean RecipesBase [3cdcf5f2-1ef4-517c-9805-6587b60abb01] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing IntervalSetsRecipesBaseExt [37015e66-589a-58b1-bfae-83565f1dedb3].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
WARNING: Constructor for type "Number" was extended in `DomainSets` without explicit qualification or import.
  NOTE: Assumed "Number" refers to `Base.Number`. This behavior is deprecated and may differ in future versions.`
  NOTE: This behavior may have differed in Julia versions prior to 1.12.
  Hint: If you intended to create a new generic function of the same name, use `function Number end`.
  Hint: To silence the warning, qualify `Number` as `Base.Number` in the method signature or explicitly `import Base: Number`.
[ Info: Precompiling ConstructionBaseStaticArraysExt [8497ba20-d017-5d93-8a79-2639523b7219](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling ConstructionBaseStaticArraysExt [8497ba20-d017-5d93-8a79-2639523b7219] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module StaticArrays with build ID ffffffff-ffff-ffff-98c2-7fc2f2b78d9d is missing from the cache.
│ This may mean StaticArrays [90137ffa-7385-5640-81b9-e52037218182] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing ConstructionBaseStaticArraysExt [8497ba20-d017-5d93-8a79-2639523b7219].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling SymbolicUtils [d1185830-fcd6-423d-90d6-eec64667417b](cache misses: wrong dep version loaded (1), incompatible header (1))
[ Info: Precompiling SymbolicUtils [d1185830-fcd6-423d-90d6-eec64667417b] (cache misses: wrong dep version loaded (2), incompatible header (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing SymbolicUtils [d1185830-fcd6-423d-90d6-eec64667417b].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling OpenSpecFun_jll [efe28fd5-8261-553b-a9e1-b2916fc3738e](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling OpenSpecFun_jll [efe28fd5-8261-553b-a9e1-b2916fc3738e] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module JLLWrappers with build ID fafbfcfd-e215-6d01-fbb6-af3c7dd41f26 is missing from the cache.
│ This may mean JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing OpenSpecFun_jll [efe28fd5-8261-553b-a9e1-b2916fc3738e].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling SpecialFunctionsExt [997ecda8-951a-5f50-90ea-61382e97704b](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling SpecialFunctionsExt [997ecda8-951a-5f50-90ea-61382e97704b] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module SpecialFunctions with build ID ffffffff-ffff-ffff-f1c5-17c52054e4a4 is missing from the cache.
│ This may mean SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing SpecialFunctionsExt [997ecda8-951a-5f50-90ea-61382e97704b].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling StaticArraysChainRulesCoreExt [cbf6619a-af44-5bf5-931a-f7c73a88debd](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling StaticArraysChainRulesCoreExt [cbf6619a-af44-5bf5-931a-f7c73a88debd] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module StaticArrays with build ID ffffffff-ffff-ffff-98c2-7fc2f2b78d9d is missing from the cache.
│ This may mean StaticArrays [90137ffa-7385-5640-81b9-e52037218182] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing StaticArraysChainRulesCoreExt [cbf6619a-af44-5bf5-931a-f7c73a88debd].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling SpecialFunctionsChainRulesCoreExt [9eb7bdd4-e44c-55fc-b9cc-1a32cb715188](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling SpecialFunctionsChainRulesCoreExt [9eb7bdd4-e44c-55fc-b9cc-1a32cb715188] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module SpecialFunctions with build ID ffffffff-ffff-ffff-f1c5-17c52054e4a4 is missing from the cache.
│ This may mean SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing SpecialFunctionsChainRulesCoreExt [9eb7bdd4-e44c-55fc-b9cc-1a32cb715188].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling LabelledArrays [2ee39098-c373-598a-b85f-a56591580800](cache misses: wrong dep version loaded (1))
[ Info: Precompiling LabelledArrays [2ee39098-c373-598a-b85f-a56591580800] (cache misses: wrong dep version loaded (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module StaticArrays with build ID ffffffff-ffff-ffff-98c2-7fc2f2b78d9d is missing from the cache.
│ This may mean StaticArrays [90137ffa-7385-5640-81b9-e52037218182] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing LabelledArrays [2ee39098-c373-598a-b85f-a56591580800].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling RecursiveArrayTools [731186ca-8d62-57ce-b412-fbd966d074cd](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling RecursiveArrayTools [731186ca-8d62-57ce-b412-fbd966d074cd] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module RecipesBase with build ID ffffffff-ffff-ffff-842d-ff4542b30881 is missing from the cache.
│ This may mean RecipesBase [3cdcf5f2-1ef4-517c-9805-6587b60abb01] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing RecursiveArrayTools [731186ca-8d62-57ce-b412-fbd966d074cd].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling AdaptStaticArraysExt [e1699a77-9e31-5da8-bb3e-0a796f95f0a0](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling AdaptStaticArraysExt [e1699a77-9e31-5da8-bb3e-0a796f95f0a0] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module StaticArrays with build ID ffffffff-ffff-ffff-98c2-7fc2f2b78d9d is missing from the cache.
│ This may mean StaticArrays [90137ffa-7385-5640-81b9-e52037218182] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing AdaptStaticArraysExt [e1699a77-9e31-5da8-bb3e-0a796f95f0a0].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling PreallocationTools [d236fae5-4411-538c-8e31-a6e3d9e00b46](cache misses: wrong dep version loaded (1))
[ Info: Precompiling PreallocationTools [d236fae5-4411-538c-8e31-a6e3d9e00b46] (cache misses: wrong dep version loaded (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module Preferences with build ID fafbfcfd-b9c5-47bf-fb18-e2ff55426cfd is missing from the cache.
│ This may mean Preferences [21216c6a-2e73-6563-6e65-726566657250] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing PreallocationTools [d236fae5-4411-538c-8e31-a6e3d9e00b46].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling ForwardDiff [f6369f11-7733-5829-9624-2563aa707210](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling ForwardDiff [f6369f11-7733-5829-9624-2563aa707210] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module Preferences with build ID fafbfcfd-b9c5-47bf-fb18-e2ff55426cfd is missing from the cache.
│ This may mean Preferences [21216c6a-2e73-6563-6e65-726566657250] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing ForwardDiff [f6369f11-7733-5829-9624-2563aa707210].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling ForwardDiffStaticArraysExt [b74fd6d0-9da7-541f-a07d-1b6af30a262f](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling ForwardDiffStaticArraysExt [b74fd6d0-9da7-541f-a07d-1b6af30a262f] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module ForwardDiff with build ID ffffffff-ffff-ffff-fada-c26e258d89eb is missing from the cache.
│ This may mean ForwardDiff [f6369f11-7733-5829-9624-2563aa707210] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing ForwardDiffStaticArraysExt [b74fd6d0-9da7-541f-a07d-1b6af30a262f].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling RuntimeGeneratedFunctions [7e49a35a-f44a-4d26-94aa-eba1b4ca6b47](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling RuntimeGeneratedFunctions [7e49a35a-f44a-4d26-94aa-eba1b4ca6b47] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing RuntimeGeneratedFunctions [7e49a35a-f44a-4d26-94aa-eba1b4ca6b47].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling SciMLBase [0bca4576-84f4-4d90-8ffe-ffa030f20462](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling SciMLBase [0bca4576-84f4-4d90-8ffe-ffa030f20462] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module RecipesBase with build ID ffffffff-ffff-ffff-842d-ff4542b30881 is missing from the cache.
│ This may mean RecipesBase [3cdcf5f2-1ef4-517c-9805-6587b60abb01] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing SciMLBase [0bca4576-84f4-4d90-8ffe-ffa030f20462].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling CommonSolve [38540f10-b2f7-11e9-35d8-d573e4eb0ff2](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling CommonSolve [38540f10-b2f7-11e9-35d8-d573e4eb0ff2] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing CommonSolve [38540f10-b2f7-11e9-35d8-d573e4eb0ff2].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling TruncatedStacktraces [781d530d-4396-4725-bb49-402e4bee1e77](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling TruncatedStacktraces [781d530d-4396-4725-bb49-402e4bee1e77] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module Preferences with build ID fafbfcfd-b9c5-47bf-fb18-e2ff55426cfd is missing from the cache.
│ This may mean Preferences [21216c6a-2e73-6563-6e65-726566657250] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing TruncatedStacktraces [781d530d-4396-4725-bb49-402e4bee1e77].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling FillArraysStaticArraysExt [de7d94bd-39d2-5101-8358-60ace59cd63e](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling FillArraysStaticArraysExt [de7d94bd-39d2-5101-8358-60ace59cd63e] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module StaticArrays with build ID ffffffff-ffff-ffff-98c2-7fc2f2b78d9d is missing from the cache.
│ This may mean StaticArrays [90137ffa-7385-5640-81b9-e52037218182] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing FillArraysStaticArraysExt [de7d94bd-39d2-5101-8358-60ace59cd63e].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling StaticArraysExt [6207fee4-2535-5e24-a3ba-6518da1c7d2a](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling StaticArraysExt [6207fee4-2535-5e24-a3ba-6518da1c7d2a] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module StaticArrays with build ID ffffffff-ffff-ffff-98c2-7fc2f2b78d9d is missing from the cache.
│ This may mean StaticArrays [90137ffa-7385-5640-81b9-e52037218182] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing StaticArraysExt [6207fee4-2535-5e24-a3ba-6518da1c7d2a].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling Groebner [0b43b601-686d-58a3-8a1c-6623616c7cd4]
[ Info: Precompiling Groebner [0b43b601-686d-58a3-8a1c-6623616c7cd4] 

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module Preferences with build ID fafbfcfd-b9c5-47bf-fb18-e2ff55426cfd is missing from the cache.
│ This may mean Preferences [21216c6a-2e73-6563-6e65-726566657250] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Groebner [0b43b601-686d-58a3-8a1c-6623616c7cd4].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling AbstractAlgebra [c3fe647b-3220-5bb0-a1ea-a7954cac585d](cache misses: wrong dep version loaded (1))
[ Info: Precompiling AbstractAlgebra [c3fe647b-3220-5bb0-a1ea-a7954cac585d] (cache misses: wrong dep version loaded (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module Preferences with build ID fafbfcfd-b9c5-47bf-fb18-e2ff55426cfd is missing from the cache.
│ This may mean Preferences [21216c6a-2e73-6563-6e65-726566657250] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing AbstractAlgebra [c3fe647b-3220-5bb0-a1ea-a7954cac585d].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
WARNING: Constructor for type "Matrix" was extended in `AbstractAlgebra` without explicit qualification or import.
  NOTE: Assumed "Matrix" refers to `Base.Matrix`. This behavior is deprecated and may differ in future versions.`
  NOTE: This behavior may have differed in Julia versions prior to 1.12.
  Hint: If you intended to create a new generic function of the same name, use `function Matrix end`.
  Hint: To silence the warning, qualify `Matrix` as `Base.Matrix` in the method signature or explicitly `import Base: Matrix`.
[ Info: Precompiling PrettyTables [08abe8d2-0d0c-5749-adfa-8a2ac140af0d](cache misses: wrong dep version loaded (1))
[ Info: Precompiling PrettyTables [08abe8d2-0d0c-5749-adfa-8a2ac140af0d] (cache misses: wrong dep version loaded (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing PrettyTables [08abe8d2-0d0c-5749-adfa-8a2ac140af0d].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling StringManipulation [892a3eda-7b42-436c-8928-eab12a02cf0e](cache misses: wrong dep version loaded (1))
[ Info: Precompiling StringManipulation [892a3eda-7b42-436c-8928-eab12a02cf0e] (cache misses: wrong dep version loaded (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing StringManipulation [892a3eda-7b42-436c-8928-eab12a02cf0e].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling SIMD [fdea26ae-647d-5447-a871-4b548cad5224](cache misses: wrong dep version loaded (1))
[ Info: Precompiling SIMD [fdea26ae-647d-5447-a871-4b548cad5224] (cache misses: wrong dep version loaded (2))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module PrecompileTools with build ID fafbfcfd-399e-1356-41bb-42c3d1824847 is missing from the cache.
│ This may mean PrecompileTools [aea7be01-6a6a-4083-8856-8a6e6704d82a] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing SIMD [fdea26ae-647d-5447-a871-4b548cad5224].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
LoadError: MethodError: no method matching _timer_expr(::Module, ::Bool, ::TimerOutputs.TimerOutput, ::String, ::Expr)
The function `_timer_expr` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  _timer_expr(::LineNumberNode, ::Module, ::Bool, ::Union{Expr, Symbol, TimerOutputs.TimerOutput}, ::Any)
   @ TimerOutputs ~/.julia/packages/TimerOutputs/L5q5K/src/TimerOutput.jl:258
  _timer_expr(::LineNumberNode, ::Module, ::Bool, ::Union{Expr, Symbol, TimerOutputs.TimerOutput}, ::Any, ::Expr)
   @ TimerOutputs ~/.julia/packages/TimerOutputs/L5q5K/src/TimerOutput.jl:292

in expression starting at /home/jed/.julia/packages/Groebner/GRCIz/src/input-output/input-output.jl:176
in expression starting at /home/jed/.julia/packages/Groebner/GRCIz/src/input-output/input-output.jl:176
in expression starting at /home/jed/.julia/packages/Groebner/GRCIz/src/Groebner.jl:1
in expression starting at /home/jed/.julia/packages/Symbolics/5BibL/src/Symbolics.jl:1

Stacktrace:
  [1] _timeit_expr(m::Module, label::String, expr::Expr)
    @ Groebner ~/.julia/packages/Groebner/GRCIz/src/utils/timeit.jl:96
  [2] _timeit_func(m::Module, label::Nothing, expr::Expr)
    @ Groebner ~/.julia/packages/Groebner/GRCIz/src/utils/timeit.jl:89
  [3] _timeit(m::Module, label::Nothing, expr::Expr)
    @ Groebner ~/.julia/packages/Groebner/GRCIz/src/utils/timeit.jl:77
  [4] _timeit(m::Module, expr::Expr)
    @ Groebner ~/.julia/packages/Groebner/GRCIz/src/utils/timeit.jl:72
  [5] var"@timeit"(__source__::LineNumberNode, __module__::Module, args::Vararg{Any})
    @ Groebner ~/.julia/packages/Groebner/GRCIz/src/utils/timeit.jl:68
  [6] #macroexpand#22
    @ ./expr.jl:126 [inlined]
  [7] macroexpand
    @ ./expr.jl:124 [inlined]
  [8] docm
    @ ./docs/Docs.jl:643 [inlined]
  [9] docm(source::LineNumberNode, mod::Module, meta::Any, ex::Any)
    @ Base.Docs ./docs/Docs.jl:643
 [10] (::DocStringExtensions.var"#hook!##0#hook!##1"{typeof(DocStringExtensions.template_hook)})(::LineNumberNode, ::Vararg{Any})
    @ DocStringExtensions ~/.julia/packages/DocStringExtensions/zNis6/src/templates.jl:11
 [11] var"@doc"(__source__::LineNumberNode, __module__::Module, x::Vararg{Any})
    @ Core ./boot.jl:715
 [12] include(mapexpr::Function, mod::Module, _path::String)
    @ Base ./Base.jl:307
 [13] top-level scope
    @ ~/.julia/packages/Groebner/GRCIz/src/Groebner.jl:112
 [14] include(mod::Module, _path::String)
    @ Base ./Base.jl:306
 [15] __require_prelocked(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2801
 [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2560
 [17] macro expansion
    @ ./loading.jl:2488 [inlined]
 [18] macro expansion
    @ ./lock.jl:376 [inlined]
 [19] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2453
 [20] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2429
 [21] top-level scope
    @ ~/.julia/packages/Symbolics/5BibL/src/Symbolics.jl:117
 [22] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
WARNING: Detected access to binding `Groebner._timeit_expr` in a world prior to its definition world.
  Julia 1.12 has introduced more strict world age semantics for global bindings.
  !!! This code may malfunction under Revise.
  !!! This code will error in future versions of Julia.
Hint: Add an appropriate `invokelatest` around the access to this binding.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
WARNING: Detected access to binding `Groebner._timeit_func` in a world prior to its definition world.
  Julia 1.12 has introduced more strict world age semantics for global bindings.
  !!! This code may malfunction under Revise.
  !!! This code will error in future versions of Julia.
Hint: Add an appropriate `invokelatest` around the access to this binding.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
WARNING: Detected access to binding `Groebner._timeit` in a world prior to its definition world.
  Julia 1.12 has introduced more strict world age semantics for global bindings.
  !!! This code may malfunction under Revise.
  !!! This code will error in future versions of Julia.
Hint: Add an appropriate `invokelatest` around the access to this binding.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
WARNING: Detected access to binding `Groebner.@timeit` in a world prior to its definition world.
  Julia 1.12 has introduced more strict world age semantics for global bindings.
  !!! This code may malfunction under Revise.
  !!! This code will error in future versions of Julia.
Hint: Add an appropriate `invokelatest` around the access to this binding.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
expand_derivatives(Dx(y))
UndefVarError: `expand_derivatives` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Hint: a global variable of this name also exists in Symbolics.

Stacktrace:
 [1] top-level scope
   @ In[12]:1
 [2] eval(m::Module, e::Any)
   @ Core ./boot.jl:489
 [3] execute_request(socket::ZMQ.Socket, kernel::IJulia.Kernel, msg::IJulia.Msg)
   @ IJulia ~/.julia/packages/IJulia/TXScA/src/execute_request.jl:129
 [4] #escape_string#449
   @ ./iterators.jl:0
 [5] setproperty!
   @ ./Base_compiler.jl:57

Awesome, what about products?

y = x
for _ in 1:1  # try 1:2 or 1:3
    y = cos(y^pi) * log(y)
end
expand_derivatives(Dx(y))
UndefVarError: `expand_derivatives` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Hint: a global variable of this name also exists in Symbolics.

Stacktrace:
 [1] top-level scope
   @ In[13]:5
 [2] eval(m::Module, e::Any)
   @ Core ./boot.jl:489
 [3] execute_request(socket::ZMQ.Socket, kernel::IJulia.Kernel, msg::IJulia.Msg)
   @ IJulia ~/.julia/packages/IJulia/TXScA/src/execute_request.jl:129
 [4] #escape_string#449
   @ ./iterators.jl:0
 [5] setproperty!
   @ ./Base_compiler.jl:57
  • The size of these expressions can grow exponentially

Hand-coding derivatives

df=f′(x)dxdf = f'(x) dx
function f(x)
    y = x
    for _ in 1:2
        a = y^pi
        b = cos(a)
        c = log(y)
        y = b * c
    end
    y
end

f(1.9), diff_wp(f, 1.9)
(-1.5346823414986814, -34.032439961925064)
function df(x, dx)
    y = x
    dy = dx
    for _ in 1:2
        a = y ^ pi
        da = pi * y^(pi - 1) * dy
        b = cos(a)
        db = -sin(a) * da
        c = log(y)
        dc = dy / y
        y = b * c
        dy = db * c + b * dc
    end
    y, dy
end

df(1.9, 1)
(-1.5346823414986814, -34.032419599140475)

We can go the other way

We can differentiate a composition h(g(f(x)))h(g(f(x))) as

d⁡h=h′d⁡gd⁡g=g′d⁡fd⁡f=f′d⁡x.\begin{align} \operatorname{d} h &= h' \operatorname{d} g \\ \operatorname{d} g &= g' \operatorname{d} f \\ \operatorname{d} f &= f' \operatorname{d} x. \end{align}

What we’ve done above is called “forward mode”, and amounts to placing the parentheses in the chain rule like

d⁡h=dhdg(dgdf(dfdxd⁡x)).\operatorname d h = \frac{dh}{dg} \left(\frac{dg}{df} \left(\frac{df}{dx} \operatorname d x \right) \right) .

The expression means the same thing if we rearrange the parentheses,

d⁡h=(((dhdg)dgdf)dfdx)d⁡x.\operatorname d h = \left( \left( \left( \frac{dh}{dg} \right) \frac{dg}{df} \right) \frac{df}{dx} \right) \operatorname d x .

If we introduce a notation yˉ:=d(⋅)dy\bar y := \frac{d(\cdot)}{dy} and take hˉ=1\bar h = 1, this becomes

dhdx=:xˉ=((hˉdhdg)dgdf)dfdx\frac{dh}{dx} =: \bar x = \left( \left( \bar h \frac{dh}{dg} \right) \frac{dg}{df} \right) \frac{df}{dx}

Automatic differentiation

import Zygote
[ Info: Precompiling Zygote [e88e6eb3-aa80-5325-afca-941959d7151f](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling Zygote [e88e6eb3-aa80-5325-afca-941959d7151f] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module SpecialFunctions with build ID ffffffff-ffff-ffff-f1c5-17c52054e4a4 is missing from the cache.
│ This may mean SpecialFunctions [276daf66-3868-5448-9aa4-cd146d93841b] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing Zygote [e88e6eb3-aa80-5325-afca-941959d7151f].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling StructArraysStaticArraysExt [d1e1e8be-46cf-5459-abb8-be6c7518b661](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling StructArraysStaticArraysExt [d1e1e8be-46cf-5459-abb8-be6c7518b661] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module StaticArrays with build ID ffffffff-ffff-ffff-98c2-7fc2f2b78d9d is missing from the cache.
│ This may mean StaticArrays [90137ffa-7385-5640-81b9-e52037218182] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing StructArraysStaticArraysExt [d1e1e8be-46cf-5459-abb8-be6c7518b661].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling RecursiveArrayToolsZygoteExt [6283b665-1224-52f5-a8f0-5953a1198cc4](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling RecursiveArrayToolsZygoteExt [6283b665-1224-52f5-a8f0-5953a1198cc4] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module RecursiveArrayTools with build ID ffffffff-ffff-ffff-e7e1-2c06929a8cb4 is missing from the cache.
│ This may mean RecursiveArrayTools [731186ca-8d62-57ce-b412-fbd966d074cd] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing RecursiveArrayToolsZygoteExt [6283b665-1224-52f5-a8f0-5953a1198cc4].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling ZygoteExt [bd76389b-fe7c-5b99-904d-52391854d323](cache misses: wrong dep version loaded (1), incompatible header (2))
[ Info: Precompiling ZygoteExt [bd76389b-fe7c-5b99-904d-52391854d323] (cache misses: wrong dep version loaded (2), incompatible header (4))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module Zygote with build ID ffffffff-ffff-ffff-7b55-32758c9828de is missing from the cache.
│ This may mean Zygote [e88e6eb3-aa80-5325-afca-941959d7151f] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing ZygoteExt [bd76389b-fe7c-5b99-904d-52391854d323].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
[ Info: Precompiling ZygoteColorsExt [e68c091a-8ea5-5ca7-be4f-380657d4ad79](cache misses: wrong dep version loaded (1), incompatible header (3))
[ Info: Precompiling ZygoteColorsExt [e68c091a-8ea5-5ca7-be4f-380657d4ad79] (cache misses: wrong dep version loaded (2), incompatible header (6))

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up

SYSTEM: caught exception of type :MethodError while trying to print a failed Task notice; giving up
┌ Warning: Module Zygote with build ID ffffffff-ffff-ffff-7b55-32758c9828de is missing from the cache.
│ This may mean Zygote [e88e6eb3-aa80-5325-afca-941959d7151f] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:2709
┌ Info: Skipping precompilation due to precompilable error. Importing ZygoteColorsExt [e68c091a-8ea5-5ca7-be4f-380657d4ad79].
└   exception = Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.
Zygote.gradient(f, 1.9)
(-34.03241959914049,)
g(x) = exp(x) + x^2
@code_llvm Zygote.gradient(g, 1.9)
; Function Signature: gradient(typeof(Main.g), Float64)
;  @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/interface.jl:146 within `gradient`
define [1 x double] @julia_gradient_75596(double %"args[1]::Float64") #0 {
top:
;  @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/interface.jl:147 within `gradient`
; ┌ @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/interface.jl:88 within `pullback` @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/interface.jl:90
; │┌ @ In[18]:1 within `g`
; ││┌ @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/interface2.jl:91 within `_pullback`
; │││┌ @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/interface2.jl within `macro expansion`
; ││││┌ @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/chainrules.jl:224 within `chain_rrule`
; │││││┌ @ /home/jed/.julia/packages/ChainRulesCore/d9BUN/src/rules.jl:137 within `rrule` @ /home/jed/.julia/packages/ChainRules/HzFUp/src/rulesets/Base/fastmath_able.jl:56
        %0 = call double @j_exp_75599(double %"args[1]::Float64")
; └└└└└└
;  @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/interface.jl:148 within `gradient`
; ┌ @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/interface.jl:91 within `#pullback##0`
; │┌ @ In[18]:1 within `g`
; ││┌ @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/chainrules.jl:212 within `ZBack`
; │││┌ @ /home/jed/.julia/packages/Zygote/zowwZ/src/lib/number.jl:12 within `literal_pow_pullback`
; ││││┌ @ promotion.jl:434 within `*` @ float.jl:497
       %1 = fmul double %"args[1]::Float64", 2.000000e+00
; │││└└
; │││┌ @ /home/jed/.julia/packages/ChainRules/HzFUp/src/rulesets/Base/fastmath_able.jl:56 within `exp_pullback`
; ││││┌ @ float.jl:497 within `*`
       %2 = fadd double %1, %0
; └└└└└
;  @ /home/jed/.julia/packages/Zygote/zowwZ/src/compiler/interface.jl:149 within `gradient`
  %"new::Tuple2.unbox.fca.0.insert" = insertvalue [1 x double] zeroinitializer, double %2, 0
  ret [1 x double] %"new::Tuple2.unbox.fca.0.insert"
}