Algorithm for detecting repeating decimals?

前端 未结 6 2025
悲&欢浪女
悲&欢浪女 2020-12-10 05:23

Is there an algorithm for figuring out the following things?

  1. If the result of a division is a repeating decimal (in binary).
  2. If it repeats, at what di
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-10 05:53

    Check out decimal expansion, and specifically about the period of a fraction.

提交回复
热议问题