Does FROUNDNX.D write an integer register?
No. The result is written to FP register f[rd] in the original precision; zero, infinity and NaN follow the special rules listed on this page.
Round a double-precision floating-point value to an integral value in the same FP format; set NX only when the input differs from the rounded result and is not NaN.
FROUNDNX.D requires RV32/RV64 Zfa+D and enabled FP state. It rounds the double-precision value in f[rs1] to an integral value according to rm and writes it in D format to f[rd]. Zero and infinity are copied unchanged. NaN results are canonical; signaling NaN accrues NV. It accrues NX only when a non-NaN input differs from the rounded result. It sets no DZ, OF or UF and does not clear existing fflags.
Shows the Zfa + D-extension double-precision OP-FP flow: decode fields, read FP operands, perform FROUNDNX semantics, then write rd.
Leave rm empty to use the assembly default dyn encoding and fcsr.frm below.
The word is split as an R-type OP-FP instruction; double-precision OP-FP instructions use opcode 1010011.
This bounded teaching model computes whitelisted finite examples plus zero, infinity, and NaN; FROUNDNX.D writes the integral value in D format. Zero and infinity are copied. NX is set when the input differs from the rounded result and is not NaN.
This bounded teaching model computes whitelisted finite examples plus zero, infinity, and NaN; FROUNDNX.D writes the integral value in D format. Zero and infinity are copied. NX is set when the input differs from the rounded result and is not NaN.
Assumes Zfa + D, FS enabled, correctly NaN-boxed inputs, and initial fflags=0. Accepts the listed exact finite whitelist, signed zeros, infinity, qNaN, and sNaN. Rounding uses rm/frm; zero and infinity are copied, and sNaN sets NV. NX is set when a non-NaN input differs from the rounded result. rd may overlap rs1, and f0 accepts writeback. Steps are teaching views.
This animation shows only Zfa + D-extension ISA-visible OP-FP encoding, example numeric results, and fflags relationship; it does not model FPU pipelines, latency, every IEEE 754 corner case, or microarchitecture.
FROUNDNX.D rounds a double-precision value to an integral value in an FP register. It accrues NX only when a non-NaN input differs from the rounded result. It does not convert to an integer register.
Assume required extensions and FP state enabled, f11=1.5 in this format (validly NaN-boxed when narrower than FLEN), and initial fflags=0: the rne example writes f10=2.0 in an FP register; the changed value sets NX=1.
Assume required extensions and FP state enabled, f11=1.5 in this format (validly NaN-boxed when narrower than FLEN), and initial fflags=0: the rne example writes f10=2.0 in an FP register; the changed value sets NX=1.
No. The result is written to FP register f[rd] in the original precision; zero, infinity and NaN follow the special rules listed on this page.
FROUNDNX sets NX only when the input differs from the rounded result and is not NaN; FROUND does not set NX.