English 中文(简体)
在撰写《欧洲复兴开发银行》时处理累犯问题
原标题:Dealing with Roundoff Error when writing RREF

我试图撰写一个方案,在提供矩阵时解决缩短的浏览量。 基本上,我做的是起草一个解决等同制度的方案。 然而,由于有时我需要进行分裂,以重复数字(例如2/3,即66666.......)和把瓦子弹打到一位数,有时一纸纸空板就应该为0(等于没有纸面),就像零001,它评估我的整个方案。

我的第一个问题是,如果发言的话,我是否应该有某种说法,那么写像“如果这个数字不低于零1,那么那就最容易陷入愤怒,那么那轮到最接近的愤怒”。

我的第二个问题是,任何人都对处理这一局势的最佳方式有任何想法,而不只是说,如果发言四舍五入的话。

非常感谢。

最佳回答

You say that you are writing a program that solves systems of equations. This is quite a complicated problem. If you only want to use such a program, you are better off using a library written by somebody else. I will assume that you really want to write the program yourself, for fun and/or education.

你确定了主要问题:使用浮动点号码会导致四舍五入,从而导致无法取得结果。 这方面有两个解决办法。

第一个解决办法不是使用浮动点号码。 只使用分类,将矩阵降低到流层形式(而不是减少);这可以在没有各司的情况下进行。 由于所有计算都准确,本应为0的粉碎机(实际上,可能会出现超支问题)。 当然,这只有在你开始的矩阵由愤怒组成的情况下才会奏效。 你们可以通过与零点合作而不是进行分类来推广这种做法。

第二个解决办法是使用浮动点号码,非常谨慎。 这是一个称为数字分析的数学/计算机科学整个分支的主题。 这里的回答解释过于复杂,因此,你必须获得一份数字分析书。 简而言之,你想要说的是,如果Math.abs(pivot) <某种小价值,那么你就认为,这块ot子应当是零,但由于四舍五入的错误,它就等于0000001,因此,你就认为这块ot子是零。 问题在于找出“某种小价值”是什么。

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签