F-D(1)

πŸ“¦ version 7.44.0, in nixpkgs unstable

πŸ’– 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 of 1.0 is retained so that data already chillin in the range -1.0 to +1.0 is 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


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