|
|
| version 1.2, 2025/02/28 20:06:07 | version 1.5, 2025/03/09 19:50:47 |
|---|---|
| Line 1 | Line 1 |
| /* | /* |
| * * | * $Id$ |
| * * * | |
| * * * | |
| * *************** | |
| * * * * * | |
| * * MUMPS * | |
| * * * * * | |
| * *************** | |
| * * * | |
| * * * | |
| * * | |
| * | |
| * operator.c | |
| * operators pattern-match, divide, multiply, add, power | * operators pattern-match, divide, multiply, add, power |
| * | * |
| * | * |
| * Author: Serena Willis <jpw@coherent-logic.com> | * Author: Serena Willis <snw@coherent-logic.com> |
| * Copyright (C) 1998 MUG Deutschland | * Copyright (C) 1998 MUG Deutschland |
| * Copyright (C) 2020 Coherent Logic Development LLC | * Copyright (C) 2020, 2025 Coherent Logic Development LLC |
| * | * |
| * | * |
| * This file is part of FreeM. | * This file is part of FreeM. |
| Line 35 | Line 23 |
| * You should have received a copy of the GNU Affero Public License | * You should have received a copy of the GNU Affero Public License |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | |
| * Revision 1.5 2025/03/09 19:50:47 snw | |
| * Second phase of REUSE compliance and header reformat | |
| * | |
| * | |
| * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC | |
| * SPDX-License-Identifier: AGPL-3.0-or-later | |
| **/ | **/ |
| #include "mpsdef.h" | #include "mpsdef.h" |
| #include <stdlib.h> | #include <stdlib.h> |
| #include <math.h> | #include <math.h> |
| void root (); | |
| void mround (); | |
| int unit (char *str); | int unit (char *str); |
| extern void cond_round (char *a, int digits); /* defined in expr.c */ | extern void cond_round (char *a, int digits); /* defined in expr.c */ |
| Line 2511 void m_op (char *a, char *b, short op) | Line 2504 void m_op (char *a, char *b, short op) |
| /* rounding */ | /* rounding */ |
| /* 'a' is assumed to be a 'canonic' numeric string */ | /* 'a' is assumed to be a 'canonic' numeric string */ |
| /* it is rounded to 'digits' fractional digits */ | /* it is rounded to 'digits' fractional digits */ |
| void | void mround (char *a, int digits) |
| mround (a, digits) | |
| char *a; | |
| int digits; | |
| { | { |
| int ch, | int ch, |
| i, | i, |