Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mathiu : a simple computer algebra system in C++.

License

NotificationsYou must be signed in to change notification settings

BowenFu/mathiu.cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mathiu : a simple computer algebra system in C++

mathiu

StandardType

PlatformPlatformPlatform

CMakeCMakeGitHub licensecodecov

The library originated as a demo library showing the usage of the C++ pattern matching librarymatch(it).

But now it is developed independently.

Features

Differentiation

autoconst x ="x"_s;autoconst e = x ^ (2_i / 3_i);autoconst d = diff(e, x);// prints (* 2/3 (^ x -1/3))std::cout << toString(d) << std::endl;

Equation Solving

autoconst x ="x"_s;autoconst eq = 2_i * x * x - 3_i * x + 1_i == 0_i;autoconst solutions = solve(eq, x);// prints {1/2 1}std::cout << toString(solutions) << std::endl;

Inequation Solving

autoconste1 = ("x"_s ^ 2_i) - 1_i;autoconste2 = (("x"_s - 3_i) ^ 2_i) - 3_i;;autoconst ineq =e1 >e2;autoconst suolutions = solveInequation(ineq,"x"_s);// prints (OOInterval 7/6 inf)std::cout << toString(solutions) << std::endl;

Get Function Range

auto e = min(max(-"x"_s,"x"_s), 2_i);autoconst domain = interval(-3_i,true, 3_i,true);autoconst range = functionRange(e,"x"_s, domain);// prints (CCInterval 0 2)std::cout << toString(range) << std::endl;

[8]ページ先頭

©2009-2025 Movatter.jp