# Float64 comparison operator performance

**URL:** https://discourse.julialang.org/t/float64-comparison-operator-performance/29179
**Category:** Performance
**Created:** [September 26, 2019, 12:58am UTC](https://discourse.julialang.org/t/float64-comparison-operator-performance/29179 "2019-09-26T00:58:06Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [September 26, 2019, 1:04am UTC](https://discourse.julialang.org/t/float64-comparison-operator-performance/29179/2 "2019-09-26T01:04:11Z")

</div>

> [@milesf](#):
>
> What is the purpose of these two variants?

`Base.lt` is a total order, but `<` is not since all comparisons with NaN values return `false` according to the IEEE floating-point standard:

```julia
julia> Base.lt(Base.Forward, NaN, 1.0)
false

julia> Base.lt(Base.Forward, 1.0, NaN)
true

julia> NaN < 1.0
false

julia> 1.0 < NaN
false

```

---

_[View the full topic](https://discourse.julialang.org/t/float64-comparison-operator-performance/29179)._
