diff --git a/module/math/src/sqrt_serial.c b/module/math/src/sqrt_serial.c index e69de29..0b83d72 100644 --- a/module/math/src/sqrt_serial.c +++ b/module/math/src/sqrt_serial.c @@ -0,0 +1,86 @@ +/**++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + * + * PANIC + * Portable Algorithms and Numerics In C++ + * + * Scientific computing from scratch, with feeling. + * + * Copyright (c) 2026 Michelle Bausager + * + * This file is part of PANIC. + * + * PANIC is free software licensed under the GNU General Public License v3.0 or later. + * You may redistribute and/or modify it under the terms of the GPL. + * + * PANIC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the LICENSE file for the full license text. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + * + * Project Name: PANIC + * Module Name: math + * File Name: sqrt_serial.c + * Revision: 0.1.0 + * Date: + * Author: Michelle Bausager + * + * Description: + * + * + *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +// includes like: +// #include + +//--------------------------------------------------------------------------------------------------------------------------- +// DEFINE DESCRIPTION +//--------------------------------------------------------------------------------------------------------------------------- + // difinitions like: +// #define TEST_FALG 1 + + +//--------------------------------------------------------------------------------------------------------------------------- +// VARIABLE DESCRIPTION +//--------------------------------------------------------------------------------------------------------------------------- +// Variable difinition like: +// static uint32_t AmountOfCool = 0; + + +//--------------------------------------------------------------------------------------------------------------------------- +// FUNCTION PROTOTYPE +//--------------------------------------------------------------------------------------------------------------------------- +// Function prototypes like: +// static void TestLeds(void); +static T sqrt(T c); + + +//-------------------------------------------------------------------------------------------------------------------------- +// Function Name : panic::math::sqrt +// +// Description: +// Computes an approximation of the square root of a scalar value. +// +// Inputs: +// x panic::float_t +// Input value. +// +// Outputs: +// None. +// +// Returns: +// panic::float_t +// Approximate square root of x. +// +// Notes: +// This implementation is written from scratch and is intended to be readable +// and portable rather than maximally optimized. +//-------------------------------------------------------------------------------------------------------------------------- +namespace panic::math{ + template + T sqrt(T c){ + return c; + } +} +