diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 433c5da..5793cc9 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -7675,6 +7675,9 @@ int float128_compare_quiet(float128 a, float128 b, float_status *status)
  * minnummag() and maxnummag() functions correspond to minNumMag()
  * and minNumMag() from the IEEE-754 2008.
  */
+
+enum { ieee2008 = 1, ieee201x = 2 };
+
 #define MINMAX(s)                                                       \
 static inline float ## s float ## s ## _minmax(float ## s a, float ## s b,     \
                                                int ismin, int isieee,   \
@@ -7687,12 +7690,26 @@ static inline float ## s float ## s ## _minmax(float ## s a, float ## s b,     \
     b = float ## s ## _squash_input_denormal(b, status);                \
     if (float ## s ## _is_any_nan(a) ||                                 \
         float ## s ## _is_any_nan(b)) {                                 \
-        if (isieee) {                                                   \
+        if (isieee == ieee2008) {                                       \
             if (float ## s ## _is_quiet_nan(a, status) &&               \
                 !float ## s ##_is_any_nan(b)) {                         \
                 return b;                                               \
             } else if (float ## s ## _is_quiet_nan(b, status) &&        \
-                       !float ## s ## _is_any_nan(a)) {                \
+                       !float ## s ## _is_any_nan(a)) {                 \
+                return a;                                               \
+            }                                                           \
+        } else if (isieee == ieee201x) {                                \
+            if (float ## s ## _is_any_nan(a) &&                         \
+                !float ## s ##_is_any_nan(b)) {                         \
+                if (!float ## s ## _is_quiet_nan(a, status)) {          \
+                    float_raise(float_flag_invalid, status);            \
+                }                                                       \
+                return b;                                               \
+            } else if (float ## s ## _is_any_nan(b) &&                  \
+                       !float ## s ## _is_any_nan(a)) {                 \
+                if (!float ## s ## _is_quiet_nan(b, status)) {          \
+                    float_raise(float_flag_invalid, status);            \
+                }                                                       \
                 return a;                                               \
             }                                                           \
         }                                                               \
@@ -7743,25 +7760,37 @@ float ## s float ## s ## _max(float ## s a, float ## s b,               \
 float ## s float ## s ## _minnum(float ## s a, float ## s b,            \
                                  float_status *status)                  \
 {                                                                       \
-    return float ## s ## _minmax(a, b, 1, 1, 0, status);                \
+    return float ## s ## _minmax(a, b, 1, ieee2008, 0, status);         \
 }                                                                       \
                                                                         \
 float ## s float ## s ## _maxnum(float ## s a, float ## s b,            \
                                  float_status *status)                  \
 {                                                                       \
-    return float ## s ## _minmax(a, b, 0, 1, 0, status);                \
+    return float ## s ## _minmax(a, b, 0, ieee2008, 0, status);         \
+}                                                                       \
+                                                                        \
+float ## s float ## s ## _minimumnumber(float ## s a, float ## s b,     \
+                                 float_status *status)                  \
+{                                                                       \
+    return float ## s ## _minmax(a, b, 1, ieee201x, 0, status);         \
+}                                                                       \
+                                                                        \
+float ## s float ## s ## _maximumnumber(float ## s a, float ## s b,     \
+                                 float_status *status)                  \
+{                                                                       \
+    return float ## s ## _minmax(a, b, 0, ieee201x, 0, status);         \
 }                                                                       \
                                                                         \
 float ## s float ## s ## _minnummag(float ## s a, float ## s b,         \
                                     float_status *status)               \
 {                                                                       \
-    return float ## s ## _minmax(a, b, 1, 1, 1, status);                \
+    return float ## s ## _minmax(a, b, 1, ieee2008, 1, status);         \
 }                                                                       \
                                                                         \
 float ## s float ## s ## _maxnummag(float ## s a, float ## s b,         \
                                     float_status *status)               \
 {                                                                       \
-    return float ## s ## _minmax(a, b, 0, 1, 1, status);                \
+    return float ## s ## _minmax(a, b, 0, ieee2008, 1, status);         \
 }
 
 MINMAX(32)
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index 0f96a0e..e0d0259 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -424,6 +424,8 @@ float32 float32_min(float32, float32, float_status *status);
 float32 float32_max(float32, float32, float_status *status);
 float32 float32_minnum(float32, float32, float_status *status);
 float32 float32_maxnum(float32, float32, float_status *status);
+float32 float32_minimumnumber(float32, float32, float_status *status);
+float32 float32_maximumnumber(float32, float32, float_status *status);
 float32 float32_minnummag(float32, float32, float_status *status);
 float32 float32_maxnummag(float32, float32, float_status *status);
 int float32_is_quiet_nan(float32, float_status *status);
@@ -536,6 +538,8 @@ float64 float64_min(float64, float64, float_status *status);
 float64 float64_max(float64, float64, float_status *status);
 float64 float64_minnum(float64, float64, float_status *status);
 float64 float64_maxnum(float64, float64, float_status *status);
+float64 float64_minimumnumber(float64, float64, float_status *status);
+float64 float64_maximumnumber(float64, float64, float_status *status);
 float64 float64_minnummag(float64, float64, float_status *status);
 float64 float64_maxnummag(float64, float64, float_status *status);
 int float64_is_quiet_nan(float64 a, float_status *status);
