简体   繁体   English

C#虚构数学问题

[英]C# Imaginary Math Issue

Im currently developing some sort of a math problem generator. 我目前正在开发某种数学问题生成器。 This means that i have to generate math problems and then right after evaluate those problems to get the answer for that math problem. 这意味着我必须生成数学问题,然后在评估这些问题后立即获得该数学问题的答案。 This far im good. 到目前为止,我很好。 But my next step is to generate math problems where the answer would be imaginary numbers. 但是我的下一步是产生数学问题,答案将是虚数。 For example "sqrt(-36)". 例如“ sqrt(-36)”。 Even tho i know how to evaluate math problems i don't know how to make it with imaginary numbers. 即使我也知道如何评估数学问题,我也不知道如何用虚数实现。 So if anyone have any working libaray for this or have been into this issue before, please help. 因此,如果有人对此有任何工作上的libaray,或者以前曾遇到过此问题,请帮助。 Thanks. 谢谢。

Not quite sure, if this is the thing you want/need, but the is a nice little library for complex numbers on CodeProjekt , maybe you can adopt it to meet your requirements. 不太确定,如果这是您想要/需要的东西,但是它是CodeProjekt上一个很好的用于复数的小图书馆,也许您可​​以采用它来满足您的要求。

.NET 4.0 has a Complex class. .NET 4.0具有Complex类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM