立方根的问题 [英] Problem with cubic roots

查看:133
本文介绍了立方根的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名退休工程师,重振了我对程序的了解。



立方方程a = 2,b = -3,c = -3,d = 2

我得到D = 729,sqrt(D)= 27 p = -2.25,q = 0



我知道图中的根为-1; 0.5; 2但是使用基本的论文中的代码我会得到不同的答案。

请让我知道我哪里出错了。你的代码是Java还是Javascript?



我尝试过:



我还在学习Java Script,所以我使用Basic来计算答案。也许有一些基本的东西搞砸了cude root ??

I am a retired engineer reviving my knowledge of programs.

Cubic equation a=2,b=-3,c=-3,d=2
I get D=729, sqrt(D)=27 p=-2.25, q=0

I know the roots from the graph to be -1;0.5;2 but using the code in your paper with Basic I get different answers.
Please let me have suggestions where I am going wrong. Is your code Java or Javascript?

What I have tried:

I am still learning Java Script so I used Basic to compute the answers. Perhaps there is something about basic which screws up cude roots??

推荐答案

不要在Quick Answers下发帖 - 如果你从文章中得到代码,那么那里是该文章底部的添加评论或问题按钮,这会将电子邮件发送给作者。然后他们会被告知你希望与他们交谈。



在这里发布这个依赖于他们匆匆而过并意识到这是为了他们 - 我们其他人都有不知道你所指的13,000,000名成员中的任何一篇所写的本网站上十万篇左右的文章......
Don't post this under Quick Answers - if you got the code from an article, then there is a "Add a Comment or Question" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.

Posting this here relies on them "dropping by" and realising it is for them - the rest of us have no idea what article of the hundred thousand or so article on this site, written by any of 13,000,000 members you are referring to...


这篇关于立方根的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆