## "Fossies" - the Fresh Open Source Software Archive

### Member "gnuastro-0.9/lib/arithmetic-divide.c" (2 Jan 2019, 1941 Bytes) of package /linux/privat/gnuastro-0.9.tar.lz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:

standard) with prefixed line numbers and

code folding option.
Alternatively you can here

view or

download the uninterpreted source code file.
For more information about "arithmetic-divide.c" see the

Fossies "Dox" file reference documentation and the latest

Fossies "Diffs" side-by-side code changes report:

0.8_vs_0.9.

1 /*********************************************************************
2 Arithmetic operations on data structures.
3 This is part of GNU Astronomy Utilities (Gnuastro) package.
4
5 Original author:
6 Mohammad Akhlaghi <mohammad@akhlaghi.org>
7 Contributing author(s):
8 Copyright (C) 2016-2019, Free Software Foundation, Inc.
9
10 Gnuastro is free software: you can redistribute it and/or modify it
11 under the terms of the GNU General Public License as published by the
12 Free Software Foundation, either version 3 of the License, or (at your
13 option) any later version.
14
15 Gnuastro is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
22 **********************************************************************/
23 #include <config.h>
24
25 #include <stdio.h>
26 #include <errno.h>
27 #include <error.h>
28 #include <stdlib.h>
29
30 #include <gnuastro/blank.h>
31
32 #include <gnuastro-internal/arithmetic-binary.h>
33 #include <gnuastro-internal/arithmetic-internal.h>
34
35
36
37
38
39 /* `BINARY_SET_LT' is defined in `arithmetic-binary.h'. As you see there,
40 this is a deep macro (calls other macros) to deal with different
41 types. This allows efficiency in processing (after compilation), but
42 compilation will be very slow. Therefore, for each operator we have
43 defined a separate `.c' file so they are built separately and when built
44 in parallel can be much faster than having them all in a single file. */
45 void
46 arithmetic_divide(gal_data_t *l, gal_data_t *r, gal_data_t *o)
47 {
48 int checkblank=gal_arithmetic_binary_checkblank(l, r);
49
50 BINARY_SET_LT( ( o->type==l->type
51 ? ARITHMETIC_BINARY_OUT_TYPE_LEFT
52 : ARITHMETIC_BINARY_OUT_TYPE_RIGHT ), / );
53 }