Skip to content

Instantly share code, notes, and snippets.

View ohno's full-sized avatar

Shuhei Ohno ohno

View GitHub Profile
@t-nissie
t-nissie / 00Iwanami.md
Last active January 2, 2025 21:31
『岩波数学公式I』の例の数値積分をJuliaのQuadGKパッケージを使って精度保証する

『岩波数学公式I』の例の数値積分をJuliaのQuadGKパッケージを使って精度保証する

2023年12月25日にJulia v1.10.0がリリースされました。おめでとうございます。

ちょうどJulia Advent Calendar 2023 https://qiita.com/advent-calendar/2023/julia に 積分のパッケージの紹介 https://zenn.dev/ohno/articles/440234fbb2adec がありました。

そのうちの一つ、QuadGKパッケージ https://juliamath.github.io/QuadGK.jl/stable/ を使って 『岩波数学公式I』のp.240の例の数値積分を精度保証しようとおもいます。 永らくゼロだとされ、1988年に訂正され、2018年にTwitterで少し話題になっていた積分です。

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@genkuroki
genkuroki / GP.jl
Created April 16, 2021 23:09
Pluto notebook: Animation of Gaussian process regression
### A Pluto.jl notebook ###
# v0.14.2
using Markdown
using InteractiveUtils
# ╔═╡ 9dcadaad-5e5e-494f-931d-1ab9269ed8c1
using Plots, LinearAlgebra
# ╔═╡ 077d65e8-a167-4527-9bb8-8fa9eb614c46
@genkuroki
genkuroki / Plots.jlにおけるPNGの高精細表示.ipynb
Last active May 6, 2023 19:37
Plots.jlにおけるPNGの高精細表示
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@feanor12
feanor12 / numerov.jl
Last active November 12, 2022 16:01
using UnicodePlots
using OrdinaryDiffEq
using Parameters
struct Numerov <: OrdinaryDiffEqAlgorithm end
mutable struct NumerovCache <: OrdinaryDiffEq.OrdinaryDiffEqMutableCache
uprev # last u value
g
gprev
@rafaqz
rafaqz / fortran-julia.jl
Last active March 17, 2024 21:34
Fortran-Julia conversion script
#=
This julia script converts fortran 90 code into julia.
It uses naive regex replacements to do as much as possible,
but the output WILL need further cleanup.
Known conversion problems such as GOTO are commented and marked with FIXME
Most variable declaration lines are entirely deleted, which may or
may not be useful.
@ykonishi
ykonishi / mt19937.f90
Last active May 15, 2023 03:43
MT19937, Mersenne Twister Random Number Generator in Fortran90
! MT19937, Mersenne Twister Random Number Generator ([0,1) Real Number)
! in Fortran90
!
! Usage:
! 1) When you use mt19937, add the sentence "use mt19937"
! above the implicit sentence.
! 2) To set an initial seed, call sgrnd(seed). (The "seed" is an integer.)
! If you do not call this, the seed is 4357.
! 3) Use the function grnd().
! (Do not declare "real(8) :: grnd".)