big.Float came in go 1.5; will big.Complex come next?

xuanbao · · 717 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<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&#39;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&#39;s not planned, but it&#39;s plausible. The math/big package is being used by the compiler now (for its representation of consts) and if there&#39;s a desire to refactor that more then there might be a path for big.Complex.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

717 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传