Skip to content

Instantly share code, notes, and snippets.

@tony612
Created July 30, 2019 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tony612/a91b517925ba0e661d5203d0f8636088 to your computer and use it in GitHub Desktop.
Save tony612/a91b517925ba0e661d5203d0f8636088 to your computer and use it in GitHub Desktop.
Generate all float
for a1 <- 0..1,
a2 <- 0..1,
a3 <- 0..1,
a4 <- 0..1,
a5 <- 0..1,
a6 <- 0..1,
a7 <- 0..1,
a8 <- 0..1,
a9 <- 0..1,
a10 <- 0..1,
a11 <- 0..1,
a12 <- 0..1,
a13 <- 0..1,
a14 <- 0..1,
a15 <- 0..1,
a16 <- 0..1,
a17 <- 0..1,
a18 <- 0..1,
a19 <- 0..1,
a20 <- 0..1,
a21 <- 0..1,
a22 <- 0..1,
a23 <- 0..1,
a24 <- 0..1,
a25 <- 0..1,
a26 <- 0..1,
a27 <- 0..1,
a28 <- 0..1,
a29 <- 0..1,
a30 <- 0..1,
a31 <- 0..1,
a32 <- 0..1 do
bin = <<
a1::1,
a2::1,
a3::1,
a4::1,
a5::1,
a6::1,
a7::1,
a8::1,
a9::1,
a10::1,
a11::1,
a12::1,
a13::1,
a14::1,
a15::1,
a16::1,
a17::1,
a18::1,
a19::1,
a20::1,
a21::1,
a22::1,
a23::1,
a24::1,
a25::1,
a26::1,
a27::1,
a28::1,
a29::1,
a30::1,
a31::1,
a32::1
>>
f = decode_type(:float, bin)
if !is_float(f) do
IO.inspect {f, bin}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment