Programming, Music, Games. Creation.

Posts tagged “error

How to fix : Web pages failing to load on computers and devices! (Fixing DNS problems)

I personally had horrible experience with my ISP’s DNS,
I don’t even want to talk about it. It failed majority of the time.

If your browser says ‘DNS Error’ and webpages will not load,
If you need to Refresh (F5) many times before the webpage loads,
If you cannot see images in the website and the page looks weird,
If your Appstore cannot download apps through Wi-Fi,
If your Google Playstore fails do download an app through Wi-Fi,
this is the fix for you.

3p0pvd

There are two ways of doing this,
Do Fix1 if you have no clue how to navigate settings of your router.
Do Fix2 if you clearly know what you are doing with your router settings.

(more…)


How does the computer save Real Numbers?

How does the computer save real numbers?

Lets look at only 2 bytes. (in reality, the computer uses more than 4 bytes to save real numbers.)


The computer uses the following equation to save real numbers

Why use this equation?

setting ‘m’ as numbers before ‘.’ and setting ‘e’ as numbers after ‘.’ is inefficient and takes a lot of memory to save real numbers.
However, using the equation, the computer is able to save real numbers efficiently, no matter how complicated they are.

Still, the computer cannot save wide range of real numbers and cannot save them accurately. It simply saves the data closest possible to the value we want to save. This is called float-point error.

Float-point error

#include <studio.h>

int main(void)
{
int i;
float f=0.0;

for(i=0; i<100; i++)
f+=0.1

printf(“%f “, f);

return 0;
}

the following is a good example of float error.

Variable f is declared,
until ‘i’ becomes 100, 0.1 is added to ‘f’
since ‘i++’ is used, ‘f’ is added by 0.1 100 times

The output must be 10, however you will see slight difference in the value. For example,

10.00002