寻找正方形的正方形形式
我正在尝试构建一个程序,让您乘以两个正方形的根,并以Surd形式显示答案,如果答案不是整数。
我已经看过答案在这里 a href =“ https://stackoverflow.com/questions/10492855/10492855/simplify-square-roots-algebraily'>在这里,尽管我不了解C ++和C#,所以我对该怎么办。我完成的第一件事是将正方形根部内的两个数字乘以在一起,然后如果是整数,我可以显示答案,但是如果不是,它就完全混乱了。
I'm trying to build a program that let's you multiply two square roots and display the answer in surd form if the answer isn't an integer.
I've seen answers here and here, although I don't understand C++ and C#, so I don't have a clue on what to do. The first thing I've done is multiply the two numbers inside the square roots together, then I can display the answer if it is an integer, but if it isn't it completely messes up.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我看不到考虑给定数字,总结主要因素的多重性,提取偶数的多个部分并形成产品的平方根。
例如
I don't see a better way than by factoring the given numbers, summing the multiplicities of the prime factors, extracting the even parts of the multiplicities and forming the square root of the products.
E.g.
尝试使用 sympy :
Try using SymPy: