{"id":18064673,"url":"https://github.com/jeffreysarnoff/ieeefloats.jl","last_synced_at":"2025-04-05T14:14:24.223Z","repository":{"id":94326901,"uuid":"113538390","full_name":"JeffreySarnoff/IEEEFloats.jl","owner":"JeffreySarnoff","description":"Standard conformant constants for Float64, Float32, Float16","archived":false,"fork":false,"pushed_at":"2020-03-07T10:04:40.000Z","size":130,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-11T10:32:13.046Z","etag":null,"topics":["ieee-754","ieee754","julia"],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JeffreySarnoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-08T06:06:53.000Z","updated_at":"2023-03-01T14:32:14.000Z","dependencies_parsed_at":"2023-07-27T23:30:21.719Z","dependency_job_id":null,"html_url":"https://github.com/JeffreySarnoff/IEEEFloats.jl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffreySarnoff%2FIEEEFloats.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffreySarnoff%2FIEEEFloats.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffreySarnoff%2FIEEEFloats.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffreySarnoff%2FIEEEFloats.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JeffreySarnoff","download_url":"https://codeload.github.com/JeffreySarnoff/IEEEFloats.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345842,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ieee-754","ieee754","julia"],"created_at":"2024-10-31T06:07:11.560Z","updated_at":"2025-04-05T14:14:24.200Z","avatar_url":"https://github.com/JeffreySarnoff.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IEEEFloats.jl\n### IEEE754-2019 structural introspection for Float8, Float16, Float32, Float64, Float128\n\n\n\n#### Copyright © 2015-2020 by Jeffrey Sarnoff. This work is released under The MIT License.\n\n----\n\n[![Build Status](https://travis-ci.org/JeffreySarnoff/IEEEFloats.jl.svg?branch=master)](https://travis-ci.org/JeffreySarnoff/IEEEFloats.jl)\u0026nbsp;\u0026nbsp;\u0026nbsp;[![codecov](https://codecov.io/gh/JeffreySarnoff/IEEEFloats.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JeffreySarnoff/IEEEFloats.jl)\n\n----\n\n\n\n\n```julia\n\nIEEEFloat == Base.IEEEFloat == Union{Float16, Float32, Float64}\n\n@inline bitwidth(::Type{T}) where T\u003c:IEEEFloat = sizeof(T) * 8\n\n# precision, significand_bits and exponent_bits are unchanged\n\nprecision(::Type{T}) where T\u003c:IEEEFloat = Base.Math.precision(T)\nsignificand_bits(::Type{T}) where T\u003c:IEEEFloat = Base.Math.significand_bits(T)\nexponent_bits(::Type{T}) where T\u003c:IEEEFloat = Base.Math.exponent_bits(T)\n\n# exponent_max (Emax in the standard) is an IEEE754-2008 standard term;\n#   The standard tabulates its values (see Table 3.2 on page 8).\n# Julia had defined it in a nonstandard manner. This is conformant:\n\nexponentmax(Float64) == 1023\nexponentmax(Float32) ==  127\nexponentmax(Float16) ==   15\n\n# exponent_min (Emin) is another standard term\n# it is fully determined by exponent_max:\n# exponent_min(T) = 1 - exponent_max(T)\n\nexponentmin(Float64) == -1022\nexponentmin(Float32) ==  -126\nexponentmin(Float16) ==   -14\n\n# exponent_bias (bias) is defined equal to exponent_max\n\nexponentbias(Float64) == 1023\nexponentbias(Float32) ==  127\nexponentbias(Float16) ==   15\n\n# The value Julia has called exponent_max does not appear\n# in the standard (nor do its values).  It is a useful quantity\n# (Emax + 1) that we rename `exponent_field_max`.\n\nexponentfieldmax(Float64) == 1024\nexponentfieldmax(Float32) ==  128\nexponentfieldmax(Float16) ==   16\n\n```\n\n## all values\n\n```julia\n\nprecision(Float16)  =  11\nprecision(Float32)  =  24\nprecision(Float64)  =  53\n\nsignificand_bits(Float16)  =  10\nsignificand_bits(Float32)  =  23\nsignificand_bits(Float64)  =  52\n\nexponent_bits(Float16)  =  5\nexponent_bits(Float32)  =  8\nexponent_bits(Float64)  = 11\n\nexponentmax(Float16)  =     15\nexponentmax(Float32)  =    127\nexponentmax(Float64)  =   1023\n\nexponentmin(Float16)  =     -14\nexponentmin(Float32)  =    -126\nexponentmin(Float64)  =   -1022\n\nexponentbias(Float16)  =     15\nexponentbias(Float32)  =    127\nexponentbias(Float64)  =   1023\n\nexponentfieldmax(Float16)  =     16\nexponentfieldmax(Float32)  =    128\nexponentfieldmax(Float64)  =   1024\n\n# intfloatmax(FloatNN) is the most positive IntNN I where FloatNN(I-1) is representable\n# intfloatmin(FloatNN) is the most negative IntNN I where FloatNN(I+1) is representable \n\nintfloatmax(Float16) = Int16(2048)\nintfloatmax(Float32) = Int32(16777216)\nintfloatmax(Float64) = Int64(9007199254740992)\n\nintfloatmin(Float16) = Int16(-2048)\nintfloatmin(Float32) = Int32(-16777216)\nintfloatmin(Float64) = Int64(-9007199254740992)\n\n# floatintmax(FloatNN) is FloatNN(intfloat_max(FloatNN))\n# floatintmin(FloatNN) is FloatNN(intfloat_min(FloatNN))\n\nfloatintmax(Float16) = Float16(2048)\nfloatintmax(Float32) = Float32(16777216)\nfloatintmax(Float64) = Float64(9007199254740992)\n\nfloatintmin(Float16) = Float16(-2048)\nfloatintmin(Float32) = Float32(-16777216)\nfloatintmin(Float64) = Float64(-9007199254740992)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffreysarnoff%2Fieeefloats.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffreysarnoff%2Fieeefloats.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffreysarnoff%2Fieeefloats.jl/lists"}