VB Inequality Operator False Result - operator-keyword

I have some problems with the inequality operators.
Consider the code below:
If a >= 0.00000001 Then
' action statement
End If
a variable is a Single and a = 0.00000001.
When I run the if condition using Microsoft Visual Basic 2010 Express, the Immediate Windows says it is false. I have inserted a screenshot for your reference.
Screenshot
Do you know what is the root cause of this issue and how do I solve it?
Thank you

Floating-point math is not exact. It's an approximation.
There's more to it here: http://floating-point-gui.de/

Related

Octave's equivalent to Matlab's which('filename', '-all')

In Matlab, which('filename', '-all') returns all the files with the given 'filename' in the Matlab path, but Octave only returns the first one (not the shadowed ones). Is there an easy way get the equivalent in Octave?
this is a longstanding feature request for Octave that as of this post has not yet been resolved. See Bug #32973 and Bug #32088. The latter link appears to have a workaround patch and function attached that never quite made it into the main codebase.
UPDATE 16 Nov 22: while the bug has not been fixed, rather than silently fail Octave v8 will now provide a warning to the user that the option is not yet implemented and only the first result will be returned.

In Matlab's very old versions, what did "\" stand for in a conditional statement?

For my thesis work I was suggested to use a related code made in year 2000 on Matlab; when transcribing it I found the next syntax for some if loops:
if \ min(x)>= 0
statement;
end
However it is not valid anymore for recent software's versions. I did some search on Google but using "\" is pretty ambiguous and found nothing out of conditionals. Do you know what does it stand for?

v-rep strange number format

I'm trying to use v-rep and following a simple tutorial. But the numbers in all windows follows sci-notation format (see the picture). Can any one tell me there to change this?
Thanks.
So I sent a mail to Coppelia Robotics and they basically said that there is no way to switch to a regular notation and they used sci notation in the name of precision. So we have to live with it.

Residuals from ARMA estimation in MATLAB

I am trying to use the function armaxfilter from the MFE toolbox, but I get an error:
>> parameters = armaxfilter(y,1,1,1);
??? Error: File: armaxfilter.m Line: 477 Column: 21
Expression or statement is incorrect--possibly unbalanced (, {, or [.
Apparently my code is correct, as can be seen from an example from help:
EXAMPLE:
To fit a standard ARMA(1,1), use
parameters = armaxfilter(y,1,1,1)
Any idea on what is wrong?
In any case, my aim is getting residuals from an ARMA model estimation on a time series, a suggestion on an alternative way would be helpful as well.
Looking at the code (from here) , the issue is probably with the tilde output. If you are using an old version of MATLAB which does not support ~, you may get the error you mention.
There is a simple way to check this. Try out at the command line:
[~,idx] = min(1:10)
If this causes an error, you are using a version of MATLAB which does not support ~. If you want to use that particular code, you will have to either upgrade your MATLAB, or edit all the files such that examples of the tilde are replaced with some sort of dummy variable, e.g.:
[garbage,idx] = min(1:10)
As the error message describes, the problem lies in the armaxfilter.m. You should open that file and see what code is written at the specified line. I am sure you will see a bug in there.

Perl operators are "discovered" and not designed?

Just reading this page: https://github.com/book/perlsecret/blob/master/lib/perlsecret.pod , and was really surprised with the statements like:
Discovered by Philippe Bruhat, 2012.
Discovered by Abigail, 2010. (Alternate nickname: "grappling hook")
Discovered by Rafaƫl Garcia-Suarez, 2009.
Discovered by Philippe Bruhat, 2007.
and so on...
The above operators are DISCOVERED, so they are not intentional by perl-design?
Thats mean than here is possibility than perl sill have some random character sequences what in right order doing something useful like the ()x!! "operator"?
Is here any other language what have discovered operatos?
From the page you linked:
They are like operators in the sense that these Perl programmers see
them often enough to recognize them without thinking about their
smaller parts, and eventually add them to their toolbox. And they are
like secrets in the sense that they have to be discovered by their
future user (or be transmitted by a fellow programmer), because they
are not explicitly documented.
That is, they are not really their own operators, but they are made up of smaller operators compounded to do something combinedly.
For example, the 'venus' operator (0+ or +0) numifies the object on its left or right. That's what adding zero in any form does, "secret" operator or not.
Perl has a bunch of operators that do special things, as well as characters that do special things when interpreted in a specific context. Rather than these being actual "operators" (i.e., not explicitly recognized by the Perl parser), think of them as combinations of certain functions/operations. For example ()X!!, which is known as the "Enterprise" operator, consists of () which is a list, followed by x, which is a repetition operator, followed by !! (the "bang bang" operator), which performs a boolean conversion. This is one of the reasons that Perl is so expressive.