Jump to content
43oh

alvisj

Members
  • Content Count

    3
  • Joined

  • Last visited

About alvisj

  • Rank
    Noob Class

Profile Information

  • Location
    santa cruz
  1. Floating point numbers are inherently not precise but they are a damn sight better than confusing 1.234 with 1.233 And Arduino gets it right. Also, the meme that floating point has no place in small processors is, at best, misguided. While I agree that is is almost always possible to solve the problem without resorting to floating point, it will invariable take much longer and contain many more errors. And the techniques to do so are not well known, and are usually well beyond the novice audience frequently seen here. In fact, I suspect that the issue here is the result of an attem
  2. Specifically, MSP430F5529 (or, I suspect, any of the MSP430 variants down the "C:\energia-0101E0017\hardware\msp430\cores\msp430\avr" or "C:\energia-1.6.10E18\hardware\energia\msp430\cores\msp430\avr" paths.) Al
  3. In both 1.6.10E18 & 0101E0017, String constructor yields unexpected results for float (& presumable double) arguments: The output from the following simple sketch is: 00001.233 0001.23 In Arduino, the output is: 1.234 1.23 /* String constructors Examples of how to create strings from other data types */ void setup() { Serial.begin(115200); // send an intro: Serial.println("\n\nString Constructors:"); Serial.println(); } void loop() { String stringOne = String(1.234, 3); Serial.println(stringOne); stringOne = String(1.234, 2); Serial.println(
×
×
  • Create New...