Half precision floating point question — smallest non-zero number

There’s a floating point question that popped up and I’m confused about the solution. It states that

IEEE 754-2008 introduces half precision, which is a binary
floating-point representation that uses 16 bits: 1 sign bit, 5
exponent bits (with a bias of 15) and 10 significand bits. This format
uses the same rules for special numbers that IEEE754 uses. Considering
this half-precision floating point format, answer the following
questions: ….

What is the smallest positive non-zero number it can represent?

The answer says:
bias = 15
Binary representation is: $0 , 00000 , 0000000001 = 2^{-14} * 2^{-10}=2^{-24}$

I’ve understood the binary representation part, but how does it get to those exponents of 2??

modal windows – Material Design | Dialoge from floating action button – how to do it? Is it even a good idea?

I’m designing a dark-mode-first desktop website for an online media organization.
One of the key characteristics of the organiation is its community, and how open, friendly, inviting and communical it is.

So, I thought of designing an FAB (floating action buttion) that supports those characteristics that will be used for connecting with the community.
Impelementation wise, it has a “contact us” text with a relevant icon, and should open up into a dialog. However, I’m not sure if an FAB opening into a dialog is in line with the Material Design guidelines. Is it?

Another issue that I have is that the FAB uses the primary accent color I defined, which I think is fine, since it’s small, how would I color the panel while showing that it’s an expansion of the button? I think it’s an issue for the big dialog from to have a fill primary color, which would be too colorful and bright in this color’s case. If it’s not against the Material Design guidelines, how would you advise me to go about designing it?

I thought of making only a border of the same color and treating the rest of the dialog like a regular card but I’m not sure about that layout.

Page with the contact us FAB:
page-with-contact-us-fab

Page with the contact us dialog open, red border, grey fill color:
page-with-contact-us-dialog-open--border-red-fill-grey

Page with the contact us dialog open, red fill color:
page-with-contact-us-dialog-open--fill-red

I also saw a this Codepen that uses the same structure, only uses a menu header (I don’t know what else to call it) that has the FAB’s color. I’m not sure if it’s a good idea, but I’m thinking of having 2 sections in that dialog, which I think would be a good idea for this use case to be implemented as tabs. With 2 sections, one would be links to all the communities, and the other one will be for contacting the organization directly, so that Codepen’s structure with the header might be a good idea.

I’d appreciate thoughts on that structure as well.

Note about a closing option being missing: whichever structure I go with I’d have to choose what kind of closing mechanism I want, so in the meantime I didn’t add this option.

EDIT: I could also implement a contact option via a form, which would make the active role of the dialog a contact us/support dialog, in which case the positioning and the structure (dialog) would be traditional.

Padding Inside a Floating div

I am in the middle of creating a basic, plain jane, old school div layout. But for the life of me, I can’t figure out how to get padding in the content area and side menu without the template distorting with extra padding. I’ve been searching online for hours — and I’m finding ‘apparent’ solutions, but when I try to implement them, they don’t work. I now have a migraine. If anyone has a solution, I’d be rapt to know what it is.

Note: The template isn’t complete, per se. I’m just trying to get the basic layout/functionality right.

html {
  height: 100%;
  font-size: 1.8vw;
}
body {
  height: 100%;
  background-color: #EEEEEE;
  font-family: arial;
}
.wrap {
  width: 80%;
  height: 100%;
  background-color: #FFFFFF;
  max-width: 1200px;
  margin: 0px auto 0px auto;
  border-left: 1px solid #999999;
  border-right: 1px solid #999999;
}
.head {
  margin-top: 10px;
}
.logo {
  background-color: #FFFFFF;
  float: left;
  width: 30%;
  height: 100px;
  line-height: 100px;
  text-align: center;
}
.head-right {
  background-color: #FFFFFF;
  float: right;
  width: 70%;
  text-align: center;
  height: 100px;
  line-height: 100px;
}
.topmenu {
  clear: both;
  background-color: #FFFFFF;
}
.content-wrap {
  background-color: yellow;
}
.content {
  background-color: #CCCCCC;
  float: left;
  width: 70%;
}
.content-box {

}
.content-2 {
  clear: both;
  border-top: 1px solid #999999;
  background-color: #FFFFFF;
}
.content-2-box {
  padding: 1vw;
}
.sidemenu {
  background-color: #999999;
  float: right;
  width: 30%;
}
.sidemenu-box {

}
.foot {
  clear: both;
  background-color: #FFFFFF;
  margin-top: 10px;
}
/* Top Menu */
ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: green;
  text-align: center;
}


li {
  display: inline-block;
}

li a {
  display: block;
  color: white;
  text-align: center;
  padding: 16px;
  text-decoration: none;
}

li a:hover {
  background-color: #111111;
}
.home-link {
  padding-left: 20%;
}
/* Responsive */
@media screen and (max-width: 600px) {
  html {
    font-size: 2.5vw;
  }   
  .logo {
    float: none;
    width: 100%;
    text-align: center;
  }
  .head-right {
    float: none;
    width: 100%;
  }
  .content {
    float: none;
    width: 100%;
  }
  .sidemenu {
    float: none;
    width: 100%;
  }
}

Code (CSS):


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8" />
  <title></title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link href="style.css" type="text/css" rel="stylesheet" />
</head>
<body>
  <div class="wrap">
    <div class="head">
      <div class="logo">
        LOGO
      </div>
      <div class="head-right">
        head right
      </div>
    </div>
    <div class="topmenu">
      <ul>
        <li>
          <a href="#">Home</a>
        </li>
        <li>
          <a href="#">About</a>
        </li>
        <li>
          <a href="#">Contact</a>
        </li>
        <li>
          <a href="#">Blog</a>
        </li>
      </ul>
    </div>
    <div class="content-wrap">
      <div class="content content-box">
        <h1>This Is A Page Heading</h1>
        <p>This is some content.</p>
      </div>
      <div class="sidemenu sidemenu-box">
        sidemenu
      </div>
      <div class="content-2 content-2-box">
        Content 2
      </div>
    </div>
    <div class="foot">
      <div class="content content-box">
        <p>Foot Left</p>
      </div>
      <div class="sidemenu sidemenu-box">
        Foot Right
      </div>
    </div>
  </div>
</body>
</html>

HTML:

SEMrush

 

iphone – How to disable a floating right arrow button that makes FaceTime calls

My mom keeps accidentally FaceTiming me and we think it’s because of a floating gray button with a left angle bracket on it:

floating right arrow button

I’ve been trying to help her remotely turn it off. She must have accidentally activated it somehow today, but she is unaware of how it happened.

Assistive touch is turned off. Nothing in control center is highlighted. I’ve tried searching for it on my phone to figure out what enables it, but I cannot figure it out. I have googled and all I find is suggestions to turn off assistive tough, but that is off. I don’t even know how to google it. I’ve been trolling through assistive access, FaceTime, and phone settings and can find nothing related to that button.

What is this button and how do you disable it?

dnd 3.5e – How does a Chameleon’s “floating” Bonus Feat interact with the various sacred vows from the Book of Exalted Deeds?

At 2nd level, the Chameleon prestige class gets a bonus feat. The description of the chameleon’s Bonus Feat ability states (Races of Destiny, p. 113):

Bonus Feat (Ex): At 2nd level, you gain a bonus feat. (…) At the start of each day, you can choose to change your bonus feat to any other feat for which you meet the prerequisites.

Assuming I have taken the Sacred Vow feat (Book of Exalted Deeds, p. 45) earlier in my career from another feat source, my character would then meet the prerequisites for other feats such as the “Vow of Poverty” or “Vow of Chastity” using this rotating feat slot.

These “Exalted” feats all have this nice little blurb on it (BoED, p. 47-48):

If you break your vow, you immediately and irrevocably lose the benefit of this feat. You may not take another feat to replace it.

Mechanically, if I were to swap out my exalted vows using the Bonus Feat ability from the Chameleon prestige class, I lost the vow without breaking the criteria of the oath. Or have I broken the vow by removing the feat voluntarily?

Is there an appropriate or articulate RAW interpretation of this ability interaction?
Or is this a “DM’s prerogative” type ruling?

computer architecture – Negative Numbers in 32 bit Floating Point IEEE Numbers

Contrary to two’s complement representation of negative integers, the negative numbers in IEEE floating-point are represented with only a sign bit change, as shown in there.

For example, $0cdot01111100cdot01000000000000000000000$ is the representation of $0.15625$, and $1cdot01111100cdot01000000000000000000000$ is the representation of $-0.15625$.

In particular, there are two representations of zero (the positive one and the negative one).

Floating point bitwise comparator. If f1 and f2 are floating point numbers with the following properties can we always say f1 > f2?

Recall floating-point representation:

Suppose $f$ is a floating-point number then we can express f as,
If $f$ is normal:
$$(-1)^{s}cdot2^{e-127}(1 + sumlimits_{k=1}^{23} b_{23-k}cdot 2^{-k})$$
If $f$ is denormal/subnormal: $(e = 0)$
$$(-1)^{s}cdot2^{-126}(0 + sumlimits_{k=1}^{23} b_{23-k}cdot 2^{-k})$$

where

  • $s$ is the sign of $f$.
  • $e$ is the stored exponent of $f$. This means $e-127$ is the effective exponent of $f$.
  • $b_k$ is the $k$-th bit of $f$ where $b_0$ is the LSB and $b_{22}$ is the MSB.

Let $f_1$ be a floating-point number with constants $s_1, e_1,$ and $b_{1k}$.

Let $f_2$ be a floating-point number with constants $s_2, e_2,$ and $b_{2k}$.

I’m trying to find out if the following statement is true: $e_1 > e_2 > 0$ and $s_1 = s_1$ then $f_1 > f_2$.

My initial strategy was to subtract $f_2$ from $f_1$ and show that it must be strictly greater than $0$.

What I have so far.

$
begin{align*}
f_1-f_2 &= 2^{e_1-127}(1 + sumlimits_{k=1}^{23} b_{1,23-k}cdot 2^{-k}) – 2^{e_2-127}(1 + sumlimits_{k=1}^{23} b_{2,23-k}cdot 2^{-k})\
&= 2^{-127}(2^{e_1}(1 + sumlimits_{k=1}^{23} b_{1,23-k}cdot 2^{-k}) – 2^{e_2}(1 + sumlimits_{k=1}^{23} b_{2,23-k}cdot 2^{-k})) \
&= 2^{-127}(2^{e_1} + sumlimits_{k=1}^{23} b_{1,23-k}cdot 2^{e_1-k} – 2^{e_2} – sumlimits_{k=1}^{23} b_{2,23-k}cdot 2^{e_2-k})\
&=2^{-127}(2^{e_1} – 2^{e_2} + sumlimits_{k=1}^{23} b_{1,23-k}cdot 2^{e_1-k} – sumlimits_{k=1}^{23} b_{2,23-k}cdot 2^{e_2-k})\
&=2^{-127}(2^{e_1} – 2^{e_2} + sumlimits_{k=1}^{23}(b_{1,23-k}cdot 2^{e_1-k}-b_{2,23-k}cdot 2^{e_2-k}))
end{align*}
$

Now since $e_1 > e_2 iff e_1-e_2 > 0 iff 2^{e_1}-2^{e_2} > 1$ we have that:

$
begin{align*}
f_1-f_2 & > 2^{-127}(1 + sumlimits_{k=1}^{23}(b_{1,23-k}cdot 2^{e_1-k}-b_{2,23-k}cdot 2^{e_2-k}))
end{align*}
$

In order for the above to always be greater than zero I require that $sumlimits_{k=1}^{23}(b_{1,23-k}cdot 2^{e_1-k}-b_{2,23-k}cdot 2^{e_2-k}) > -1$.

However, I don’t know how to formally show this. Any help/hints are much appreciated as inequalities are not my strong suit.