Skip to content

Commit

Permalink
Rename project to comply with Julia registry rules
Browse files Browse the repository at this point in the history
  • Loading branch information
kagalenko-m-b committed Nov 19, 2024
1 parent 91a913f commit d13d56d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FMin
# Fminbnd

[![Build Status](https://github.com/kagalenko-m-b/FMin.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/kagalenko-m-b/FMin.jl/actions/workflows/CI.yml?query=branch%3Amaster)
[![Build Status](https://github.com/kagalenko-m-b/Fminbnd.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/kagalenko-m-b/Fminbnd.jl/actions/workflows/CI.yml?query=branch%3Amaster)

Literal rewrite in Julia of Fortran routine [fmin](http://www.netlib.org/fmm/fmin.f)
from Netlib.
8 changes: 4 additions & 4 deletions src/FMin.jl → src/Fminbnd.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module FMin
module Fminbnd

export fmin
export fminbnd
"""
x = fmin(ax, bx, f, tol)
x = fminbnd(ax, bx, f, tol)
an approximation x to the point where f attains a minimum on
Expand Down Expand Up @@ -48,7 +48,7 @@ minimization without derivatives, prentice - hall, inc. (1973).
Rewrite in Julia of [fmin from Netlib](http://www.netlib.org/fmm/fmin.f)
by Mikhail Kagalenko, January 2024
"""
function fmin(ax::T, bx::T, f::Function, tol::T=eps(T)) where T<:AbstractFloat
function fminbnd(ax::T, bx::T, f::Function, tol::T=eps(T)) where T<:AbstractFloat
#
# c is the squared inverse of the golden ratio
#
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using FMin
using Fminbnd
using Test

@testset "FMin.jl" begin
@testset "Fminbnd.jl" begin
tol = 1e-8
ax = -4.0
bx = 0.0
x = -pi/2
xmin = fmin(ax, bx, sin, tol)
xmin = fminbnd(ax, bx, sin, tol)
@test abs(xmin - x) <= 10*tol
end

0 comments on commit d13d56d

Please sign in to comment.