Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
この文字列を入力したい:
「pow(y,2) = 4 - pow(x,2)」 (つまり、y^2=4-x^2)
"x" = 1 にして、それを評価して y の値を教えてください。どうすればいいですか?
数 x が与えられた場合、y の方程式を解きたいと思いますか? つまり、「y」は x の関数なので、次のようになります。
var y = new Expression("sqrt(4 - pow(x, 2))"); // y = SQRT(4 - X^2) e.Parameters["x"] = 1; var x = y.Evaluate();
それはあなたの問題を解決しませんか?(それ以外は、何かの平方根は常にプラス/マイナスなので、そのロジックを追加する必要があります)