View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

Number e… a very important number that most of us have memorized to about 10 digits, i.e. 2.71828182846, but how do you compute it? Let’s review the definition of number e as it is typically presented, in the problem of compound interest.

Non-compound interest is defined as follows:

A = P * r * t

“Annual equals principal times rate times time.” This tells us how much interest money is generated over the given time period. If we want to know the total money, we rephrase the equation as follows, using I instead of r.

P_t = P_0 * (1 + I * t)

Non-compound quarterly interest that is assigned a yearly interest rate is defined as follows.

P_t = P_0 * (1 + I/4 * (4*t))

Read on →

Brazil in deep COVID-19 trouble

2020-05-28

Categories: covid19  
Tags: covid19  

Wow, Brazil is in really deep trouble for its lackluster response to Coronavirus. The death toll there is reaching world records and its showing no signs of slowing down. Not to mention, being an undeveloped economy and having a history of political turmoil over economic downturns, things are looking really gruesome ahead.

20200528/https://time.com/5840208/brazil-coronavirus/

Ah, yes, when working with implementing an arithmetic math API library, another solution to the problem of computing the carry bit in software came up. It’s rather easy.

Consider the case of subtraction, a - b. When you want to know what the “carry” bit is in this case, the purpose is to determine if you need to “borrow” during subtraction. Obviously, from some simple arithmetic analysis, a borrow will be required when b > a. This is easy to determine since a - b is the basis of a cmp (compare) instruction.

  • If a - b == 0, then a == b
  • If a - b > 0, then a > b
  • If a - b < 0, then a < b

If we don’t have a means of sign bits on our processor architecture, we simply first check if the result of the subtraction is equal to zero. If not, then we check the sign by checking the value of the most significant bit, and from there we can determine whether we are greater than zero (sign == 0) or less than zero (sign == 1).

So, subtract with borrow.

  1. Compute r = a - b.
  2. Test if r == 0.
  3. If r != 0 && sign_bit(r) == 1, then there is a borrow.

Read on →

Wow, this is really interesting. The “smarter every day” video guy, a former NASA jet propulsion engineer, tried to build a Ninja warrior course to prevent squirrels from getting to a cache of walnuts beneath a bird feeder, but they easily beat it. He totally underestimated his adversaries, they were much better jumpers than he anticipated, so they could jump through many of the challenging parts of his course.

20200527/https://gizmodo.com/former-nasa-engineer-builds-a-ninja-warrior-obstacle-co-1843636932

Yeah, it would definitely be more challenging if everything were further spaced apart, but then it would have to be stationed in a much larger and more open space than this person’s backyard, and I think squirrels don’t like large and open spaces. Probably precisely for that that reason, there’s not much they can climb on and jump off of. Squirrels are the polar opposite of geese, who conversely like large and open spaces and hate confined backyards.

Alright, alright, looking for these better math libraries is getting quite annoying. Surely, if someone else hadn’t made an integer arithmetic version of BLAS, they’d made an arbitrary precision version of BLAS? Indeed, they did, it was done in the past, but not anymore. The library I’ve found hasn’t been updated in 8 years. Also, you’re asking about libraries using double-width intermediates during multiplications? Yes, indeed this MPACK library does make reference to a floating point equivalent, QD/DD (quad-double, double-double arithmetic). Alas, that too is no longer maintained, nor is the original webpage even on the Internet anymore!

Original BLAS, floating point only.

20200527/http://www.netlib.org/blas/

MPACK, arbitrary precision BLAS and LAPACK.

20200527/DuckDuckGo gmp blas
20200527/http://mplapack.sourceforge.net/

QD/DD, quad-double, double-double floating point arithmetic.

20200527/https://web.archive.org/web/20100502022120/http://www.cs.berkeley.edu/~yozo/

Read on →

This article is about some interesting observations of a particular house cleaner.

The bigger the house, the more they worked to afford it, the more prescription bottles they had. I started to see the fact that I couldn’t afford to buy my daughter fancy electronics as a luxury. We went to the beach and looked for crabs under the rocks instead. We spent rainy Saturdays doing a 25-cent puzzle. I vowed never to have a house bigger than I could clean myself.

20200527/https://getpocket.com/explore/item/i-spent-2-years-cleaning-houses-what-i-saw-makes-me-never-want-to-be-rich

However, reading the conclusion and thinking about this, something comes to mind. This is a bit of an over-generalization. My point here, is that for those who are truly rich and have large properties tend not to hire other people to clean them. They are highly ambitious do-it-all folks. But that do-it-all ambition may not last forever, and some of those folks may decide to start hiring house cleaners rather than moving to a smaller house. That’s where this house cleaner’s experience comes into play. For others, they may have had poor strategic decision making from the start, and that’s why they got into their current conditions. That’s the other side of this house cleaner’s experience.

A life of lies lived, a short bout of good fortune early on, but then all gambled away and in a dangerous debt situation from doing business with some shady lenders. Then she turned to bank robbery and was imprisoned. At the outset, this was a very unusual suspect for a bank robber, and educated women, a former nurse.

20200526/https://getpocket.com/explore/item/the-rise-and-fall-of-the-bombshell-bandit

I’m having trouble with my Think Penguin TPE-R1100 wireless access points hanging after heavy Wi-Fi activity or the like. But, here’s the thing. I saw the hardware has support for a watchdog timer, and presumably LibreCMC/OpenWRT uses that to prevent device hanging. So, maybe I should check if something is wrong in that stack. But in the end, I found nothing, everything is swell.

Anyways, the tech learning sure was nice, though, so I’ll summarize what I’ve learned here.

The watchdog timer for this device is implemented here. Looking through the code, all is swell and nice, support for “magic close” is in there, so if the software crashes without a graceful close, the watchdog timer will still keep ticking and reset the system accordingly.

linux-VERSION/drivers/watchdog/ath79_wdt.c
-> ath79_wdt_keepalive

Read on →

Pools in the summer? How does the risk of Coronavirus change that? This one is rather interesting. The main risk of pools is the time that people spend outside the water, often times socializing. This is where the risk fo virus transmission is the greatest. Inside the water, Coronavirus doesn’t spread very well, it is mostly through air how it spreads.

20200526/https://www.theatlantic.com/health/archive/2020/05/pools-pandemic-summer/611878/

This is mildly unfortunate, but for my purposes, I don’t see it as a big issue. The CDC and states have been misreporting active cases of Coronavirus infection and past cases of Coronavirus infection in test results of two different tests, testing for the virus versus testing for antibodies. But for my purposes, this doesn’t seem to be a really big issue, you can still get fairly good tracking even without full certainty of thsoe numbers.

20200526/https://www.theatlantic.com/health/archive/2020/05/cdc-and-states-are-misreporting-covid-19-test-data-pennsylvania-georgia-texas/611935/