Month: December 2018

New Publication on Code Project: How .NET’s Math.Round has Nothing to do with Maths. And That’s OK!

About a week ago, I was working on some code that was moving two entities along the x-axis. Inside the library, their x value was a double, but the public interface only allowed for meters in the form of an integer. I used Math.Round to translate the double value into that integer.

One of the requirements for the code was that the entities could never be closer than one meter to each other. I used the rounded value to check this.

As you might have guessed by now, the code kept failing. Even though both entities started out exactly one meter apart, had the same starting speed and were accelerating with the same speed, using the same algorithm, the code kept failing.

At first, I thought it was some kind of double precision error. But this wouldn’t make much sense, as the algorithm would result in the same precision loss. After some debugging, I eventually found out it was not the double but Math.Round that was behaving differently than I had anticipated.

Read my new publication to find out what was actually happening:

https://www.codeproject.com/Reference/1272542/How-NETs-Math-Round-has-Nothing-to-do-with-Maths-A

New Article on Mind Dough: Matter over Mind – Consciousness…Fundamental force or chocolate cake?

A new Mind Dough article has been published!

Due to the complexity of the subject, and the size of the article it has taken me a while to finish. But part one of the Familiar Existence series is finally ready!

This article ventures into a world in which we assume the physical is indeed the seed of consciousness. What would this mean? What can we learn from it? What is a world in which matter exists over mind?

You can read it here. Enjoy!