From 06b038509b4539a409412e1374322111fd557c01 Mon Sep 17 00:00:00 2001 From: Aron T Date: Thu, 13 Aug 2026 17:30:08 +0300 Subject: [PATCH] Fix docstring formatting/signature bugs; drop broken export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 7.1: same docstring audit already done in Linear_Algebra, applied to Math_Foundations. Tutorial pages (docs/src/*.md) had no hand-typed duplicate signatures to fix — already pull docstrings via @autodocs. - plot_parabola: docstring claimed p::Polynomial; the real parameter is untyped since the function is called with both a Polynomials.Polynomial and a Symbolics expression. - plot_hyperbola: removed a dead orphaned docstring describing a stale, no-longer-existing signature, removed a stray leftover artifact line, and fixed a formula typo ("+ b" instead of "+ k", inconsistent with the surrounding text and the actual code). - triangle_area_perim: a blank line + indented description text was accidentally forming a second indented code block, so the description rendered as monospace code instead of prose. - accrued_apr, accrued: dropped the 'function' keyword prefix from docstring signature lines, matching the convention already applied in Linear_Algebra and documented in the documenter-jl-conventions skill. - Math_Foundations.jl: removed `plot_hyperbola_axes` from the export list — no such function exists (only plot_hyperbola_axes_varx/_direct do). Julia tolerates exporting an undefined name at load time, so this was silently broken rather than erroring. Co-Authored-By: Claude Sonnet 5 --- src/Math_Foundations.jl | 2 +- src/basic_maths.jl | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/Math_Foundations.jl b/src/Math_Foundations.jl index 66836f3..a69aa49 100644 --- a/src/Math_Foundations.jl +++ b/src/Math_Foundations.jl @@ -12,7 +12,7 @@ export nth_root export calculate_parabola_roots_amrvw, calculate_parabola_roots_polynomial, calculate_parabola_roots_quadratic # Integrated plotting functions (computation + visualization) export plot_parabola_roots_amrvw, plot_parabola_roots_polynomial, plot_parabola_roots_quadratic -export plot_hyperbola, plot_hyperbola_axes, plot_hyperbola_axes_varx, plot_hyperbola_axes_direct +export plot_hyperbola, plot_hyperbola_axes_varx, plot_hyperbola_axes_direct export expa2x export accrued, accrued_apr export triangle_area_perim diff --git a/src/basic_maths.jl b/src/basic_maths.jl index 236c4e9..1cf5cc2 100644 --- a/src/basic_maths.jl +++ b/src/basic_maths.jl @@ -139,7 +139,7 @@ function plot_parabola_roots_quadratic(a₂::Float64, a₁::Float64=0.0, a₀::F return real_roots end """ - plot_parabola(p::Polynomial, r3::Union{Vector{Float64},Vector{ComplexF64}}, a₂::Float64, a₁::Float64, a₀::Float64, str::String) + plot_parabola(p, r3::Union{Vector{Float64},Vector{ComplexF64}}, a₂::Float64, a₁::Float64, a₀::Float64, str::String) Plot the parabola using the given polynomial and its roots """ function plot_parabola(p, r3::Union{Vector{Float64},Vector{ComplexF64}}, a₂::Float64, a₁::Float64, a₀::Float64, str::String) @@ -170,14 +170,8 @@ function plot_parabola(p, r3::Union{Vector{Float64},Vector{ComplexF64}}, a₂::F real_roots end """ - plot_hyperbola(n::Integer) -Plot hyperbola with parameter n -""" - -""" - p plot_hyperbola(a::Float64=1.0, h::Float64=0.0, k::Float64=0.0) -Plot hyperbola with equation y = a/(x-h) + b, where a,h and k are scaling parameters +Plot hyperbola with equation y = a/(x-h) + k, where a,h and k are scaling parameters """ function plot_hyperbola(a::Float64=1.0, h::Float64=0.0, k::Float64=0.0) # Define ranges for x, avoiding x - h = 0 where function is undefined @@ -273,7 +267,7 @@ exponential function where a > 0 and x is any Real """ expa2x(a::Real,x::Real) = a>0 ? a^x : println("a must be a positive real") """ - function accrued_apr(i::Real,p::Real,c::Int64) -> Float64 + accrued_apr(i::Real,p::Real,c::Int64) -> Float64 i is interest, p is period (1 = one year), c is capital return accrued value using daily apr for interest """ @@ -283,7 +277,7 @@ function accrued_apr(i::Real,p::Real,c::Int64) c * expa2x(apr,p) end """ - function accrued(i::Real,p::Real,c::Int64) -> Float64 + accrued(i::Real,p::Real,c::Int64) -> Float64 i is interest, p is period (1 = one year), c is capital return accrued value """ @@ -293,8 +287,7 @@ end """ triangle_area_perim(a::Float64, b::Float64, c::Float64) -> Float64 - - Calculate ρ, area and perimeter of a triangle using Heron's formula +Calculate ρ, area and perimeter of a triangle using Heron's formula """ function triangle_area_perim(a::Float64, b::Float64, c::Float64) s = (a + b + c) / 2