## All Site Activity

• Susanne Cardwell commented on the blog Implementing Sine and Cosine Without Floats November 15, 2017 - 11:14am
Thanks Tyler. Floating point numbers are a problem in computer languages. Inaccurate calculations. When I was in the math program, we rounded numbers to the fifth decimal place. I wonder why computer languages have such inaccuracy while calculators...
• Tyler Lucas published a blog post Implementing Sine and Cosine Without Floats November 15, 2017 - 10:46am
Working example of integer-based sine and cosine lookup table for Arduino.
• In fact, calculators have the same floating point limitations as computers, which makes sense, because calculators are simple computers. Try adding 0.1 to 1,000,000,000 and you'll get 1,000,000,000, not 1,000,000,000.1 (unless your calculator uses 64-bit numbers, which can precisely display up to about 18 digits); or try cos(0.00001) and you'll get 1, not 0.99999999995. They seem to be more accurate because they can limit their outputs. It's worth noting that having a hardware FPU does not guarantee greater precision than using a floating point library, as Arduinos do. The highest precision operations are actually done in software. Take a look at Java's BigDecimal for a great example and explanation.

You are correct in thinking that there could be a loss of precision when working with base-10 numbers in a binary system. The IEEE 754 standard defines 5 binary and 3 decimal floating point formats, where the latter can store decimal numbers exactly. Since the libm.a floating point library (Arduino/avr-gcc, etc.) likely uses the "binary32" format, it does not represent decimal number exactly, and is accurate to about 7 digits. Any format is no more precise than the value of the least significant bit ("LSB") (big-endian only; MSB value for little-endien) in the significand. For binary32 numbers, this is 2^-23 times the exponent, which is related to its magnitude. A quick search found a library that may be able to introduce the decimal32/64/128 formats to an Arduino platform, [here]: GitHub.com/toddtreece/esp8266-Arduino/.../decimal (it is for the ESP8266, a 32-bit Xtensa system, however, so it wouldn't work out of the box, if at all, on the 8-bit AVR/etc. systems we are using).

Tyler Lucas November 15, 2017 - 1:20pm

• Tyler,

This is a great write up, good explanation and documentation. Thank you. If I have time I’m going to refactor this into my project. I just spent the last while programming the basics of dead reckoning for a two-wheeled, differential steering rover and of course the core of it involved the use of sine and cosine and lots of floats. I’ve read several articles admonishing the use of floats on micro controllers. It’s understandable as you’ve noted due to their limited memory, processing power, and lack of floating point unit. I plowed ahead anyway and with no noticeable performance problems yet. The encoder interrupts are firing about 750/s and I’m calculating coordinates and orientation 10/s. My only concern would be sacrificing precision. Dead-reckoning is known for error accumulation anyway.

peterde December 11, 2017 - 8:30pm

• Glad you could use it!

You can add another factor of ten or two to increase precision. (The above code is the float output multiplied by 1000.) Would just need to be a bit more careful about overflow when doing math with the output, especially multiplication. E.g. 'sinx' output may be as high as +10000, so don't multiply by more than 32 if using int, ~200000 if using long. Really, manually keeping track of these ranges is a pain in the ass, especially when debugging it (without a debugger/JTAG/etc), so if your application works with floats, I'd just use them... until it doesn't work. :)

Also, IntegerGeometry.h and IntegerGeometry.cpp were promoted to the master branch after a bit more review.

Tyler Lucas December 11, 2017 - 8:58pm

• Prison communities each have their own rules, hierarchies and personalities; therapeutic challenges can arise for both the patient and the counselor. The 406 textbook repeatedly emphasizes the importance of understanding the culture of our clients...
• Jon Dron bookmarked Firefox Quantum in the group COMP 266 November 14, 2017 - 11:10am
The new version of Firefox is very sleek and very fast, while retaining backwards compatibility with older plugins. An easy upgrade for users of the previous version, a quick install for everyone else. An absolute must-have for any web developer....
• I tried Firefox 57 and the experience for me was the exact opposite. Typical of a corporation programming elite controlling the world. Non of my past extensions worked (0 backward compatibility), the speed did not improve, and I lost access to my Adobe Acrobat XI plugin. But hey great advertising by Mozilla, and trying to stop the automatic updating was a displeasure, in particular updating plugins in FF 56.02 seemed to auto-update the entire web browser.  Fortunately I have backups, otherwise I would be forced to buy a whole new computer system just to use Firefox 57 on my 7 year old MAC.

PS. The only positive was that Google docs worked better in FF 57; I am glad someone else had a better experience, but I will be frozen at FF 56.02 and use Chrome/Safari for Google docs...

Steve Swettenham November 19, 2017 - 2:03am

• lottof ideas
• Meaghan Peuramaki-Brown published a blog post Andean Khipu Systems in the group AU Anthropology Interest Group November 13, 2017 - 1:56pm
ANTH 320 Ancient City and Civilizations students learn about Andean states and empires, including their use of the khipu system as a form of recording and communication. Learn more from this recent Sapiens blog post:...
• Meaghan Peuramaki-Brown uploaded the file ASA Calgary November 2017 Newsletter in the group AU Anthropology Interest Group November 12, 2017 - 5:37pm
• Jon Dron posted to the wire November 9, 2017 - 1:16pm
Research demo of online learning tools by @maigac and team at https://athabascau.adobeconnect.com/presentation/ 1:30pm MT today
• Meaghan Peuramaki-Brown published a blog post Mental Maps of Cities in the group AU Anthropology Interest Group November 6, 2017 - 9:39pm
ANTH 394 Urban Anthropology students learn about mental maps of cities. I wonder if this tour would come close to Leonard Cohen's own mental map of Montreal... http://www.cbc.ca/radio/q/blog/leonard-cohen-s-montreal-an-illustrated-map-1.4386577
• Paul Stebbins published a blog post Tool and Methods of Analytics November 6, 2017 - 10:31am
This week I reviewed 8 tools used for data analysis. Most of the tools were online based.  The tools looked at were AAT, Visualizefree, Darwin Ecosystem, Gephi, OECD, Gapminder, Klout and netlytic.  AAT looks to be an online based tool...
• Viorel Tabara commented on a bookmark Signal : now with proper desktop apps November 5, 2017 - 2:19pm
Thanks for bringin up the topic Jon. Signal is "almost there" when it comes privacy and security. The Briar project aims to solve that problem by implementing a fully descentralized system. A security audit report of its implementation and code was...
Figure 1: Skinner's teaching machine It is not much of a surprise that many apps are designed to be addictive, nor that there is a whole discipline behind making them so, but I was particularly interested in the delightfully named Dopamine Labs'...
• Meaghan Peuramaki-Brown published a blog post Women in Ancient Civilizations in the group AU Anthropology Interest Group November 3, 2017 - 9:48pm
ANTH 320 Ancient Cities & Civilizations students will recognize many of the locations in this first episode of the show "The Ascent of Women", including Anatolia (Catalhöyük) and Mesopotamia (Sumer). Learn about the role of women in...
• Meaghan Peuramaki-Brown published a blog post London's Past--Underground in the group AU Anthropology Interest Group November 3, 2017 - 8:43pm
ANTH 320 Ancient Cities & Civilizations, as well as ANTH 394 Urban Anthropology students spend much time discussing the complexity and deep history of great cities of the world. Here is a wonderful documentary about the history of London, as...
• Steve Swettenham commented on the blog You've Got Mail - Microsoft Office Say What??? November 3, 2017 - 1:42am
Thanks Elenar for your thoughts, You have touched on a subject that I have witnessed in education for many iterations since becoming a student in post-secondary, that is pushing technologies on the client without understanding what the client...
• Anonymous commented on the blog You've Got Mail - Microsoft Office Say What??? November 2, 2017 - 9:43pm
great article Steve:  365 office decision done by somebody who is not working at AU anymore --  no idea why following ideas those who gone with the wind....  --  elenar - an-nonsense
• Meaghan Peuramaki-Brown published a blog post The Future of Cities in the group AU Anthropology Interest Group November 2, 2017 - 9:35pm
ANTH 394 Urban Anthropology students should enjoy this episode of CBC Ideas, "Creating a City for All: The Future of Cities in the 21st Century". It features a panel discussion about issues of the city--both today and...
• Jon Dron bookmarked Signal : now with proper desktop apps November 2, 2017 - 2:32pm
Signal is arguably the most open, and certainly the most secure, privacy-preserving instant messaging/video or voice-calling system available today. It is open source, ad-free, standards-based, simple, and very well designed. Though not filled with...
• Thanks for bringin up the topic Jon. Signal is "almost there" when it comes privacy and security. The Briar project aims to solve that problem by implementing a fully descentralized system. A security audit report of its implementation and code was released not too long ago. Unfortunately the iOS implementation is still a work in progress.

Viorel Tabara November 5, 2017 - 2:19pm

• Chacmool at 50: The Past, Present, and Future of Archaeology Nov. 8-12, 2017, Calgary, Alberta, Canada Session Title: The ‘Other Grand Challenge’: Archaeological Education & Pedagogy in the Next 50 Years Session Organizers:...
• Steve Swettenham published a blog post You've Got Mail - Microsoft Office Say What??? November 2, 2017 - 4:08am
• great article Steve:  365 office decision done by somebody who is not working at AU anymore --  no idea why following ideas those who gone with the wind....  --  elenar

- an-nonsense

Anonymous November 2, 2017 - 9:43pm

• Thanks Elenar for your thoughts,

You have touched on a subject that I have witnessed in education for many iterations since becoming a student in post-secondary, that is pushing technologies on the client without understanding what the client wanted. ...and worse is that you, I, and everyone else are paying for it. Yahoo!

Steve Swettenham November 3, 2017 - 1:42am