最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python 2.7 - how to model FP16 operation using gmpy2? like fp16 add. rounding mode must also take in consideration - Stack Overf

programmeradmin1浏览0评论

first time to ask questions in stack overflow. please share your valuable experiences, i am trying to model FP16 num operations, like fp16 a,b a+b=?, i need set to different rounding mode and make sure the result complies/align with ieee754 standard. i searched around, no one seems do the same thing before, i am trying to use gmpy2 lib, it has a context, but the context create function ieee() only accept 32,64..., 16 is a eligal number, I know we can set context.emax, context.emin, context.precision, but which value should i assign them? seems context.emax=15, context.emin=-14, context.precison=10 seems not work.

looking forward to comments? thanks ahead guys.

i want to know gmpy2.context.emax/emin/precision value, when FP16 context used. and why we use that value.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论