mirror of
https://github.com/ArashPartow/exprtk.git
synced 2025-07-08 03:09:03 +00:00
C++ Mathematical Expression Library (ExprTk) https://www.partow.net/programming/exprtk/index.html
This commit is contained in:
committed by
Arash Partow
parent
f46bffcd69
commit
cc1b800c2b
@ -3,7 +3,7 @@
|
||||
* C++ Mathematical Expression Toolkit Library *
|
||||
* *
|
||||
* Simple Example 14 *
|
||||
* Author: Arash Partow (1999-2023) *
|
||||
* Author: Arash Partow (1999-2024) *
|
||||
* URL: https://www.partow.net/programming/exprtk/index.html *
|
||||
* *
|
||||
* Copyright notice: *
|
||||
@ -11,6 +11,7 @@
|
||||
* permitted under the guidelines and in accordance with the *
|
||||
* most current version of the MIT License. *
|
||||
* https://www.opensource.org/licenses/MIT *
|
||||
* SPDX-License-Identifier: MIT *
|
||||
* *
|
||||
**************************************************************
|
||||
*/
|
||||
@ -29,15 +30,15 @@ void stddev_example()
|
||||
typedef exprtk::parser<T> parser_t;
|
||||
|
||||
const std::string stddev_program =
|
||||
" var x[25] := { "
|
||||
" 1, 2, 3, 4, 5, "
|
||||
" 6, 7, 8, 9, 10, "
|
||||
" 11, 12, 13, 14, 15, "
|
||||
" 16, 17, 18, 19, 20, "
|
||||
" 21, 22, 23, 24, 25 "
|
||||
" }; "
|
||||
" "
|
||||
" sqrt(sum([x - avg(x)]^2) / x[]) ";
|
||||
" var x[25] := { "
|
||||
" 1, 2, 3, 4, 5, "
|
||||
" 6, 7, 8, 9, 10, "
|
||||
" 11, 12, 13, 14, 15, "
|
||||
" 16, 17, 18, 19, 20, "
|
||||
" 21, 22, 23, 24, 25 "
|
||||
" }; "
|
||||
" "
|
||||
" sqrt(sum([x - avg(x)]^2) / x[]) ";
|
||||
|
||||
expression_t expression;
|
||||
|
||||
|
Reference in New Issue
Block a user