diff options
author | jofret | 2009-06-29 08:25:27 +0000 |
---|---|---|
committer | jofret | 2009-06-29 08:25:27 +0000 |
commit | a9866335e7502f152aed062acace38f524e9cbcd (patch) | |
tree | 4dc697d89e9ce87a5de7216d8bb5807db16f5e08 /src | |
parent | 06b647255d6897ddb4abeb4d7d87d66a3400c3ba (diff) | |
download | scilab2c-a9866335e7502f152aed062acace38f524e9cbcd.tar.gz scilab2c-a9866335e7502f152aed062acace38f524e9cbcd.tar.bz2 scilab2c-a9866335e7502f152aed062acace38f524e9cbcd.zip |
Adding AND and OR logical operations
Diffstat (limited to 'src')
-rw-r--r-- | src/c/operations/interfaces/int_OpLogAnd.h | 39 | ||||
-rw-r--r-- | src/c/operations/interfaces/int_OpLogOr.h | 39 |
2 files changed, 78 insertions, 0 deletions
diff --git a/src/c/operations/interfaces/int_OpLogAnd.h b/src/c/operations/interfaces/int_OpLogAnd.h new file mode 100644 index 00000000..4d058cba --- /dev/null +++ b/src/c/operations/interfaces/int_OpLogAnd.h @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPLOGAND_H__ +#define __INT_OPLOGAND_H__ + +#define Bool2Float(in) ((in) ? 1.0f : 0.0f) + +#define Bool2Double(in) ((in) ? 1.0 : 0.0) + +#define s0s0OpLogAnds0(in1, in2) Bool2Float(in1 != 0.0 && in2 != 0.0) + +#define d0d0OpLogAndd0(in1, in2) Bool2Double(in1 != 0.0 && in2 != 0.0) + +#define c0c0OpLogAnds0(in1, in2) Bool2Float((creals(in1) != 0.0 || cimags(in1) != 0.0) && (creals(in2) != 0.0 || cimags(in2)) + +#define s0c0OpLogAnds0(in1, in2) Bool2Float(in1 != 0.0 && (creals(in2) != 0.0 || cimags(in2))) + +#define c0s0OpLogAnds0(in1, in2) Bool2Float((creals(in1) != 0.0 || cimags(in1) != 0.0) && in2 != 0.0) + +#define z0z0OpLogAndd0(in1, in2) Bool2Double((zreals(in1) != 0.0 || zimags(in1) != 0.0) && (zreals(in2) != 0.0 || zimags(in2)) + +#define d0z0OpLogAndd0(in1, in2) Bool2Double(in1 != 0.0 && (zreals(in2) != 0.0 || zimags(in2)) + +#define z0d0OpLogAndd0(in1, in2) Bool2Double((zreals(in1) != 0.0 || zimags(in1) != 0.0) && in2 != 0.0) + + +#endif /* !__INT_OPLOGAND_H__ */ diff --git a/src/c/operations/interfaces/int_OpLogOr.h b/src/c/operations/interfaces/int_OpLogOr.h new file mode 100644 index 00000000..70dd1952 --- /dev/null +++ b/src/c/operations/interfaces/int_OpLogOr.h @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPLOGOR_H__ +#define __INT_OPLOGOR_H__ + +#define Bool2Float(in) ((in) ? 1.0f : 0.0f) + +#define Bool2Double(in) ((in) ? 1.0 : 0.0) + +#define s0s0OpLogOrs0(in1, in2) Bool2Float(in1 != 0.0 || in2 != 0.0) + +#define d0d0OpLogOrd0(in1, in2) Bool2Double(in1 != 0.0 || in2 != 0.0) + +#define c0c0OpLogOrs0(in1, in2) Bool2Float((creals(in1) != 0.0 || cimags(in1) != 0.0) || (creals(in2) != 0.0 || cimags(in2)) + +#define s0c0OpLogOrs0(in1, in2) Bool2Float(in1 != 0.0 && (creals(in2) != 0.0 || cimags(in2))) + +#define c0s0OpLogOrs0(in1, in2) Bool2Float((creals(in1) != 0.0 || cimags(in1) != 0.0) && in2 != 0.0) + +#define z0z0OpLogOrd0(in1, in2) Bool2Double((zreals(in1) != 0.0 || zimags(in1) != 0.0) && (zreals(in2) != 0.0 || zimags(in2)) + +#define d0z0OpLogOrd0(in1, in2) Bool2Double(in1 != 0.0 && (zreals(in2) != 0.0 || zimags(in2)) + +#define z0d0OpLogOrd0(in1, in2) Bool2Double((zreals(in1) != 0.0 || zimags(in1) != 0.0) && in2 != 0.0) + + +#endif /* !__INT_OPLOGOR_H__ */ |