Is Multiplying the Inverse Better or Worse?

前端 未结 11 1192
忘了有多久
忘了有多久 2020-12-20 13:52

When dealing with double data types is multiplying by the inverse better or worse?

Which way is faster? Which way uses

11条回答
  •  自闭症患者
    2020-12-20 14:44

    Regarding compilers performing the optimization to mult, they can optimize this (GCC does): SquareInches = MMSquared * (1 / 645.16).

提交回复
热议问题