---
title: "isLess(than:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/double/isless(than:)"
---

# isLess(than:)

Returns a Boolean value indicating whether this instance is less than the given value.

## Declaration

```swift
func isLess(than other: Double) -> Bool
```

## Parameters

- `other`: The value to compare with this value.

## Return Value

Return Value true if this value is less than other; otherwise, false. If either this value or other is NaN, the result of this method is false.

## Discussion

Discussion This method serves as the basis for the less-than operator (<) for floating-point values. Some special cases apply: Because NaN compares not less than nor greater than any value, this method returns false when called on NaN or when NaN is passed as other. -infinity compares less than all values except for itself and NaN. Every value except for NaN and +infinity compares less than +infinity. The following example shows the behavior of the isLess(than:) method with different kinds of values: let x = 15.0 x.isLess(than: 20.0) // true x.isLess(than: .nan) // false Double.nan.isLess(than: x) // false The isLess(than:) method implements the less-than predicate defined by the IEEE 754 specification.

## See Also

### Comparing Values

- [Floating-Point Operators for Double](swift/floating-point-operators-for-double.md)
- [isEqual(to:)](swift/double/isequal(to:).md)
- [isLessThanOrEqualTo(_:)](swift/double/islessthanorequalto(_:).md)
- [isTotallyOrdered(belowOrEqualTo:)](swift/double/istotallyordered(beloworequalto:).md)
- [minimum(_:_:)](swift/double/minimum(_:_:).md)
- [minimumMagnitude(_:_:)](swift/double/minimummagnitude(_:_:).md)
- [maximum(_:_:)](swift/double/maximum(_:_:).md)
- [maximumMagnitude(_:_:)](swift/double/maximummagnitude(_:_:).md)
