F-D(1)
π F-D(1) π
okay so this is the f-d page from the BRL-CAD manual, section 1 β the one about turning lil baby floats into big swole floats. bestie, let's get into it β¨
β¨ NAME β¨
f-d β converts single-precision floats into double-precision floats. that's it, that's the whole job, and she does it well π
π SYNOPSIS π
f-d [-n | scale] < floats > doubles
π¦ DESCRIPTION π¦
so f-d reads a whole stream of machine-native single-precision (4-byte) binary floating point values from standard input, converts each one into a double-precision (8-byte) binary float, and writes the result out to standard output. glow-up complete, no cap π
there's an optional argument that controls scaling. if you hand it a numeric scale, every single value gets multiplied by it during the conversion. the -n flag picks normalized output instead, which leaves the unit scale of 1.0 in effect. and if you pass no argument at all? the values are converted unchanged, plain and simple β¨
now, because the input and output are raw binary, f-d refuses to run when standard input or standard output is a terminal π€ and it also rejects a scale of zero (girl said absolutely not). the inverse conversion β taking double-precision floats back down to single-precision floats β is what d-f(1) does, iykyk.
β οΈ heads up bestie: this command is deprecated and is scheduled for removal. it prints a deprecation warning on startup. she's iconic but she's on her way out π
πΈ OPTIONS πΈ
-nβ normalize the data. the unit scale factor of1.0is retained so that data already chillin in the range-1.0to+1.0is preserved π«Άscaleβ a numeric multiplier applied to every value as it's converted. may not be zero. like, at all. π«
π EXAMPLES π
Example 1. Promote single-precision samples to double precision
f-d < signal.f > signal.d
reads single-precision floats from signal.f and writes the equivalent double-precision values to signal.d β the wider format that signal-processing tools such as dfft(1) and dmod(1) expect. she's giving main character energy in the pipeline π₯
Example 2. Widen and amplify in one pass
f-d 2.0 < quiet.f | dmod -e 2 > loud.d
converts single-precision floats to doubles while doubling each sample, then pipes the result through dmod(1) for further processing β no intermediate file needed, we love a shortcut ππ
β SEE ALSO β
brlcad(1), d-f(1), dfft(1), dmod(1)
π AUTHOR π
BRL-CAD Team
π COPYRIGHT π
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org
and that's the page, bestie! brought to you by the fine folks at BRL-CAD β this is the F-D(1) page, BRL-CAD manual, section 1, dated in that lovely 1989-2026 copyright era. go convert some floats, slay, and remember: she's deprecated, so don't get too attached π
πβ¨
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms