# Way to enforce \`BigFloat\` math by default

**URL:** <https://discourse.julialang.org/t/way-to-enforce-bigfloat-math-by-default/112557>\
**Category:** General Usage\
**Tags:** question\
**Created:** [April 5, 2024, 4:18am UTC](https://discourse.julialang.org/t/way-to-enforce-bigfloat-math-by-default/112557 "2024-04-05T04:18:19Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [April 5, 2024, 6:28pm UTC](https://discourse.julialang.org/t/way-to-enforce-bigfloat-math-by-default/112557/6 "2024-04-05T18:28:25Z")

</div>

You may be interested in SafeREPL.jl:

> [@\[ANN\] SafeREPL: use BigInt by default at the REPL](https://discourse.julialang.org/t/ann-saferepl-use-bigint-by-default-at-the-repl/41271):
>
> With Julia 1.5 around the corner, I’m happy to present [SafeREPL](https://github.com/rfourquet/SafeREPL.jl), a little experimental package which by default interprets Int and Int128 REPL literals as BigInt, and Float64 literals as BigFloat: julia\> using SafeREPL julia\> factorial(40) 815915283247897734345611269596115894272000000000 julia\> sqrt(2.0) 1.414213562373095048801688724209698078569671875376948073176679737990732478462102 julia\> c = 299\_792\_458; c^3 # the cube of the speed of light can even be computed safely! 26944002417373989…

```julia-repl
julia> using SafeREPL

julia> π
π = 3.1415926535897...

julia> π/2
1.570796326794896619231321691639751442098584699687552910487472296153908203143099

julia> BigFloat(π)/2
1.570796326794896619231321691639751442098584699687552910487472296153908203143099

```

---

_[View the full topic](https://discourse.julialang.org/t/way-to-enforce-bigfloat-math-by-default/112557)._
