signthr

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.1, Creation date: 2014-01-08, Last change: 2025-09-14

returns a sign fnct related to a threshold

Example Illustration

 missing image of signthr(x)

Syntax

s=signthr(x)

Input Parameter

x: value

Output Parameter

s: sign




Copyright 2014-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This algorithm is a simple function named signthr that determines the sign of a given input value x based on a specified threshold. The function is part of the SG-Library and was created by Tim Lueth on January 8, 2014, as an auxiliary procedure.

Input Parameters

Output Results

Algorithm Explanation

The function signthr operates as follows:

  1. A threshold value thr is defined as 1e-12.
  2. The function checks the value of x against this threshold:

This approach effectively categorizes the input value x into positive, negative, or zero based on its magnitude relative to the threshold.

Algorithm explaination created using ChatGPT on 2025-08-18 21:45. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21