---
title: 'Java 8: Double/Float.isFinite(), Math.nextDown()'
url: 'https://tutego.de/blog/javainsel/2011/10/java-8-doublefloat-isfinite-math-nextdown'
markdown: 'https://tutego.de/blog/javainsel/2011/10/java-8-doublefloat-isfinite-math-nextdown.md'
date: '2011-10-17'
description: 'Die Methode Double.isInfinite(double v) liefert true, falls v entweder POSITIVE_INFINITY oder NEGATIVE_INFINITY ist. In Float gibt es die gleiche Methode. Seit Java 8 testet Double.isFinite(double v), ob v nicht unendlich ist und auch nicht NaN ist – ähnliches gilt für Float. Statt Math.nextAfter(d…'
taxonomy:
  category:
    - 'Java 8'
---

# Java 8: Double/Float.isFinite(), Math.nextDown()

![Illustration einer tropischen Insel mit Palmen und einem hohen Berg](https://tutego.de/blog/javainsel/user/themes/tutego/images/insel-cover.jpg)# Java Blog für Programmierer

[Java Blog für Programmierer](https://tutego.de/blog/javainsel/)

## Java 8: Double/Float.isFinite(), Math.nextDown()

17.10.2011 · [Christian Ullenboom](https://tutego.de/blog/javainsel/author/admin/)

Die Methode `Double.isInfinite(double v)` liefert `true`, falls v entweder POSITIVE\_INFINITY oder NEGATIVE\_INFINITY ist. In Float gibt es die gleiche Methode. Seit Java 8 testet `Double.isFinite(double v)`, ob v nicht unendlich ist und auch nicht NaN ist – ähnliches gilt für Float.

Statt Math.`nextAfter`(d,Double.NEGATIVE\_INFINITY) gibt es in Java 8 auch `Math.nextDown()`.

Kategorien: [Java 8](https://tutego.de/blog/javainsel/category/java-8/)

[← Alle Beiträge](https://tutego.de/blog/javainsel/)

---

## Navigation

- Previous: [Java 8 Änderungen an BigInteger: intValueExact(), longValueExact() und shortValueExact()](https://tutego.de/blog/javainsel/2011/10/java-8-nderungen-an-biginteger-intvalueexact-longvalueexact-und-shortvalueexact.md)
- Next: [Erster Java 8 Build](https://tutego.de/blog/javainsel/2011/10/erster-java-8-build.md)
