Products > Programming

doing math, scaled up integer or float? and pre-processor stuff

<< < (15/15)

T3sl4co1l:
And on a less related note, I find intervals very useful in analog design: match up the input and output voltage/current ranges, and that's more or less it.

Or more generally, in CS: if a function doesn't operate (nominally) on the full range of its parameters, then explicitly test the extrema, the edge conditions around / beyond where it's defined.  Not always easy or feasible (how do you define range on a C string?), but can be very illuminating when possible.  And it's more every year, it's feasible to exhaustively test ~40 bits of parameters these days, and more with statistical coverage or fuzzing.  If, of course, you can afford the time to do such tests :)

Tim

Nominal Animal:
Interval arithmetic could be useful in embedded implementations when evaluating multiple variables, and decisions like "still within operational range" or "still outside operational range", avoiding issues related to oscillation (similar to Schmitt triggers).  Say, you might have a large number of sensors, or many noisy sensor readings, and use confidence intervals (say using the interval as the range that contains 75% of the samples).

I can imagine it could be useful in e.g. agriculture, where soil moisture sensors often fail (not the electronics, the sensor itself), so you might make a system of many cheap sensors, maybe with a red/green LED on top to show whether the sensor is considered useful or not (when directed by the system), so bad ones are trivial to replace.

T3sl4co1l:
Kind of the opposite concept of fuzzy logic, though you could just as well say rather than being fuzzy, it's just got straight sides between what counts as each condition (above/in/below range).

Hmmm, you could do that multivariate as well, not that it would be exactly trivial to conceptualize, or use embedded.  Just that it reminds me of the error matrix of like a Kalman filter.

I suppose building it from the statistics of an array of sensors, you get kind of both, a statistical confidence as well as a fuzzy logic.

Tim

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod