Function Index · BitInformation.jl - JuliaHub

Có thể bạn quan tâm

BitInformation.jl
  • Home
  • Bitwise information
  • Transformations
  • Rounding
  • Function index
VersionIndex of functions in BitInformation.jl

Significance of information

p₁ = binom_confidence(n::Int,c::Real)

Returns the probability p₁ of successes in the binomial distribution (p=1/2) of n trials with confidence c.

Example

At c=0.95, i.e. 95% confidence, n=1000 tosses of a coin will yield not more than

julia> p₁ = BitInformation.binom_confidence(1000,0.95) 0.5309897516152281

about 53.1% heads (or tails).

Hf = binom_free_entropy(n::Int,c::Real,base::Real=2)

Returns the free entropy Hf associated with binom_confidence.

Transformations

Transpose the bits (aka bit shuffle) of an array to place sign bits, etc. next to each other in memory. Back transpose via bitbacktranspose().

Backtranspose the bits of array A that were previously transposed with bittranspse().

Bitwise XOR delta. Elements include A are XORed with the previous one. The first element is left unchanged. E.g. [0b0011,0b0010] -> [0b0011,0b0001].

Undo bitwise XOR delta. Elements include A are XORed again to reverse xor_delta. E.g. [0b0011,0b0001] -> [0b0011,0b0010]

B = signed_exponent(A::Array{T}) where {T<:Union{Float16,Float32,Float64}}

Converts the exponent bits of Float16,Float32 or Float64-arrays from its conventional biased-form into a sign&magnitude representation.

Example

julia> bitstring(10f0,:split) "0 10000010 01000000000000000000000" julia> bitstring.(signed_exponent([10f0]),:split)[1] "0 00000011 01000000000000000000000"

In the former the exponent 3 is interpret from 0b10000010=130 via subtraction of the exponent bias of Float32 = 127. In the latter the exponent is inferred from sign bit (0) and a magnitude represetation 2^1 + 2^1 = 3.

Missing docstring for signed_exponent!(::Array{Float32}). Check Documenter's build log for details.

« Rounding

Powered by Documenter.jl and the Julia Programming Language.

Theme

documenter-lightdocumenter-dark

This document was generated with Documenter.jl on Wednesday 19 May 2021. Using Julia version 1.6.0.

Từ khóa » C 0b0001