<p>go 1.4 had big.Int and big.Rat, then go 1.5 brought big.Float into the same universe. Does anyone know if there's any plans for big.Complex, and if so, will it be in go 1.6?</p>
<hr/>**评论:**<br/><br/>hjfreyer: <pre><p>I doubt it. big.Int, big.Rat, and big.Float are all different ways of encoding some subset of the real numbers. You could model a subset of the complex numbers using any of them. Depending on your needs, using 2 big.Floats or 2 big.Rats would be totally sufficient.</p></pre>vorg: <pre><p>Building a big.Complex using two big.Float values might be easy enough. The big.Complex version of the functions in the math.cmplx package would be more complicated, especially if you wanted to be able to raise a big.Complex to the power of a big.Rat which could return a list of values, the count of which would depend on the denominator in the big.Rat, if I remember the Fundamental Theorem of Algebra correctly.</p></pre>dominikh: <pre><p>Nothing in 1.6, and as far as I am aware, no plans in general, either.</p></pre>dgryski: <pre><p>Trivia : I searched my (large) GOPATH for uses of complex. Aside from the tests in the standard library and a Mandelbrot demo program from Francesc, that numeric type appears virtually unused. </p></pre>dsymonds: <pre><p>It's not planned, but it's plausible. The math/big package is being used by the compiler now (for its representation of consts) and if there's a desire to refactor that more then there might be a path for big.Complex.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传