file
stringlengths 18
26
| data
stringlengths 3
1.04M
|
---|---|
the_stack_data/3261625.c | /*
* IMD0012 - T03
* -------------------------
* LISTA 02 - EXERCICIO 07
* -------------------------------------
* https://github.com/filipegmedeiros
* ---------------------------------------------
*/
|
the_stack_data/150139654.c | #include <stdio.h>
int main()
{
char s[1000];int n=0,l,r,i,f=1;
puts("Enter a sentence: ");
while (1)
{
s[n]=getchar();
if (s[n]=='!'||s[n]=='?'||s[n]=='.') break;
++n;
}
printf("Reversal of sentence: ");
--n;l=r=n;
while (r>=0)
{
if (f) f=0;
else putchar(' ');
while (s[l]!=' '&&l>=0) --l;
++l;
for (i=l;i<=r;i++) putchar(s[i]);
l-=2;r=l;
}
putchar(s[n+1]);putchar('\n');
return 0;
}
|
the_stack_data/90765993.c | #include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAXSIZE 128
void quit(char *s)
{
perror(s);
exit(1);
}
struct messageBuffer
{
long messageType;
char messageText[MAXSIZE];
char string1[MAXSIZE];
char string2[MAXSIZE];
};
main()
{
int messageID;
int msgflg = IPC_CREAT | 0666;
int check;
key_t key;
size_t bufferLength;
struct messageBuffer receiverBuffer;
struct messageBuffer temp;
struct messageBuffer senderBuffer;
key = 1234;
if ((messageID = msgget(key, msgflg )) < 0) //Get the message queue ID for the given key
quit("msgget");
//Message Type
senderBuffer.messageType = 1;
receiverBuffer.messageType = 1;
printf("\n\t\tTWO-WAY IPC : MESSAGE-QUEUE\n");
printf("Message : ");
scanf("%[^\n]",senderBuffer.messageText);
getchar();
strcpy(temp.string1, senderBuffer.messageText);
strcpy(temp.string2, "STOP");
check = strcmp(temp.string1, temp.string2);
if(check == 0)
{
printf("[STOP] message received... Process Aborted !!!");
exit(0);
}
bufferLength = strlen(senderBuffer.messageText) + 1 ;
if (msgsnd(messageID, &senderBuffer, bufferLength, IPC_NOWAIT) < 0)
{
printf ("%d, %d, %s, %d\n", messageID, senderBuffer.messageType, senderBuffer.messageText, bufferLength);
quit("msgsnd");
}
else
printf("Message Sent to the server\n");
if ((messageID = msgget(key, 0666)) < 0)
quit("msgget()");
//Receive an answer of message type 1.
if (msgrcv(messageID, &receiverBuffer, MAXSIZE, 1, 0) < 0)
quit("msgrcv");
printf("Message Received by the server: ");
printf("%s\n", receiverBuffer.messageText);
printf("\n");
//Receiver to sender
//printf("Enter a message to add to message queue : ");
//scanf("%[^\n]",receiverBuffer.messageText);
//getchar();
bufferLength = strlen(receiverBuffer.messageText) + 1 ;
if (msgsnd(messageID, &receiverBuffer, bufferLength, IPC_NOWAIT) < 0)
{
printf ("%d, %d, %s, %d\n", messageID, receiverBuffer.messageType, receiverBuffer.messageText, bufferLength);
quit("msgsnd");
}
else
printf("Message Sent to back to the client\n");
if ((messageID = msgget(key, 0666)) < 0)
quit("msgget()");
//Receive an answer of message type 1.
if (msgrcv(messageID, &senderBuffer, MAXSIZE, 1, 0) < 0)
quit("msgrcv");
printf("Message Received to the client: ");
printf("%s\n", senderBuffer.messageText);
printf("\n");
//Receiver to sender
//printf("Enter a message to add to message queue : ");
//scanf("%[^\n]",senderBuffer.messageText);
//getchar();
exit(0);
} |
the_stack_data/165767515.c | #include <stdio.h>
int main()
{
int a,b,c,d,e;
printf("Enter ISBN: ");
scanf("%d-%d-%d-%d-%d",&a,&b,&c,&d,&e);
printf("GS1 prefix: %d\n",a);
printf("Group identifier: %d\n",b);
printf("Publisher code: %d\n",c);
printf("Item number: %d\n",d);
printf("Check digit: %d\n",e);
return 0;
}
|
the_stack_data/117327022.c | int SUBST_putenv = 1; /* int putenv(char*); */
#include <stdio.h>
#include <string.h>
extern char **environ;
static char **my_environ;
void *malloc(int);
void free(void*);
int putenv(void *venv)
{ const char *env = (char*)venv;
char name[256];
int ei,len;
const char *ep;
const char **newe;
sscanf(env,"%256[^=]",name);
len = strlen(name);
for( ei = 0; ep = environ[ei]; ei++ )
if( strncmp(ep,name,len) == 0 ){
environ[ei] = (char*)env;
return 0;
}
newe = (const char**)malloc(sizeof(char*)*(ei+2));
for( ei = 0; environ[ei]; ei++ )
newe[ei] = (const char*)environ[ei];
newe[ei] = env;
newe[ei+1] = 0;
if( environ == my_environ )
free(environ);
environ = my_environ = (char**)newe;
return 0;
}
|
the_stack_data/48574918.c | /* a test for bug in type sharing and type modification in cond-expr */
typedef union tree_node *tree;
union tree_node {
int *chain;
};
struct basic_block_def {
tree stmt_list;
};
typedef struct basic_block_def *basic_block;
static tree first;
static void create_bb (void *h, void *e, basic_block bb) { bb->stmt_list = h ? h : first; }
static int f (tree first) { return first->chain == 0; }
int main (void) { return 0; }
|
the_stack_data/107954107.c | # include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(int argc, char **argv)
{
pid_t the_pid = clone();
if (!the_pid)
printf("parent\n");
else
printf("child\n");
return 0;
}
|
the_stack_data/104843.c | #include <stdio.h>
int main(){
int c;
double nc;
for (nc = 0; (c=getchar()) != EOF; ++nc){
;
}
printf("Number of chars: %.0f\n", nc);
}
|
the_stack_data/65438.c | /****************************************************************************
* tools/nxstyle.c
*
* Copyright (C) 2015, 2018-2020 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <strings.h>
#include <ctype.h>
#include <limits.h>
#include <unistd.h>
#include <libgen.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define NXSTYLE_VERSION "0.01"
#define LINE_SIZE 512
#define RANGE_NUMBER 4096
#define DEFAULT_WIDTH 78
#define FIRST_SECTION INCLUDED_FILES
#define LAST_SECTION PUBLIC_FUNCTION_PROTOTYPES
#define FATAL(m, l, o) message(FATAL, (m), (l), (o))
#define FATALFL(m, s) message(FATAL, (m), -1, -1)
#define WARN(m, l, o) message(WARN, (m), (l), (o))
#define ERROR(m, l, o) message(ERROR, (m), (l), (o))
#define ERRORFL(m, s) message(ERROR, (m), -1, -1)
#define INFO(m, l, o) message(INFO, (m), (l), (o))
#define INFOFL(m, s) message(INFO, (m), -1, -1)
/****************************************************************************
* Private types
****************************************************************************/
enum class_e
{
INFO,
WARN,
ERROR,
FATAL
};
const char *class_text[] =
{
"info",
"warning",
"error",
"fatal"
};
enum file_e
{
UNKNOWN = 0x00,
C_HEADER = 0x01,
C_SOURCE = 0x02
};
enum section_s
{
NO_SECTION = 0,
INCLUDED_FILES,
PRE_PROCESSOR_DEFINITIONS,
PUBLIC_TYPES,
PRIVATE_TYPES,
PRIVATE_DATA,
PUBLIC_DATA,
PRIVATE_FUNCTIONS,
PRIVATE_FUNCTION_PROTOTYPES,
INLINE_FUNCTIONS,
PUBLIC_FUNCTIONS,
PUBLIC_FUNCTION_PROTOTYPES
};
struct file_section_s
{
const char *name; /* File section name */
uint8_t ftype; /* File type where section found */
};
/****************************************************************************
* Private data
****************************************************************************/
static char *g_file_name = "";
static enum file_e g_file_type = UNKNOWN;
static enum section_s g_section = NO_SECTION;
static int g_maxline = DEFAULT_WIDTH;
static int g_status = 0;
static int g_verbose = 2;
static int g_rangenumber = 0;
static int g_rangestart[RANGE_NUMBER];
static int g_rangecount[RANGE_NUMBER];
static const struct file_section_s g_section_info[] =
{
{
" *\n", /* Index: NO_SECTION */
C_SOURCE | C_HEADER
},
{
" * Included Files\n", /* Index: INCLUDED_FILES */
C_SOURCE | C_HEADER
},
{
" * Pre-processor Definitions\n", /* Index: PRE_PROCESSOR_DEFINITIONS */
C_SOURCE | C_HEADER
},
{
" * Public Types\n", /* Index: PUBLIC_TYPES */
C_HEADER
},
{
" * Private Types\n", /* Index: PRIVATE_TYPES */
C_SOURCE
},
{
" * Private Data\n", /* Index: PRIVATE_DATA */
C_SOURCE
},
{
" * Public Data\n", /* Index: PUBLIC_DATA */
C_SOURCE | C_HEADER
},
{
" * Private Functions\n", /* Index: PRIVATE_FUNCTIONS */
C_SOURCE
},
{
" * Private Function Prototypes\n", /* Index: PRIVATE_FUNCTION_PROTOTYPES */
C_SOURCE
},
{
" * Inline Functions\n", /* Index: INLINE_FUNCTIONS */
C_SOURCE | C_HEADER
},
{
" * Public Functions\n", /* Index: PUBLIC_FUNCTIONS */
C_SOURCE
},
{
" * Public Function Prototypes\n", /* Index: PUBLIC_FUNCTION_PROTOTYPES */
C_HEADER
}
};
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Name: show_usage
*
* Description:
*
****************************************************************************/
static void show_usage(char *progname, int exitcode, char *what)
{
fprintf(stderr, "%s version %s\n\n", basename(progname), NXSTYLE_VERSION);
if (what)
{
fprintf(stderr, "%s\n", what);
}
fprintf(stderr, "Usage: %s [-m <excess>] [-v <level>] [-r <start,count>] <filename>\n",
basename(progname));
fprintf(stderr, " %s -h this help\n", basename(progname));
fprintf(stderr, " %s -v <level> where level is\n", basename(progname));
fprintf(stderr, " 0 - no output\n");
fprintf(stderr, " 1 - PASS/FAIL\n");
fprintf(stderr, " 2 - output each line (default)\n");
exit(exitcode);
}
/****************************************************************************
* Name: skip
*
* Description:
*
****************************************************************************/
static int skip(int lineno)
{
int i;
for (i = 0; i < g_rangenumber; i++)
{
if (lineno >= g_rangestart[i] && lineno < g_rangestart[i] + g_rangecount[i])
{
return 0;
}
}
return g_rangenumber != 0;
}
/****************************************************************************
* Name: message
*
* Description:
*
****************************************************************************/
static int message(enum class_e class, const char *text, int lineno, int ndx)
{
FILE *out = stdout;
if (skip(lineno))
{
return g_status;
}
if (class > INFO)
{
out = stderr;
g_status |= 1;
}
if (g_verbose == 2)
{
if (lineno == -1 && ndx == -1)
{
fprintf(out, "%s: %s: %s\n", g_file_name, class_text[class], text);
}
else
{
fprintf(out, "%s:%d:%d: %s: %s\n", g_file_name, lineno, ndx,
class_text[class], text);
}
}
return g_status;
}
/****************************************************************************
* Name: check_spaces_left
*
* Description:
*
****************************************************************************/
static void check_spaces_left(char *line, int lineno, int ndx)
{
/* Unary operator should generally be preceded by a space but make also
* follow a left parenthesis at the beginning of a parenthetical list or
* expression or follow a right parentheses in the case of a cast.
*/
if (ndx-- > 0 && line[ndx] != ' ' && line[ndx] != '(' && line[ndx] != ')')
{
ERROR("Operator/assignment must be preceded with whitespace",
lineno, ndx);
}
}
/****************************************************************************
* Name: check_spaces_leftright
*
* Description:
*
****************************************************************************/
static void check_spaces_leftright(char *line, int lineno, int ndx1, int ndx2)
{
if (ndx1 > 0 && line[ndx1 - 1] != ' ')
{
ERROR("Operator/assignment must be preceded with whitespace",
lineno, ndx1);
}
if (line[ndx2 + 1] != '\0' && line[ndx2 + 1] != '\n' && line[ndx2 + 1] != ' ')
{
ERROR("Operator/assignment must be followed with whitespace",
lineno, ndx2);
}
}
/****************************************************************************
* Name: block_comment_width
*
* Description:
* Get the width of a block comment
*
****************************************************************************/
static int block_comment_width(char *line)
{
int b;
int e;
int n;
/* Skip over any leading whitespace on the line */
for (b = 0; isspace(line[b]); b++)
{
}
/* Skip over any trailing whitespace at the end of the line */
for (e = strlen(line) - 1; isspace(line[e]); e--)
{
}
/* Number of characters on the line */
n = e - b + 1;
if (n < 4)
{
return 0;
}
/* The first line of a block comment starts with "[slash]***" and ends with
* "***"
*/
if (strncmp(&line[b], "/***", 4) == 0 &&
strncmp(&line[e - 2], "***", 3) == 0)
{
/* Return the the length of the line up to the final '*' */
return e + 1;
}
/* The last line of a block begins with whitespace then "***" and ends
* with "***[slash]"
*/
if (strncmp(&line[b], "***", 3) == 0 &&
strncmp(&line[e - 3], "***/", 4) == 0)
{
/* Return the the length of the line up to the final '*' */
return e;
}
/* But there is also a special single line comment that begins with "[slash]* "
* and ends with "***[slash]"
*/
if (strncmp(&line[b], "/*", 2) == 0 &&
strncmp(&line[e - 3], "***/", 4) == 0)
{
/* Return the the length of the line up to the final '*' */
return e;
}
/* Return zero if the line is not the first or last line of a block
* comment.
*/
return 0;
}
/****************************************************************************
* Name: get_line_width
*
* Description:
* Get the maximum line width by examining the width of the block comments.
*
****************************************************************************/
static int get_line_width(FILE *instream)
{
char line[LINE_SIZE]; /* The current line being examined */
int max = 0;
int min = INT_MAX;
int len;
while (fgets(line, LINE_SIZE, instream))
{
len = block_comment_width(line);
if (len > 0)
{
if (len > max)
{
max = len;
}
if (len < min)
{
min = len;
}
}
}
if (max < min)
{
ERRORFL("No block comments found", g_file_name);
return DEFAULT_WIDTH;
}
else if (max != min)
{
ERRORFL("Block comments have different lengths", g_file_name);
return DEFAULT_WIDTH;
}
return min;
}
/****************************************************************************
* Name: check_section_header
*
* Description:
* Check if the current line holds a section header
*
****************************************************************************/
static bool check_section_header(const char *line, int lineno)
{
int i;
/* Search g_section_info[] to find a matching section header line */
for (i = FIRST_SECTION; i <= LAST_SECTION; i++)
{
if (strcmp(line, g_section_info[i].name) == 0)
{
g_section = (enum section_s)i;
/* Verify that this section is appropriate for this file type */
if ((g_file_type & g_section_info[i].ftype) == 0)
{
ERROR("Invalid section for this file type", lineno, 3);
}
return true;
}
}
return false;
}
/****************************************************************************
* Public Functions
****************************************************************************/
int main(int argc, char **argv, char **envp)
{
FILE *instream; /* File input stream */
char line[LINE_SIZE]; /* The current line being examined */
char buffer[100]; /* Localy format error strings */
char *lptr; /* Temporary pointer into line[] */
char *ext; /* Temporary file extension */
bool btabs; /* True: TAB characters found on the line */
bool bcrs; /* True: Carriage return found on the line */
bool bfunctions; /* True: In private or public functions */
bool bstatm; /* True: This line is beginning of a statement */
bool bfor; /* True: This line is beginning of a 'for' statement */
bool bswitch; /* True: Within a switch statement */
bool bstring; /* True: Within a string */
bool bquote; /* True: Backslash quoted character next */
bool bblank; /* Used to verify block comment terminator */
bool ppline; /* True: The next line the continuation of a pre-processor command */
bool bexternc; /* True: Within 'extern "C"' */
bool brhcomment; /* True: Comment to the right of code */
bool prevbrhcmt; /* True: previous line had comment to the right of code */
int lineno; /* Current line number */
int indent; /* Indentation level */
int ncomment; /* Comment nesting level on this line */
int prevncomment; /* Comment nesting level on the previous line */
int bnest; /* Brace nesting level on this line */
int prevbnest; /* Brace nesting level on the previous line */
int dnest; /* Data declaration nesting level on this line */
int prevdnest; /* Data declaration nesting level on the previous line */
int pnest; /* Parenthesis nesting level on this line */
int comment_lineno; /* Line on which the last comment was closed */
int blank_lineno; /* Line number of the last blank line */
int noblank_lineno; /* A blank line is not needed after this line */
int lbrace_lineno; /* Line number of last left brace */
int rbrace_lineno; /* Last line containing a right brace */
int externc_lineno; /* Last line where 'extern "C"' declared */
int linelen; /* Length of the line */
int excess;
int n;
int i;
int c;
excess = 0;
while ((c = getopt(argc, argv, ":hv:gm:r:")) != -1)
{
switch (c)
{
case 'm':
excess = atoi(optarg);
if (excess < 1)
{
show_usage(argv[0], 1, "Bad value for <excess>.");
excess = 0;
}
break;
case 'v':
g_verbose = atoi(optarg);
if (g_verbose < 0 || g_verbose > 2)
{
show_usage(argv[0], 1, "Bad value for <level>.");
}
break;
case 'r':
g_rangestart[g_rangenumber] = atoi(strtok(optarg, ","));
g_rangecount[g_rangenumber++] = atoi(strtok(NULL, ","));
break;
case 'h':
show_usage(argv[0], 0, NULL);
break;
case ':':
show_usage(argv[0], 1, "Missing argument.");
break;
case '?':
show_usage(argv[0], 1, "Unrecognized option.");
break;
default:
show_usage(argv[0], 0, NULL);
break;
}
}
if (optind < argc - 1 || argv[optind] == NULL)
{
show_usage(argv[0], 1, "No file name given.");
}
g_file_name = argv[optind];
instream = fopen(g_file_name, "r");
if (!instream)
{
FATALFL("Failed to open", g_file_name);
return 1;
}
/* Determine the line width */
g_maxline = get_line_width(instream) + excess;
rewind(instream);
/* Are we parsing a header file? */
ext = strrchr(g_file_name, '.');
if (ext == 0)
{
INFOFL("No file extension", g_file_name);
}
else if (strcmp(ext, ".h") == 0)
{
g_file_type = C_HEADER;
}
else if (strcmp(ext, ".c") == 0)
{
g_file_type = C_SOURCE;
}
if (g_file_type == UNKNOWN)
{
INFOFL("Unknown file extension", g_file_name);
return 0;
}
btabs = false; /* True: TAB characters found on the line */
bcrs = false; /* True: Carriage return found on the line */
bfunctions = false; /* True: In private or public functions */
bswitch = false; /* True: Within a switch statement */
bstring = false; /* True: Within a string */
ppline = false; /* True: Continuation of a pre-processor line */
bexternc = false; /* True: Within 'extern "C"' */
brhcomment = false; /* True: Comment to the right of code */
prevbrhcmt = false; /* True: Previous line had comment to the right of code */
lineno = 0; /* Current line number */
ncomment = 0; /* Comment nesting level on this line */
bnest = 0; /* Brace nesting level on this line */
dnest = 0; /* Data declaration nesting level on this line */
pnest = 0; /* Parenthesis nesting level on this line */
comment_lineno = -1; /* Line on which the last comment was closed */
blank_lineno = -1; /* Line number of the last blank line */
noblank_lineno = -1; /* A blank line is not needed after this line */
lbrace_lineno = -1; /* Line number of last left brace */
rbrace_lineno = -1; /* Last line containing a right brace */
externc_lineno = -1; /* Last line where 'extern "C"' declared */
/* Process each line in the input stream */
while (fgets(line, LINE_SIZE, instream))
{
lineno++;
indent = 0;
prevbnest = bnest; /* Brace nesting level on the previous line */
prevdnest = dnest; /* Data declaration nesting level on the previous line */
prevncomment = ncomment; /* Comment nesting level on the previous line */
bstatm = false; /* True: This line is beginning of a statement */
bfor = false; /* REVISIT: Implies for() is all on one line */
/* If we are not in a comment, then this certainly is not a right-hand comment. */
prevbrhcmt = brhcomment;
if (ncomment <= 0)
{
brhcomment = false;
}
/* Check for a blank line */
for (n = 0; line[n] != '\n' && isspace((int)line[n]); n++)
{
}
if (line[n] == '\n')
{
if (n > 0)
{
ERROR("Blank line contains whitespace", lineno, 1);
}
if (lineno == 1)
{
ERROR("File begins with a blank line", 1, 1);
}
else if (lineno == blank_lineno + 1)
{
ERROR("Too many blank lines", lineno, 1);
}
else if (lineno == lbrace_lineno + 1)
{
ERROR("Blank line follows left brace", lineno, 1);
}
blank_lineno = lineno;
continue;
}
else /* This line is non-blank */
{
/* Check for a missing blank line after a comment */
if (lineno == comment_lineno + 1)
{
/* No blank line should be present if the current line contains
* a right brace, a pre-processor line, the start of another
* comment.
*
* REVISIT: Generates a false alarm if the current line is also
* a comment. Generally it is acceptable for one comment to
* follow another with no space separation.
*
* REVISIT: prevbrhcmt is tested to case the preceding line
* contained comments to the right of the code. In such cases,
* the comments are normally aligned and do not follow normal
* indentation rules. However, this code will generate a false
* alarm if the comments are aligned to the right BUT the
* preceding line has no comment.
*/
if (line[n] != '}' /* && line[n] != '#' */ && !prevbrhcmt)
{
ERROR("Missing blank line after comment", comment_lineno,
1);
}
}
/* Files must begin with a comment (the file header).
* REVISIT: Logically, this belongs in the STEP 2 operations
* below.
*/
if (lineno == 1 && (line[n] != '/' || line[n + 1] != '*'))
{
ERROR("Missing file header comment block", lineno, 1);
}
/* Check for a blank line following a right brace */
if (bfunctions && lineno == rbrace_lineno + 1)
{
/* Check if this line contains a right brace. A right brace
* must be followed by 'else', 'while', 'break', a blank line,
* another right brace, or a pre-processor directive like #endif
*/
if (strchr(line, '}') == NULL && line[n] != '#' &&
strncmp(&line[n], "else", 4) != 0 &&
strncmp(&line[n], "while", 5) != 0 &&
strncmp(&line[n], "break", 5) != 0)
{
ERROR("Right brace must be followed by a blank line",
rbrace_lineno, n + 1);
}
/* If the right brace is followed by a pre-processor command
* like #endif (but not #else or #elif), then set the right
* brace line number to the line number of the pre-processor
* command (it then must be followed by a blank line)
*/
if (line[n] == '#')
{
int ii;
for (ii = n + 1; line[ii] != '\0' && isspace(line[ii]); ii++)
{
}
if (strncmp(&line[ii], "else", 4) != 0 &&
strncmp(&line[ii], "elif", 4) != 0)
{
rbrace_lineno = lineno;
}
}
}
}
/* STEP 1: Find the indentation level and the start of real stuff on
* the line.
*/
for (n = 0; line[n] != '\n' && isspace((int)line[n]); n++)
{
switch (line[n])
{
case ' ':
{
indent++;
}
break;
case '\t':
{
if (!btabs)
{
ERROR("TABs found. First detected", lineno, n);
btabs = true;
}
indent = (indent + 4) & ~3;
}
break;
case '\r':
{
if (!bcrs)
{
ERROR("Carriage returns found. "
"First detected", lineno, n);
bcrs = true;
}
}
break;
default:
{
snprintf(buffer, sizeof(buffer),
"Unexpected white space character %02x found",
line[n]);
ERROR(buffer, lineno, n);
}
break;
}
}
/* STEP 2: Detect some certain start of line conditions */
/* Skip over pre-processor lines (or continuations of pre-processor
* lines as indicated by ppline)
*/
if (line[indent] == '#' || ppline)
{
int len;
int ii;
/* Suppress error for comment following conditional compilation */
noblank_lineno = lineno;
/* Check pre-processor commands if this is not a continuation
* line.
*/
if (!ppline)
{
/* Skip to the pre-processor command following the '#' */
for (ii = indent + 1;
line[ii] != '\0' && isspace(line[ii]);
ii++)
{
}
if (line[ii] != '\0')
{
/* Make sure that pre-processor definitions are all in
* the pre-processor definitions section.
*/
if (strncmp(&line[ii], "define", 6) == 0)
{
if (g_section != PRE_PROCESSOR_DEFINITIONS)
{
/* A complication is the header files always have
* the idempotence guard definitions before the
* "Pre-processor Definitions section".
*/
if (g_section == NO_SECTION &&
g_file_type != C_HEADER)
{
/* Only a warning because there is some usage
* of define outside the Pre-processor
* Definitions section which is justifiable.
* Should be manually checked.
*/
WARN("#define outside of 'Pre-processor "
"Definitions' section",
lineno, ii);
}
}
}
/* Make sure that files are included only in the Included
* Files section.
*/
else if (strncmp(&line[ii], "include", 7) == 0)
{
if (g_section != INCLUDED_FILES)
{
/* Only a warning because there is some usage of
* include outside the Included Files section
* which may be is justifiable. Should be
* manually checked.
*/
WARN("#include outside of 'Included Files' "
"section",
lineno, ii);
}
}
}
}
/* Check if the next line will be a continuation of the pre-
* processor command.
*/
len = strlen(&line[indent]) + indent - 1;
if (line[len] == '\n')
{
len--;
}
ppline = (line[len] == '\\');
continue;
}
/* Check for a single line comment */
linelen = strlen(line);
if (linelen >= 5) /* Minimum is slash, star, star, slash, newline */
{
lptr = strstr(line, "*/");
if (line[indent] == '/' && line[indent + 1] == '*' &&
lptr - line == linelen - 3)
{
/* If preceding comments were to the right of code, then we can
* assume that there is a columnar alignment of columns that do
* no follow the usual alignment. So the brhcomment flag
* should propagate.
*/
brhcomment = prevbrhcmt;
/* Check if there should be a blank line before the comment */
if (lineno > 1 &&
comment_lineno != lineno - 1 &&
blank_lineno != lineno - 1 &&
noblank_lineno != lineno - 1 &&
!brhcomment)
{
/* TODO: This generates a false alarm if preceded by a label. */
ERROR("Missing blank line before comment found", lineno, 1);
}
/* 'comment_lineno 'holds the line number of the last closing
* comment. It is used only to verify that the comment is
* followed by a blank line.
*/
comment_lineno = lineno;
}
}
/* Check for the comment block indicating the beginning of a new file
* section.
*/
if (check_section_header(line, lineno))
{
if (g_section == PRIVATE_FUNCTIONS || g_section == PUBLIC_FUNCTIONS)
{
bfunctions = true; /* Latched */
}
}
/* Check for some kind of declaration.
* REVISIT: The following logic fails for any non-standard types.
* REVISIT: Terminator after keyword might not be a space. Might be
* a newline, for example. struct and unions are often unnamed, for
* example.
*/
else if (strncmp(&line[indent], "auto ", 5) == 0 ||
strncmp(&line[indent], "bool ", 5) == 0 ||
strncmp(&line[indent], "char ", 5) == 0 ||
strncmp(&line[indent], "CODE ", 5) == 0 ||
strncmp(&line[indent], "const ", 6) == 0 ||
strncmp(&line[indent], "double ", 7) == 0 ||
strncmp(&line[indent], "struct ", 7) == 0 ||
strncmp(&line[indent], "struct\n", 7) == 0 || /* May be unnamed */
strncmp(&line[indent], "enum ", 5) == 0 ||
strncmp(&line[indent], "extern ", 7) == 0 ||
strncmp(&line[indent], "EXTERN ", 7) == 0 ||
strncmp(&line[indent], "FAR ", 4) == 0 ||
strncmp(&line[indent], "float ", 6) == 0 ||
strncmp(&line[indent], "int ", 4) == 0 ||
strncmp(&line[indent], "int16_t ", 8) == 0 ||
strncmp(&line[indent], "int32_t ", 8) == 0 ||
strncmp(&line[indent], "long ", 5) == 0 ||
strncmp(&line[indent], "off_t ", 6) == 0 ||
strncmp(&line[indent], "register ", 9) == 0 ||
strncmp(&line[indent], "short ", 6) == 0 ||
strncmp(&line[indent], "signed ", 7) == 0 ||
strncmp(&line[indent], "size_t ", 7) == 0 ||
strncmp(&line[indent], "ssize_t ", 8) == 0 ||
strncmp(&line[indent], "static ", 7) == 0 ||
strncmp(&line[indent], "time_t ", 7) == 0 ||
strncmp(&line[indent], "typedef ", 8) == 0 ||
strncmp(&line[indent], "uint8_t ", 8) == 0 ||
strncmp(&line[indent], "uint16_t ", 9) == 0 ||
strncmp(&line[indent], "uint32_t ", 9) == 0 ||
strncmp(&line[indent], "union ", 6) == 0 ||
strncmp(&line[indent], "union\n", 6) == 0 || /* May be unnamed */
strncmp(&line[indent], "unsigned ", 9) == 0 ||
strncmp(&line[indent], "void ", 5) == 0 ||
strncmp(&line[indent], "volatile ", 9) == 0)
{
/* Check if this is extern "C"; We don't typically indent following
* this.
*/
if (strncmp(&line[indent], "extern \"C\"", 10) == 0)
{
externc_lineno = lineno;
}
/* bfunctions: True: Processing private or public functions.
* bnest: Brace nesting level on this line
* dnest: Data declaration nesting level on this line
*/
/* REVISIT: Also picks up function return types */
/* REVISIT: Logic problem for nested data/function declarations */
if ((!bfunctions || bnest > 0) && dnest == 0)
{
dnest = 1;
}
/* Check for multiple definitions of variables on the line.
* Ignores declarations within parentheses which are probably
* formal parameters.
*/
if (pnest == 0)
{
int tmppnest;
/* Note, we have not yet parsed each character on the line so
* a comma have have been be preceded by '(' on the same line.
* We will have parse up to any comma to see if that is the
* case.
*/
for (i = indent, tmppnest = 0;
line[i] != '\n' && line[i] != '\0';
i++)
{
if (tmppnest == 0 && line[i] == ',')
{
ERROR("Multiple data definitions", lineno, i + 1);
break;
}
else if (line[i] == '(')
{
tmppnest++;
}
else if (line[i] == ')')
{
if (tmppnest < 1)
{
/* We should catch this later */
break;
}
tmppnest--;
}
else if (line[i] == ';')
{
/* Break out if the semicolon terminates the
* declaration is found. Avoids processing any
* righthand comments in most cases.
*/
break;
}
}
}
}
/* Check for a keyword indicating the beginning of a statement.
* REVISIT: This, obviously, will not detect statements that do not
* begin with a C keyword (such as assignment statements).
*/
else if (strncmp(&line[indent], "break ", 6) == 0 ||
strncmp(&line[indent], "case ", 5) == 0 ||
#if 0 /* Part of switch */
strncmp(&line[indent], "case ", 5) == 0 ||
#endif
strncmp(&line[indent], "continue ", 9) == 0 ||
#if 0 /* Part of switch */
strncmp(&line[indent], "default ", 8) == 0 ||
#endif
strncmp(&line[indent], "do ", 3) == 0 ||
strncmp(&line[indent], "else ", 5) == 0 ||
strncmp(&line[indent], "goto ", 5) == 0 ||
strncmp(&line[indent], "if ", 3) == 0 ||
strncmp(&line[indent], "return ", 7) == 0 ||
#if 0 /* Doesn't follow pattern */
strncmp(&line[indent], "switch ", 7) == 0 ||
#endif
strncmp(&line[indent], "while ", 6) == 0)
{
bstatm = true;
}
/* Spacing works a little differently for and switch statements */
else if (strncmp(&line[indent], "for ", 4) == 0)
{
bfor = true;
bstatm = true;
}
else if (strncmp(&line[indent], "switch ", 7) == 0)
{
bswitch = true;
}
/* Also check for C keywords with missing white space */
else if (strncmp(&line[indent], "do(", 3) == 0 ||
strncmp(&line[indent], "if(", 3) == 0 ||
strncmp(&line[indent], "while(", 6) == 0)
{
ERROR("Missing whitespace after keyword", lineno, n);
bstatm = true;
}
else if (strncmp(&line[indent], "for(", 4) == 0)
{
ERROR("Missing whitespace after keyword", lineno, n);
bfor = true;
bstatm = true;
}
else if (strncmp(&line[indent], "switch(", 7) == 0)
{
ERROR("Missing whitespace after keyword", lineno, n);
bswitch = true;
}
/* STEP 3: Parse each character on the line */
bquote = false; /* True: Backslash quoted character next */
bblank = true; /* Used to verify block comment terminator */
for (; line[n] != '\n' && line[n] != '\0'; n++)
{
/* Report any use of non-standard white space characters */
if (isspace(line[n]))
{
if (line[n] == '\t')
{
if (!btabs)
{
ERROR("TABs found. First detected", lineno, n);
btabs = true;
}
}
else if (line[n] == '\r')
{
if (!bcrs)
{
ERROR("Carriage returns found. "
"First detected", lineno, n);
bcrs = true;
}
}
else if (line[n] != ' ')
{
snprintf(buffer, sizeof(buffer),
"Unexpected white space character %02x found",
line[n]);
ERROR(buffer, lineno, n);
}
}
/* Skip over identifiers */
if (ncomment == 0 && !bstring && (line[n] == '_' || isalpha(line[n])))
{
bool have_upper = false;
bool have_lower = false;
int ident_index = n;
/* Parse over the identifier. Check if it contains mixed upper-
* and lower-case characters.
*/
do
{
have_upper |= isupper(line[n]);
/* The coding standard provides for some exceptions of lower
* case characters in pre-processor strings:
*
* IPv[4|6] as an IP version number
* ICMPv6 as an ICMP version number
* IGMPv2 as an IGMP version number
* [0-9]p[0-9] as a decimal point
* d[0-9] as a divisor
*/
if (!have_lower && islower(line[n]))
{
switch (line[n])
{
/* A sequence containing 'v' may occur at the
* beginning of the identifier.
*/
case 'v':
if (n > 1 &&
line[n - 2] == 'I' &&
line[n - 1] == 'P' &&
(line[n + 1] == '4' ||
line[n + 1] == '6'))
{
}
else if (n > 3 &&
line[n - 4] == 'I' &&
line[n - 3] == 'C' &&
line[n - 2] == 'M' &&
line[n - 1] == 'P' &&
line[n + 1] == '6')
{
}
else if (n > 3 &&
line[n - 4] == 'I' &&
line[n - 3] == 'G' &&
line[n - 2] == 'M' &&
line[n - 1] == 'P' &&
line[n + 1] == '2')
{
}
else
{
have_lower = true;
}
break;
/* Sequences containing 'p' or 'd' must have been
* preceded by upper case characters.
*/
case 'p':
if (!have_upper || n < 1 ||
!isdigit(line[n - 1]) ||
!isdigit(line[n + 1]))
{
have_lower = true;
}
break;
case 'd':
if (!have_upper || !isdigit(line[n + 1]))
{
have_lower = true;
}
break;
default:
have_lower = true;
break;
}
}
n++;
}
while (line[n] == '_' || isalnum(line[n]));
/* Check for mixed upper and lower case */
if (have_upper && have_lower)
{
/* Special case hex constants. These will look like
* identifiers starting with 'x' or 'X' but preceded
* with '0'
*/
if (ident_index < 1 ||
(line[ident_index] != 'x' && line[ident_index] != 'X') ||
line[ident_index - 1] != '0')
{
/* REVISIT: Although pre-processor definitions are
* supposed to be all upper-case, there are exceptions
* such as using 'p' for a decimal point or 'MHz'.
* Those will be reported here, but probably should be
* considered false alarms.
*/
ERROR("Mixed case identifier found", lineno, ident_index);
}
else if (have_upper)
{
ERROR("Upper case hex constant found", lineno, ident_index);
}
}
/* Check if the identifier is the last thing on the line */
if (line[n] == '\n' || line[n] == '\0')
{
break;
}
}
/* Handle comments */
if (line[n] == '/' && !bstring)
{
/* Check for start of a C comment */
if (line[n + 1] == '*')
{
if (line[n + 2] == '\n')
{
ERROR("C comment opening on separate line", lineno, n);
}
else if (!isspace((int)line[n + 2]) && line[n + 2] != '*')
{
ERROR("Missing space after opening C comment", lineno, n);
}
/* Increment the count of nested comments */
ncomment++;
/* If there is anything to the left of the left brace, then
* this must be a comment to the right of code.
* Also if preceding comments were to the right of code, then
* we can assume that there is a columnar alignment of columns
* that do no follow the usual alignment. So the brhcomment
* flag should propagate.
*/
brhcomment = ((n != indent) || prevbrhcmt);
n++;
continue;
}
/* Check for end of a C comment */
else if (n > 0 && line[n - 1] == '*')
{
if (n < 2)
{
ERROR("Closing C comment not indented", lineno, n);
}
else if (!isspace((int)line[n + 1]) && line[n - 2] != '*')
{
ERROR("Missing space before closing C comment", lineno,
n);
}
/* Check for block comments that are not on a separate line.
* This would be the case if we are we are within a comment
* that did not start on this line and the current line is
* not blank up to the point where the comment was closed.
*/
if (prevncomment > 0 && !bblank && !brhcomment)
{
ERROR("Block comment terminator must be on a "
"separate line", lineno, n);
}
#if 0
/* REVISIT: Generates false alarms when portions of an
* expression are commented out within the expression.
*/
if (line[n + 1] != '\n')
{
ERROR("Garbage on line after C comment", lineno, n);
}
#endif
/* Handle nested comments */
if (ncomment > 0)
{
/* Remember the line number of the line containing the
* closing of the outermost comment.
*/
if (--ncomment == 0)
{
/* 'comment_lineno 'holds the line number of the
* last closing comment. It is used only to
* verify that the comment is followed by a blank
* line.
*/
comment_lineno = lineno;
/* Note that brhcomment must persist to support a
* later test for comment alignment. We will fix
* that at the top of the loop when ncomment == 0.
*/
}
}
else
{
/* Note that brhcomment must persist to support a later
* test for comment alignment. We will will fix that
* at the top of the loop when ncomment == 0.
*/
ncomment = 0;
ERROR("Closing without opening comment", lineno, n);
}
n++;
continue;
}
/* Check for C++ style comments */
else if (line[n + 1] == '/')
{
/* Check for "http://" or "https://" */
if ((n < 5 || strncmp(&line[n - 5], "http://", 7) != 0) &&
(n < 6 || strncmp(&line[n - 6], "https://", 8) != 0))
{
ERROR("C++ style comment", lineno, n);
n++;
continue;
}
}
}
/* Check if the line is blank so far. This is only used to
* to verify the the closing of a block comment is on a separate
* line. So we also need to treat '*' as a 'blank'.
*/
if (!isblank(line[n]) && line[n] != '*')
{
bblank = false;
}
/* Check for a string... ignore if we are in the middle of a
* comment.
*/
if (ncomment == 0)
{
/* Backslash quoted character */
if (line[n] == '\\')
{
bquote = true;
n++;
}
/* Check for quoted characters: \" in string */
if (line[n] == '"' && !bquote)
{
bstring = !bstring;
}
bquote = false;
}
/* The reset of the line is only examined of we are not in a comment
* or a string.
*
* REVISIT: Should still check for whitespace at the end of the
* line.
*/
if (ncomment == 0 && !bstring)
{
switch (line[n])
{
/* Handle logic nested with curly braces */
case '{':
{
if (n > indent)
{
/* REVISIT: dnest is always > 0 here if bfunctions == false */
if (dnest == 0 || !bfunctions)
{
ERROR("Left bracket not on separate line", lineno,
n);
}
}
else if (line[n + 1] != '\n')
{
if (dnest == 0)
{
ERROR("Garbage follows left bracket", lineno, n);
}
}
bnest++;
if (dnest > 0)
{
dnest++;
}
/* Check if we are within 'extern "C"', we don't
* normally indent in that case because the 'extern "C"'
* is conditioned on __cplusplus.
*/
if (lineno == externc_lineno ||
lineno - 1 == externc_lineno)
{
bexternc = true;
}
/* Suppress error for comment following a left brace */
noblank_lineno = lineno;
lbrace_lineno = lineno;
}
break;
case '}':
{
/* Decrement the brace nesting level */
if (bnest < 1)
{
ERROR("Unmatched right brace", lineno, n);
}
else
{
bnest--;
if (bnest < 1)
{
bnest = 0;
bswitch = false;
}
}
/* Decrement the declaration nesting level */
if (dnest < 3)
{
dnest = 0;
bexternc = false;
}
else
{
dnest--;
}
/* The right brace should be on a separate line */
if (n > indent)
{
if (dnest == 0)
{
ERROR("Right bracket not on separate line",
lineno, n);
}
}
/* Check for garbage following the left brace */
if (line[n + 1] != '\n' &&
line[n + 1] != ',' &&
line[n + 1] != ';')
{
int sndx = n + 1;
bool whitespace = false;
/* Skip over spaces */
while (line[sndx] == ' ')
{
sndx++;
}
/* One possibility is that the right bracket is
* followed by an identifier then a semi-colon.
* Comma is possible to but would be a case of
* multiple declaration of multiple instances.
*/
if (line[sndx] == '_' || isalpha(line[sndx]))
{
int endx = sndx;
/* Skip to the end of the identifier. Checking
* for mixed case identifiers will be done
* elsewhere.
*/
while (line[endx] == '_' ||
isalnum(line[endx]))
{
endx++;
}
/* Skip over spaces */
while (line[endx] == ' ')
{
whitespace = true;
endx++;
}
/* Handle according to what comes after the
* identifier.
*/
if (strncmp(&line[sndx], "while", 5) == 0)
{
ERROR("'while' must be on a separate line",
lineno, sndx);
}
else if (line[endx] == ',')
{
ERROR("Multiple data definitions on line",
lineno, endx);
}
else if (line[endx] == ';')
{
if (whitespace)
{
ERROR("Space precedes semi-colon",
lineno, endx);
}
}
else
{
ERROR("Garbage follows right bracket",
lineno, n);
}
}
else
{
ERROR("Garbage follows right bracket", lineno, n);
}
}
/* The right brace should not be preceded with a a blank line */
if (lineno == blank_lineno + 1)
{
ERROR("Blank line precedes right brace at line",
lineno, 1);
}
rbrace_lineno = lineno;
}
break;
/* Handle logic with parentheses */
case '(':
{
/* Increase the parenthetical nesting level */
pnest++;
/* Check for inappropriate space around parentheses */
if (line[n + 1] == ' ') /* && !bfor */
{
ERROR("Space follows left parenthesis", lineno, n);
}
}
break;
case ')':
{
/* Decrease the parenthetical nesting level */
if (pnest < 1)
{
ERROR("Unmatched right parentheses", lineno, n);
pnest = 0;
}
else
{
pnest--;
}
/* Allow ')' as first thing on the line (n == indent)
* Allow "for (xx; xx; )" (bfor == true)
*/
if (n > 0 && n != indent && line[n - 1] == ' ' && !bfor)
{
ERROR("Space precedes right parenthesis", lineno, n);
}
}
break;
/* Check for inappropriate space around square brackets */
case '[':
{
if (line[n + 1] == ' ')
{
ERROR("Space follows left bracket", lineno, n);
}
}
break;
case ']':
{
if (n > 0 && line[n - 1] == ' ')
{
ERROR("Space precedes right bracket", lineno, n);
}
}
break;
/* Semi-colon may terminate a declaration */
case ';':
{
if (!isspace((int)line[n + 1]))
{
ERROR("Missing whitespace after semicolon", lineno, n);
}
/* Semicolon terminates a declaration/definition if there
* was no left curly brace (i.e., dnest is only 1).
*/
if (dnest == 1)
{
dnest = 0;
}
}
break;
/* Semi-colon may terminate a declaration */
case ',':
{
if (!isspace((int)line[n + 1]))
{
ERROR("Missing whitespace after comma", lineno, n);
}
}
break;
/* Skip over character constants */
case '\'':
{
int endndx = n + 2;
if (line[n + 1] != '\n' && line[n + 1] != '\0')
{
if (line[n + 1] == '\\')
{
for (;
line[endndx] != '\n' &&
line[endndx] != '\0' &&
line[endndx] != '\'';
endndx++);
}
n = endndx + 1;
}
}
break;
/* Check for space around various operators */
case '-':
/* ->, -- */
if (line[n + 1] == '>' || line[n + 1] == '-')
{
n++;
}
/* -= */
else if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else
{
/* '-' may function as a unary operator and snuggle
* on the left.
*/
check_spaces_left(line, lineno, n);
}
break;
case '+':
/* ++ */
if (line[n + 1] == '+')
{
n++;
}
/* += */
else if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else
{
/* '+' may function as a unary operator and snuggle
* on the left.
*/
check_spaces_left(line, lineno, n);
}
break;
case '&':
/* &<variable> OR &(<expression>) */
if (isalpha((int)line[n + 1]) || line[n + 1] == '_' ||
line[n + 1] == '(')
{
}
/* &&, &= */
else if (line[n + 1] == '=' || line[n + 1] == '&')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else
{
check_spaces_leftright(line, lineno, n, n);
}
break;
case '/':
/* C comment terminator*/
if (line[n - 1] == '*')
{
n++;
}
/* C++-style comment */
else if (line[n + 1] == '/')
{
/* Check for "http://" or "https://" */
if ((n < 5 || strncmp(&line[n - 5], "http://", 7) != 0) &&
(n < 6 || strncmp(&line[n - 6], "https://", 8) != 0))
{
ERROR("C++ style comment on at %d:%d\n",
lineno, n);
}
n++;
}
/* /= */
else if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
/* Division operator */
else
{
check_spaces_leftright(line, lineno, n, n);
}
break;
case '*':
/* *\/, ** */
if (line[n] == '*' &&
(line[n + 1] == '/' ||
line[n + 1] == '*'))
{
n++;
break;
}
/* *<variable>, *(<expression>) */
else if (isalpha((int)line[n + 1]) ||
line[n + 1] == '_' ||
line[n + 1] == '(')
{
break;
}
/* (<type> *) */
else if (line[n + 1] == ')')
{
/* REVISIT: This gives false alarms on syntax like *--ptr */
if (line[n - 1] != ' ')
{
ERROR("Operator/assignment must be preceded "
"with whitespace", lineno, n);
}
break;
}
/* *= */
else if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else
{
/* A single '*' may be an binary operator, but
* it could also be a unary operator when used to deference
* a pointer.
*/
check_spaces_left(line, lineno, n);
}
break;
case '%':
/* %= */
if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else
{
check_spaces_leftright(line, lineno, n, n);
}
break;
case '<':
/* <=, <<, <<= */
if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else if (line[n + 1] == '<')
{
if (line[n + 2] == '=')
{
check_spaces_leftright(line, lineno, n, n + 2);
n += 2;
}
else
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
}
else
{
check_spaces_leftright(line, lineno, n, n);
}
break;
case '>':
/* >=, >>, >>= */
if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else if (line[n + 1] == '>')
{
if (line[n + 2] == '=')
{
check_spaces_leftright(line, lineno, n, n + 2);
n += 2;
}
else
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
}
else
{
check_spaces_leftright(line, lineno, n, n);
}
break;
case '|':
/* |=, || */
if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else if (line[n + 1] == '|')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else
{
check_spaces_leftright(line, lineno, n, n);
}
break;
case '^':
/* ^= */
if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else
{
check_spaces_leftright(line, lineno, n, n);
}
break;
case '=':
/* == */
if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
else
{
check_spaces_leftright(line, lineno, n, n);
}
break;
case '~':
check_spaces_left(line, lineno, n);
break;
case '!':
/* != */
if (line[n + 1] == '=')
{
check_spaces_leftright(line, lineno, n, n + 1);
n++;
}
/* !! */
else if (line[n + 1] == '!')
{
check_spaces_left(line, lineno, n);
n++;
}
else
{
check_spaces_left(line, lineno, n);
}
break;
default:
break;
}
}
}
/* Loop terminates when NUL or newline character found */
if (line[n] == '\n')
{
/* Check for space at the end of the line. Except for carriage
* returns which we have already reported (one time) above.
*/
if (n > 1 && isspace((int)line[n - 1]) && line[n - 1] != '\r')
{
ERROR("Dangling whitespace at the end of line", lineno, n);
}
/* Check for long lines */
if (n > g_maxline)
{
if (g_file_type == C_SOURCE)
{
ERROR("Long line found", lineno, n);
}
else if (g_file_type == C_HEADER)
{
WARN("Long line found", lineno, n);
}
}
}
/* STEP 4: Check alignment */
/* Within a comment block, we need only check on the alignment of the
* comment.
*/
if ((ncomment > 0 || prevncomment > 0) && !bstring)
{
/* Nothing should begin in comment zero */
if (indent == 0 && line[0] != '/' && !bexternc)
{
/* NOTE: if this line contains a comment to the right of the
* code, then ncomment will be misleading because it was
* already incremented above.
*/
if (ncomment > 1 || !brhcomment)
{
ERROR("No indentation line", lineno, indent);
}
}
else if (indent == 1 && line[0] == ' ' && line[1] == '*')
{
/* Good indentation */
}
else if (indent > 0 && line[indent] == '\n')
{
ERROR("Whitespace on blank line", lineno, indent);
}
else if (indent > 0 && indent < 2)
{
if (bnest > 0)
{
ERROR("Insufficient indentation", lineno, indent);
}
else
{
ERROR("Expected indentation line", lineno, indent);
}
}
else if (indent > 0 && !bswitch)
{
if (line[indent] == '/')
{
/* Comments should like at offsets 2, 6, 10, ...
* This rule is not followed, however, if the comments are
* aligned to the right of the code.
*/
if ((indent & 3) != 2 && !brhcomment)
{
ERROR("Bad comment alignment", lineno, indent);
}
/* REVISIT: This screws up in cases where there is C code,
* followed by a comment that continues on the next line.
*/
else if (line[indent + 1] != '*')
{
ERROR("Missing asterisk in comment", lineno, indent);
}
}
else if (line[indent] == '*')
{
/* REVISIT: Generates false alarms on comments at the end of
* the line if there is nothing preceding (such as the aligned
* comments with a structure field definition). So disabled for
* comments before beginning of function definitions.
*
* Suppress this error if this is a comment to the right of code.
* Those may be unaligned.
*/
if ((indent & 3) != 3 && bfunctions && dnest == 0 &&
!brhcomment)
{
ERROR("Bad comment block alignment", lineno, indent);
}
if (line[indent + 1] != ' ' &&
line[indent + 1] != '*' &&
line[indent + 1] != '\n' &&
line[indent + 1] != '/')
{
ERROR("Invalid character after asterisk "
"in comment block", lineno, indent);
}
}
/* If this is not the line containing the comment start, then this
* line should begin with '*'
*/
else if (prevncomment > 0)
{
ERROR("Missing asterisk in comment block", lineno, indent);
}
}
}
/* Check for various alignment outside of the comment block */
else if ((ncomment == 0 && prevncomment == 0) && !bstring)
{
if (indent == 0 && strchr("\n#{}", line[0]) == NULL)
{
/* Ignore if we are at global scope */
if (prevbnest > 0)
{
bool blabel = false;
if (isalpha((int)line[indent]))
{
for (i = indent + 1; isalnum((int)line[i]) ||
line[i] == '_'; i++);
blabel = (line[i] == ':');
}
if (!blabel && !bexternc)
{
ERROR("No indentation line", lineno, indent);
}
}
}
else if (indent == 1 && line[0] == ' ' && line[1] == '*')
{
/* Good indentation */
}
else if (indent > 0 && line[indent] == '\n')
{
ERROR("Whitespace on blank line", lineno, indent);
}
else if (indent > 0 && indent < 2)
{
ERROR("Insufficient indentation line", lineno, indent);
}
else if (line[indent] == '{')
{
/* REVISIT: Possible false alarms in compound statements
* without a preceding conditional. That usage often violates
* the coding standard.
*/
if (!bfunctions && (indent & 1) != 0)
{
ERROR("Bad left brace alignment", lineno, indent);
}
else if ((indent & 3) != 0 && !bswitch && dnest == 0)
{
ERROR("Bad left brace alignment", lineno, indent);
}
}
else if (line[indent] == '}')
{
/* REVISIT: Possible false alarms in compound statements
* without a preceding conditional. That usage often violates
* the coding standard.
*/
if (!bfunctions && (indent & 1) != 0)
{
ERROR("right left brace alignment", lineno, indent);
}
else if ((indent & 3) != 0 && !bswitch && prevdnest == 0)
{
ERROR("Bad right brace alignment", lineno, indent);
}
}
else if (indent > 0)
{
/* REVISIT: Generates false alarms when a statement continues on
* the next line. The bstatm check limits to lines beginning
* with C keywords.
* REVISIT: The bstatm check will not detect statements that
* do not begin with a C keyword (such as assignment statements).
* REVISIT: Generates false alarms on comments at the end of
* the line if there is nothing preceding (such as the aligned
* comments with a structure field definition). So disabled for
* comments before beginning of function definitions.
*/
if ((bstatm || /* Begins with C keyword */
(line[indent] == '/' && bfunctions)) && /* Comment in functions */
!bswitch && /* Not in a switch */
dnest == 0) /* Not a data definition */
{
if ((indent & 3) != 2)
{
ERROR("Bad alignment", lineno, indent);
}
}
/* Crazy cases. There should be no small odd alignments
* outside of comment/string. Odd alignments are possible
* on continued lines, but not if they are small.
*/
else if (indent == 1 || indent == 3)
{
ERROR("Small odd alignment", lineno, indent);
}
}
}
}
if (!bfunctions && g_file_type == C_SOURCE)
{
ERROR("\"Private/Public Functions\" not found!"
" File was not be checked", lineno, 1);
}
if (ncomment > 0 || bstring)
{
ERROR("Comment or string found at end of file", lineno, 1);
}
fclose(instream);
if (g_verbose == 1)
{
fprintf(stderr, "%s: %s nxstyle check\n", g_file_name,
g_status == 0 ? "PASSED" : "FAILED");
}
return g_status;
}
|
the_stack_data/662682.c | #include <stdio.h>
#include <sys/time.h>
int main(int argc, char * argv[])
{
struct timeval tv;
int i, j;
for (i = 0; i < 1000; i++)
{
j = gettimeofday(&tv, NULL);
}
return j;
}
|
the_stack_data/107698.c |
char michaelsDumbHash(const char* str) {
char result = 0;
// assume a NULL-terminated string; loop through
// all characters in the string
while(*str != '\0') {
// add the numeric value of the character to
// the result mod 20
result = (result + *str) % 20;
// advance pointer
str++;
}
// return a number between 0 and 19
return result;
}
|
the_stack_data/76699460.c | #ifndef EM_PORT_API
#if defined(__EMSCRIPTEN__)
#include <emscripten.h>
#if defined(__cplusplus)
#define EM_PORT_API(rettype) extern "C" rettype EMSCRIPTEN_KEEPALIVE
#else
#define EM_PORT_API(rettype) rettype EMSCRIPTEN_KEEPALIVE
#endif
#else
#if defined(__cplusplus)
#define EM_PORT_API(rettype) extern "C" rettype
#else
#define EM_PORT_API(rettype) rettype
#endif
#endif
#endif
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#define SIZE_OF_RGBA 4;
enum borderType
{
left,
right,
top,
bottom
};
typedef struct connect
{
int merge;
int to;
struct connect *next;
} Connect;
typedef struct border
{
int klass;
int isMerged;
int left;
int right;
int top;
int bottom;
struct border *next;
} Border;
void swap(int **p1, int **p2)
{
int *tmp = *p1;
*p1 = *p2;
*p2 = tmp;
}
void addBorder(int klass, int width, int height, Border *pointer)
{
Border *pnew = (Border *)malloc(sizeof(Border));
Border *scan = pointer;
pnew->klass = klass;
pnew->isMerged = 0;
pnew->next = NULL;
pnew->left = width;
pnew->right = 0;
pnew->top = height;
pnew->bottom = 0;
while (scan->next != NULL)
{
scan = scan->next;
}
scan->next = pnew;
}
void addPoint(int klass, int val, enum borderType type, Border *pointer)
{
Border *scan = pointer;
do
{
scan = scan->next;
if (scan->klass == klass)
{
switch (type)
{
case left:
if (scan->left > val)
scan->left = val;
break;
case right:
if (scan->right < val)
scan->right = val;
break;
case top:
if (scan->top > val)
scan->top = val;
break;
case bottom:
if (scan->bottom < val)
scan->bottom = val;
break;
default:
break;
}
break;
}
} while (scan->next != NULL);
}
int removeDuplicateAndZero(int borderArray[], Connect *pnew)
{
for (int i = 0; i < 4; i++)
{
int currVal = borderArray[i];
if (currVal == 0)
{
continue;
}
for (int j = i + 1; j < 4; j++)
{
int targetVal = borderArray[j];
if (currVal != targetVal && targetVal != 0)
{
pnew->merge = currVal < targetVal ? currVal : targetVal; // small number
pnew->to = currVal > targetVal ? currVal : targetVal; // large number
pnew->next = NULL;
return 1;
}
}
}
return 0;
}
void addConnect(int borderArray[], Connect *pointer)
{
Connect *pnew = (Connect *)malloc(sizeof(Connect));
int state = removeDuplicateAndZero(borderArray, pnew);
if (state != 0)
{
Connect *scan = pointer;
while (scan->next != NULL)
{
scan = scan->next;
if (scan->merge == pnew->merge && scan->to == pnew->to) // remove duplicate connection
{
return;
}
}
scan->next = pnew;
}
}
void connectBorderBetween(int merge, int to, Border *pointer)
{
Border *scan = pointer;
Border *pMerge = NULL, *pTo = NULL;
while (scan->next != NULL)
{
scan = scan->next;
if (scan->klass == merge)
{
pMerge = scan;
}
else if (scan->klass == to)
{
pTo = scan;
}
}
if (pMerge->isMerged == 1)
{
return;
}
pMerge->isMerged = 1;
if (pMerge->left < pTo->left)
{
pTo->left = pMerge->left;
}
if (pMerge->right > pTo->right)
{
pTo->right = pMerge->right;
}
if (pMerge->top < pTo->top)
{
pTo->top = pMerge->top;
}
if (pMerge->bottom > pTo->bottom)
{
pTo->bottom = pMerge->bottom;
}
}
void connectBorders(Border *pBorder, Connect *pConnect)
{
Connect *scan = pConnect;
while (scan->next != NULL)
{
scan = scan->next;
connectBorderBetween(scan->merge, scan->to, pBorder);
}
}
Border *initBorderList()
{
Border *first = (Border *)malloc(sizeof(Border));
first->klass = 0;
first->next = NULL;
return first;
}
Connect *initConnectList()
{
Connect *first = (Connect *)malloc(sizeof(Connect));
first->next = NULL;
first->merge = 0;
first->to = 0;
return first;
}
int *initClasses(int size)
{
return (int *)calloc(size, sizeof(int));
}
uint8_t **pixelDataXOR(uint32_t pixelData1[], uint32_t pixelData2[], int width, int height)
{
uint8_t **xorArray = (uint8_t **)malloc((height + 1) * sizeof(uint8_t *));
for (int y = 0; y < height; y++)
{
xorArray[y] = (uint8_t *)calloc(width + 1, sizeof(uint8_t));
for (int x = 0; x < width; x++)
{
if (pixelData1[y * width + x] ^ pixelData2[y * width + x])
{
xorArray[y][x] = 1;
}
}
}
xorArray[height] = (uint8_t *)calloc(width + 1, sizeof(uint8_t));
return xorArray;
}
void printBorders(Border *pointer)
{
Border *scan = pointer;
while (scan->next != NULL)
{
scan = scan->next;
printf("klass: %d, isMerged: %d, left: %d, right: %d, top: %d, bottom: %d\n", scan->klass, scan->isMerged, scan->left, scan->right, scan->top, scan->bottom);
}
}
EM_PORT_API(void)
imagediff(uint8_t pixelData1[], uint8_t pixelData2[], int width, int height)
{
uint8_t **xorArray = pixelDataXOR((uint32_t)pixelData1, (uint32_t)pixelData2, width, height);
int *prevClasses = initClasses(width + 2);
int *currClasses = initClasses(width + 2);
int amount = 0;
Connect *connects = initConnectList();
Border *borders = initBorderList();
for (int y = 0; y < height + 1; y++)
{
for (int x = 0; x < width + 1; x++)
{
int classX = x + 1;
int xorVal = xorArray[y][x];
int classOfLeft = currClasses[classX - 1];
int classOfTop = prevClasses[classX];
if (xorVal == 0)
{
if (classOfLeft != 0) // left point is 【right】 border
{
addPoint(currClasses[classX - 1], x - 1, right, borders);
int borderArray[4] = {currClasses[classX - 2], prevClasses[classX - 2], prevClasses[classX - 1], prevClasses[classX]};
addConnect(borderArray, connects);
}
if (classOfTop != 0) // top point is 【bottom】 border
{
addPoint(prevClasses[classX], y - 1, bottom, borders);
}
currClasses[classX] = 0;
}
else
{
int classOfSurround = classOfLeft != 0 ? classOfLeft : prevClasses[classX - 1] != 0 ? prevClasses[classX - 1] : classOfTop != 0 ? classOfTop : prevClasses[classX + 1];
int classOfCurr = classOfSurround == 0 ? ++amount : classOfSurround;
if (classOfLeft == 0) // current point is 【left】 border
{
if (classOfSurround == 0)
{
addBorder(classOfCurr, width, height, borders);
}
addPoint(classOfCurr, x, left, borders);
int borderArray[4] = {classOfLeft, prevClasses[classX - 1], classOfTop, prevClasses[classX + 1]};
addConnect(borderArray, connects);
}
if (classOfTop == 0) // current point is 【top】 border
{
addPoint(classOfCurr, y, top, borders);
if (classOfLeft != 0) // remove duplicate connect
{
int borderArray[4] = {classOfLeft, prevClasses[classX - 1], classOfTop, prevClasses[classX + 1]};
addConnect(borderArray, connects);
}
}
currClasses[classX] = classOfCurr;
}
}
swap(&prevClasses, &currClasses);
}
connectBorders(borders, connects);
printBorders(borders);
free(xorArray);
free(prevClasses);
free(currClasses);
free(borders);
free(connects);
}
void main()
{
const uint8_t template[] = {
0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0,
0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1,
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0,
1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0,
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
uint8_t arr3[102400 * 4];
uint8_t arr4[102400 * 4] = {0};
for (int a = 0; a < 102400 * 4; a++)
{
arr3[a] = template[a % 200];
arr3[a + 1] = template[a % 200 + 1];
arr3[a + 2] = template[a % 200 + 2];
arr3[a + 3] = template[a % 200 + 3];
}
uint8_t arr1[64] = {
1, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0};
uint8_t arr2[64] = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0};
time_t starttime = clock();
imagediff(arr1, arr2, 4, 4);
// imagediff(arr3, arr4, 320, 320);
time_t endtime = clock();
printf("time: %f", difftime(endtime, starttime));
system("pause");
}
// emcc color.c -O1 -s WASM=1 -s MODULARIZE=1 -s ASSERTIONS=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall', 'cwrap']" -o color.js |
the_stack_data/173578234.c | /*
* MIT License
*
* Copyright (c) 2021 Andrey Rys
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/*
* base64.c: libb64 compressed code. Public domain.
* See http://libb64.sourceforge.net/ for original code and infos.
*
* Modified and fixed by Lynx <[email protected]> 03Jun2016:
* - Single TU, minimal external dependencies
* - Stream operation, no newline insertions
* - Fixed code style to pure K&R
* - Fixed integer overflows and fixed size types
* - Fixed out of bounds access in base64_decode_block
* - Force specify output size for output buffer when decoding
* - Fixed signed/unsigned issue on ARM
* - Added generic memory converter wrappers which do not expose internals
* - All functions calculate number of processed characters and return them to caller
*/
#include <string.h>
#include <stdlib.h>
enum base64_decodestep {
estep_a, estep_b, estep_c, estep_d
};
struct base64_decodestate {
enum base64_decodestep step;
char plainchar;
size_t count;
};
enum base64_encodestep {
dstep_a, dstep_b, dstep_c
};
struct base64_encodestate {
enum base64_encodestep step;
char result;
size_t count;
};
int base64_decode_value(signed char value_in)
{
static const signed char decoding[] = {
62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -2, -1,
-1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51
};
static const char decoding_size = sizeof(decoding);
if (value_in < 43) return -1;
value_in -= 43;
if (value_in >= decoding_size) return -1;
return decoding[(int)value_in];
}
void base64_init_decodestate(struct base64_decodestate *state_in)
{
state_in->step = estep_a;
state_in->plainchar = 0;
state_in->count = 0;
}
#define CHECK_BOUNDS do { if (plainchar-plaintext_out >= plaintext_outl) goto _ret; } while (0)
size_t base64_decode_block(const char *code_in, size_t length_in, char *plaintext_out, size_t plaintext_outl, struct base64_decodestate *state_in)
{
const char *codechar = code_in;
char *plainchar = plaintext_out;
int fragment;
*plainchar = state_in->plainchar;
switch (state_in->step) {
while (1) {
case estep_a:
do {
if (codechar == code_in+length_in) {
state_in->step = estep_a;
state_in->plainchar = *plainchar;
state_in->count += (plainchar - plaintext_out);
return plainchar - plaintext_out;
}
fragment = base64_decode_value(*codechar++);
} while (fragment < 0);
*plainchar = (fragment & 0x3f) << 2;
case estep_b:
do {
if (codechar == code_in+length_in) {
state_in->step = estep_b;
state_in->plainchar = *plainchar;
state_in->count += (plainchar - plaintext_out);
return plainchar - plaintext_out;
}
fragment = base64_decode_value(*codechar++);
} while (fragment < 0);
*plainchar++ |= (fragment & 0x30) >> 4;
CHECK_BOUNDS;
*plainchar = (fragment & 0x0f) << 4;
case estep_c:
do {
if (codechar == code_in+length_in) {
state_in->step = estep_c;
state_in->plainchar = *plainchar;
state_in->count += (plainchar - plaintext_out);
return plainchar - plaintext_out;
}
fragment = base64_decode_value(*codechar++);
} while (fragment < 0);
*plainchar++ |= (fragment & 0x3c) >> 2;
CHECK_BOUNDS;
*plainchar = (fragment & 0x03) << 6;
case estep_d:
do {
if (codechar == code_in+length_in) {
state_in->step = estep_d;
state_in->plainchar = *plainchar;
state_in->count += (plainchar - plaintext_out);
return plainchar - plaintext_out;
}
fragment = base64_decode_value(*codechar++);
} while (fragment < 0);
*plainchar++ |= (fragment & 0x3f);
}
}
_ret: state_in->count += (plainchar - plaintext_out);
return plainchar - plaintext_out;
}
void base64_init_encodestate(struct base64_encodestate *state_in)
{
state_in->step = dstep_a;
state_in->result = 0;
state_in->count = 0;
}
char base64_encode_value(char value_in)
{
static const char *encoding = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
if (value_in > 63) return '=';
return encoding[(int)value_in];
}
size_t base64_encode_block(const char *plaintext_in, size_t length_in, char *code_out, struct base64_encodestate *state_in)
{
const char *plainchar = plaintext_in;
const char *const plaintextend = plaintext_in + length_in;
char *codechar = code_out;
char result;
char fragment;
result = state_in->result;
switch (state_in->step) {
while (1) {
case dstep_a:
if (plainchar == plaintextend) {
state_in->result = result;
state_in->step = dstep_a;
state_in->count += (codechar - code_out);
return codechar - code_out;
}
fragment = *plainchar++;
result = (fragment & 0xfc) >> 2;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x03) << 4;
case dstep_b:
if (plainchar == plaintextend) {
state_in->result = result;
state_in->step = dstep_b;
state_in->count += (codechar - code_out);
return codechar - code_out;
}
fragment = *plainchar++;
result |= (fragment & 0xf0) >> 4;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x0f) << 2;
case dstep_c:
if (plainchar == plaintextend) {
state_in->result = result;
state_in->step = dstep_c;
state_in->count += (codechar - code_out);
return codechar - code_out;
}
fragment = *plainchar++;
result |= (fragment & 0xc0) >> 6;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x3f) >> 0;
*codechar++ = base64_encode_value(result);
}
}
/* control should not reach here */
state_in->count += (codechar - code_out);
return codechar - code_out;
}
size_t base64_encode_blockend(char *code_out, struct base64_encodestate *state_in)
{
char *codechar = code_out + state_in->count;
switch (state_in->step) {
case dstep_b:
*codechar++ = base64_encode_value(state_in->result);
*codechar++ = '=';
*codechar++ = '=';
state_in->count += 3;
break;
case dstep_c:
*codechar++ = base64_encode_value(state_in->result);
*codechar++ = '=';
state_in->count += 2;
break;
case dstep_a:
break;
}
return codechar - code_out;
}
/* Process single block of memory */
size_t base64_decode(char *output, size_t outputl, const char *input, size_t inputl)
{
struct base64_decodestate dstate;
size_t r;
base64_init_decodestate(&dstate);
base64_decode_block(input, inputl, output, outputl, &dstate);
r = dstate.count;
memset(&dstate, 0, sizeof(struct base64_decodestate));
return r;
}
size_t base64_encode(char *output, const char *input, size_t inputl)
{
struct base64_encodestate estate;
size_t r;
base64_init_encodestate(&estate);
base64_encode_block(input, inputl, output, &estate);
base64_encode_blockend(output, &estate);
r = estate.count;
memset(&estate, 0, sizeof(struct base64_encodestate));
return r;
}
|
the_stack_data/149814.c | #include <stdio.h>
double power(double n, int p);
int main(void)
{
double x, xpow;
int exp;
//printf("Enter a number and the integer power");
//printf(" to withc the number will be raised.\n");
while ((scanf("%lf %d", &x, &exp))==2)
{
xpow = power(x, exp);
printf("%.3g to the power %d is %.5g\n", x, exp, xpow);
//printf("Please enter next pair of number or q to quit.\n");
}
//printf("Hope you enjoyed this power trip. --buy.\n");
return 0;
}
double power(double n, int p)
{
double pow = 1;
int i;
if (p == 0)
{
printf("Any number to the 0 power is 1\n");
return 1;
}
int num = (p > 0) ? p : -1*p;
for(i = 1; i <= num; i++)
{
pow*= n;
}
//printf("%lf %lf %d\n", pow, n, p);
if (n==0 && p!=0)
return 0;
else if (n>0 && p>0)
return pow;
else if (n>0 && p<0)
return 1/pow;
else if (n<0 && p>0 && p%2==0)
return -1*pow;
else if (n<0 && p>0 && p%2!=0)
return 1*pow;
else if (n<0 && p<0 && -1*p%2==0)
return -1*(1/pow);
else if (n<0 && p<0 && -1*p%2!=0)
return 1/pow;
else return pow;
} |
the_stack_data/82950311.c | #include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <complex.h>
#ifdef complex
#undef complex
#endif
#ifdef I
#undef I
#endif
#if defined(_WIN64)
typedef long long BLASLONG;
typedef unsigned long long BLASULONG;
#else
typedef long BLASLONG;
typedef unsigned long BLASULONG;
#endif
#ifdef LAPACK_ILP64
typedef BLASLONG blasint;
#if defined(_WIN64)
#define blasabs(x) llabs(x)
#else
#define blasabs(x) labs(x)
#endif
#else
typedef int blasint;
#define blasabs(x) abs(x)
#endif
typedef blasint integer;
typedef unsigned int uinteger;
typedef char *address;
typedef short int shortint;
typedef float real;
typedef double doublereal;
typedef struct { real r, i; } complex;
typedef struct { doublereal r, i; } doublecomplex;
#ifdef _MSC_VER
static inline _Fcomplex Cf(complex *z) {_Fcomplex zz={z->r , z->i}; return zz;}
static inline _Dcomplex Cd(doublecomplex *z) {_Dcomplex zz={z->r , z->i};return zz;}
static inline _Fcomplex * _pCf(complex *z) {return (_Fcomplex*)z;}
static inline _Dcomplex * _pCd(doublecomplex *z) {return (_Dcomplex*)z;}
#else
static inline _Complex float Cf(complex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex double Cd(doublecomplex *z) {return z->r + z->i*_Complex_I;}
static inline _Complex float * _pCf(complex *z) {return (_Complex float*)z;}
static inline _Complex double * _pCd(doublecomplex *z) {return (_Complex double*)z;}
#endif
#define pCf(z) (*_pCf(z))
#define pCd(z) (*_pCd(z))
typedef int logical;
typedef short int shortlogical;
typedef char logical1;
typedef char integer1;
#define TRUE_ (1)
#define FALSE_ (0)
/* Extern is for use with -E */
#ifndef Extern
#define Extern extern
#endif
/* I/O stuff */
typedef int flag;
typedef int ftnlen;
typedef int ftnint;
/*external read, write*/
typedef struct
{ flag cierr;
ftnint ciunit;
flag ciend;
char *cifmt;
ftnint cirec;
} cilist;
/*internal read, write*/
typedef struct
{ flag icierr;
char *iciunit;
flag iciend;
char *icifmt;
ftnint icirlen;
ftnint icirnum;
} icilist;
/*open*/
typedef struct
{ flag oerr;
ftnint ounit;
char *ofnm;
ftnlen ofnmlen;
char *osta;
char *oacc;
char *ofm;
ftnint orl;
char *oblnk;
} olist;
/*close*/
typedef struct
{ flag cerr;
ftnint cunit;
char *csta;
} cllist;
/*rewind, backspace, endfile*/
typedef struct
{ flag aerr;
ftnint aunit;
} alist;
/* inquire */
typedef struct
{ flag inerr;
ftnint inunit;
char *infile;
ftnlen infilen;
ftnint *inex; /*parameters in standard's order*/
ftnint *inopen;
ftnint *innum;
ftnint *innamed;
char *inname;
ftnlen innamlen;
char *inacc;
ftnlen inacclen;
char *inseq;
ftnlen inseqlen;
char *indir;
ftnlen indirlen;
char *infmt;
ftnlen infmtlen;
char *inform;
ftnint informlen;
char *inunf;
ftnlen inunflen;
ftnint *inrecl;
ftnint *innrec;
char *inblank;
ftnlen inblanklen;
} inlist;
#define VOID void
union Multitype { /* for multiple entry points */
integer1 g;
shortint h;
integer i;
/* longint j; */
real r;
doublereal d;
complex c;
doublecomplex z;
};
typedef union Multitype Multitype;
struct Vardesc { /* for Namelist */
char *name;
char *addr;
ftnlen *dims;
int type;
};
typedef struct Vardesc Vardesc;
struct Namelist {
char *name;
Vardesc **vars;
int nvars;
};
typedef struct Namelist Namelist;
#define abs(x) ((x) >= 0 ? (x) : -(x))
#define dabs(x) (fabs(x))
#define f2cmin(a,b) ((a) <= (b) ? (a) : (b))
#define f2cmax(a,b) ((a) >= (b) ? (a) : (b))
#define dmin(a,b) (f2cmin(a,b))
#define dmax(a,b) (f2cmax(a,b))
#define bit_test(a,b) ((a) >> (b) & 1)
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
#define abort_() { sig_die("Fortran abort routine called", 1); }
#define c_abs(z) (cabsf(Cf(z)))
#define c_cos(R,Z) { pCf(R)=ccos(Cf(Z)); }
#ifdef _MSC_VER
#define c_div(c, a, b) {Cf(c)._Val[0] = (Cf(a)._Val[0]/Cf(b)._Val[0]); Cf(c)._Val[1]=(Cf(a)._Val[1]/Cf(b)._Val[1]);}
#define z_div(c, a, b) {Cd(c)._Val[0] = (Cd(a)._Val[0]/Cd(b)._Val[0]); Cd(c)._Val[1]=(Cd(a)._Val[1]/Cd(b)._Val[1]);}
#else
#define c_div(c, a, b) {pCf(c) = Cf(a)/Cf(b);}
#define z_div(c, a, b) {pCd(c) = Cd(a)/Cd(b);}
#endif
#define c_exp(R, Z) {pCf(R) = cexpf(Cf(Z));}
#define c_log(R, Z) {pCf(R) = clogf(Cf(Z));}
#define c_sin(R, Z) {pCf(R) = csinf(Cf(Z));}
//#define c_sqrt(R, Z) {*(R) = csqrtf(Cf(Z));}
#define c_sqrt(R, Z) {pCf(R) = csqrtf(Cf(Z));}
#define d_abs(x) (fabs(*(x)))
#define d_acos(x) (acos(*(x)))
#define d_asin(x) (asin(*(x)))
#define d_atan(x) (atan(*(x)))
#define d_atn2(x, y) (atan2(*(x),*(y)))
#define d_cnjg(R, Z) { pCd(R) = conj(Cd(Z)); }
#define r_cnjg(R, Z) { pCf(R) = conjf(Cf(Z)); }
#define d_cos(x) (cos(*(x)))
#define d_cosh(x) (cosh(*(x)))
#define d_dim(__a, __b) ( *(__a) > *(__b) ? *(__a) - *(__b) : 0.0 )
#define d_exp(x) (exp(*(x)))
#define d_imag(z) (cimag(Cd(z)))
#define r_imag(z) (cimagf(Cf(z)))
#define d_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
#define r_int(__x) (*(__x)>0 ? floor(*(__x)) : -floor(- *(__x)))
#define d_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
#define r_lg10(x) ( 0.43429448190325182765 * log(*(x)) )
#define d_log(x) (log(*(x)))
#define d_mod(x, y) (fmod(*(x), *(y)))
#define u_nint(__x) ((__x)>=0 ? floor((__x) + .5) : -floor(.5 - (__x)))
#define d_nint(x) u_nint(*(x))
#define u_sign(__a,__b) ((__b) >= 0 ? ((__a) >= 0 ? (__a) : -(__a)) : -((__a) >= 0 ? (__a) : -(__a)))
#define d_sign(a,b) u_sign(*(a),*(b))
#define r_sign(a,b) u_sign(*(a),*(b))
#define d_sin(x) (sin(*(x)))
#define d_sinh(x) (sinh(*(x)))
#define d_sqrt(x) (sqrt(*(x)))
#define d_tan(x) (tan(*(x)))
#define d_tanh(x) (tanh(*(x)))
#define i_abs(x) abs(*(x))
#define i_dnnt(x) ((integer)u_nint(*(x)))
#define i_len(s, n) (n)
#define i_nint(x) ((integer)u_nint(*(x)))
#define i_sign(a,b) ((integer)u_sign((integer)*(a),(integer)*(b)))
#define pow_dd(ap, bp) ( pow(*(ap), *(bp)))
#define pow_si(B,E) spow_ui(*(B),*(E))
#define pow_ri(B,E) spow_ui(*(B),*(E))
#define pow_di(B,E) dpow_ui(*(B),*(E))
#define pow_zi(p, a, b) {pCd(p) = zpow_ui(Cd(a), *(b));}
#define pow_ci(p, a, b) {pCf(p) = cpow_ui(Cf(a), *(b));}
#define pow_zz(R,A,B) {pCd(R) = cpow(Cd(A),*(B));}
#define s_cat(lpp, rpp, rnp, np, llp) { ftnlen i, nc, ll; char *f__rp, *lp; ll = (llp); lp = (lpp); for(i=0; i < (int)*(np); ++i) { nc = ll; if((rnp)[i] < nc) nc = (rnp)[i]; ll -= nc; f__rp = (rpp)[i]; while(--nc >= 0) *lp++ = *(f__rp)++; } while(--ll >= 0) *lp++ = ' '; }
#define s_cmp(a,b,c,d) ((integer)strncmp((a),(b),f2cmin((c),(d))))
#define s_copy(A,B,C,D) { int __i,__m; for (__i=0, __m=f2cmin((C),(D)); __i<__m && (B)[__i] != 0; ++__i) (A)[__i] = (B)[__i]; }
#define sig_die(s, kill) { exit(1); }
#define s_stop(s, n) {exit(0);}
static char junk[] = "\n@(#)LIBF77 VERSION 19990503\n";
#define z_abs(z) (cabs(Cd(z)))
#define z_exp(R, Z) {pCd(R) = cexp(Cd(Z));}
#define z_sqrt(R, Z) {pCd(R) = csqrt(Cd(Z));}
#define myexit_() break;
#define mycycle() continue;
#define myceiling(w) {ceil(w)}
#define myhuge(w) {HUGE_VAL}
//#define mymaxloc_(w,s,e,n) {if (sizeof(*(w)) == sizeof(double)) dmaxloc_((w),*(s),*(e),n); else dmaxloc_((w),*(s),*(e),n);}
#define mymaxloc(w,s,e,n) {dmaxloc_(w,*(s),*(e),n)}
/* procedure parameter types for -A and -C++ */
#define F2C_proc_par_types 1
#ifdef __cplusplus
typedef logical (*L_fp)(...);
#else
typedef logical (*L_fp)();
#endif
static float spow_ui(float x, integer n) {
float pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static double dpow_ui(double x, integer n) {
double pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
#ifdef _MSC_VER
static _Fcomplex cpow_ui(complex x, integer n) {
complex pow={1.0,0.0}; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x.r = 1/x.r, x.i=1/x.i;
for(u = n; ; ) {
if(u & 01) pow.r *= x.r, pow.i *= x.i;
if(u >>= 1) x.r *= x.r, x.i *= x.i;
else break;
}
}
_Fcomplex p={pow.r, pow.i};
return p;
}
#else
static _Complex float cpow_ui(_Complex float x, integer n) {
_Complex float pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
#endif
#ifdef _MSC_VER
static _Dcomplex zpow_ui(_Dcomplex x, integer n) {
_Dcomplex pow={1.0,0.0}; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x._Val[0] = 1/x._Val[0], x._Val[1] =1/x._Val[1];
for(u = n; ; ) {
if(u & 01) pow._Val[0] *= x._Val[0], pow._Val[1] *= x._Val[1];
if(u >>= 1) x._Val[0] *= x._Val[0], x._Val[1] *= x._Val[1];
else break;
}
}
_Dcomplex p = {pow._Val[0], pow._Val[1]};
return p;
}
#else
static _Complex double zpow_ui(_Complex double x, integer n) {
_Complex double pow=1.0; unsigned long int u;
if(n != 0) {
if(n < 0) n = -n, x = 1/x;
for(u = n; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
#endif
static integer pow_ii(integer x, integer n) {
integer pow; unsigned long int u;
if (n <= 0) {
if (n == 0 || x == 1) pow = 1;
else if (x != -1) pow = x == 0 ? 1/x : 0;
else n = -n;
}
if ((n > 0) || !(n == 0 || x == 1 || x != -1)) {
u = n;
for(pow = 1; ; ) {
if(u & 01) pow *= x;
if(u >>= 1) x *= x;
else break;
}
}
return pow;
}
static integer dmaxloc_(double *w, integer s, integer e, integer *n)
{
double m; integer i, mi;
for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
if (w[i-1]>m) mi=i ,m=w[i-1];
return mi-s+1;
}
static integer smaxloc_(float *w, integer s, integer e, integer *n)
{
float m; integer i, mi;
for(m=w[s-1], mi=s, i=s+1; i<=e; i++)
if (w[i-1]>m) mi=i ,m=w[i-1];
return mi-s+1;
}
static inline void cdotc_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Fcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conjf(Cf(&x[i]))._Val[0] * Cf(&y[i])._Val[0];
zdotc._Val[1] += conjf(Cf(&x[i]))._Val[1] * Cf(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conjf(Cf(&x[i*incx]))._Val[0] * Cf(&y[i*incy])._Val[0];
zdotc._Val[1] += conjf(Cf(&x[i*incx]))._Val[1] * Cf(&y[i*incy])._Val[1];
}
}
pCf(z) = zdotc;
}
#else
_Complex float zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conjf(Cf(&x[i])) * Cf(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conjf(Cf(&x[i*incx])) * Cf(&y[i*incy]);
}
}
pCf(z) = zdotc;
}
#endif
static inline void zdotc_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Dcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conj(Cd(&x[i]))._Val[0] * Cd(&y[i])._Val[0];
zdotc._Val[1] += conj(Cd(&x[i]))._Val[1] * Cd(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += conj(Cd(&x[i*incx]))._Val[0] * Cd(&y[i*incy])._Val[0];
zdotc._Val[1] += conj(Cd(&x[i*incx]))._Val[1] * Cd(&y[i*incy])._Val[1];
}
}
pCd(z) = zdotc;
}
#else
_Complex double zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conj(Cd(&x[i])) * Cd(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += conj(Cd(&x[i*incx])) * Cd(&y[i*incy]);
}
}
pCd(z) = zdotc;
}
#endif
static inline void cdotu_(complex *z, integer *n_, complex *x, integer *incx_, complex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Fcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cf(&x[i])._Val[0] * Cf(&y[i])._Val[0];
zdotc._Val[1] += Cf(&x[i])._Val[1] * Cf(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cf(&x[i*incx])._Val[0] * Cf(&y[i*incy])._Val[0];
zdotc._Val[1] += Cf(&x[i*incx])._Val[1] * Cf(&y[i*incy])._Val[1];
}
}
pCf(z) = zdotc;
}
#else
_Complex float zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cf(&x[i]) * Cf(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cf(&x[i*incx]) * Cf(&y[i*incy]);
}
}
pCf(z) = zdotc;
}
#endif
static inline void zdotu_(doublecomplex *z, integer *n_, doublecomplex *x, integer *incx_, doublecomplex *y, integer *incy_) {
integer n = *n_, incx = *incx_, incy = *incy_, i;
#ifdef _MSC_VER
_Dcomplex zdotc = {0.0, 0.0};
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cd(&x[i])._Val[0] * Cd(&y[i])._Val[0];
zdotc._Val[1] += Cd(&x[i])._Val[1] * Cd(&y[i])._Val[1];
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc._Val[0] += Cd(&x[i*incx])._Val[0] * Cd(&y[i*incy])._Val[0];
zdotc._Val[1] += Cd(&x[i*incx])._Val[1] * Cd(&y[i*incy])._Val[1];
}
}
pCd(z) = zdotc;
}
#else
_Complex double zdotc = 0.0;
if (incx == 1 && incy == 1) {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cd(&x[i]) * Cd(&y[i]);
}
} else {
for (i=0;i<n;i++) { /* zdotc = zdotc + dconjg(x(i))* y(i) */
zdotc += Cd(&x[i*incx]) * Cd(&y[i*incy]);
}
}
pCd(z) = zdotc;
}
#endif
/* -- translated by f2c (version 20000121).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
/* > \brief \b ZLARNV returns a vector of random numbers from a uniform or normal distribution. */
/* =========== DOCUMENTATION =========== */
/* Online html documentation available at */
/* http://www.netlib.org/lapack/explore-html/ */
/* > \htmlonly */
/* > Download ZLARNV + dependencies */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarnv.
f"> */
/* > [TGZ]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarnv.
f"> */
/* > [ZIP]</a> */
/* > <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarnv.
f"> */
/* > [TXT]</a> */
/* > \endhtmlonly */
/* Definition: */
/* =========== */
/* SUBROUTINE ZLARNV( IDIST, ISEED, N, X ) */
/* INTEGER IDIST, N */
/* INTEGER ISEED( 4 ) */
/* COMPLEX*16 X( * ) */
/* > \par Purpose: */
/* ============= */
/* > */
/* > \verbatim */
/* > */
/* > ZLARNV returns a vector of n random complex numbers from a uniform or */
/* > normal distribution. */
/* > \endverbatim */
/* Arguments: */
/* ========== */
/* > \param[in] IDIST */
/* > \verbatim */
/* > IDIST is INTEGER */
/* > Specifies the distribution of the random numbers: */
/* > = 1: real and imaginary parts each uniform (0,1) */
/* > = 2: real and imaginary parts each uniform (-1,1) */
/* > = 3: real and imaginary parts each normal (0,1) */
/* > = 4: uniformly distributed on the disc abs(z) < 1 */
/* > = 5: uniformly distributed on the circle abs(z) = 1 */
/* > \endverbatim */
/* > */
/* > \param[in,out] ISEED */
/* > \verbatim */
/* > ISEED is INTEGER array, dimension (4) */
/* > On entry, the seed of the random number generator; the array */
/* > elements must be between 0 and 4095, and ISEED(4) must be */
/* > odd. */
/* > On exit, the seed is updated. */
/* > \endverbatim */
/* > */
/* > \param[in] N */
/* > \verbatim */
/* > N is INTEGER */
/* > The number of random numbers to be generated. */
/* > \endverbatim */
/* > */
/* > \param[out] X */
/* > \verbatim */
/* > X is COMPLEX*16 array, dimension (N) */
/* > The generated random numbers. */
/* > \endverbatim */
/* Authors: */
/* ======== */
/* > \author Univ. of Tennessee */
/* > \author Univ. of California Berkeley */
/* > \author Univ. of Colorado Denver */
/* > \author NAG Ltd. */
/* > \date December 2016 */
/* > \ingroup complex16OTHERauxiliary */
/* > \par Further Details: */
/* ===================== */
/* > */
/* > \verbatim */
/* > */
/* > This routine calls the auxiliary routine DLARUV to generate random */
/* > real numbers from a uniform (0,1) distribution, in batches of up to */
/* > 128 using vectorisable code. The Box-Muller method is used to */
/* > transform numbers from a uniform to a normal distribution. */
/* > \endverbatim */
/* > */
/* ===================================================================== */
/* Subroutine */ int zlarnv_(integer *idist, integer *iseed, integer *n,
doublecomplex *x)
{
/* System generated locals */
integer i__1, i__2, i__3, i__4, i__5;
doublereal d__1, d__2;
doublecomplex z__1, z__2, z__3;
/* Local variables */
integer i__;
doublereal u[128];
integer il, iv;
extern /* Subroutine */ int dlaruv_(integer *, integer *, doublereal *);
/* -- LAPACK auxiliary routine (version 3.7.0) -- */
/* -- LAPACK is a software package provided by Univ. of Tennessee, -- */
/* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */
/* December 2016 */
/* ===================================================================== */
/* Parameter adjustments */
--x;
--iseed;
/* Function Body */
i__1 = *n;
for (iv = 1; iv <= i__1; iv += 64) {
/* Computing MIN */
i__2 = 64, i__3 = *n - iv + 1;
il = f2cmin(i__2,i__3);
/* Call DLARUV to generate 2*IL real numbers from a uniform (0,1) */
/* distribution (2*IL <= LV) */
i__2 = il << 1;
dlaruv_(&iseed[1], &i__2, u);
if (*idist == 1) {
/* Copy generated numbers */
i__2 = il;
for (i__ = 1; i__ <= i__2; ++i__) {
i__3 = iv + i__ - 1;
i__4 = (i__ << 1) - 2;
i__5 = (i__ << 1) - 1;
z__1.r = u[i__4], z__1.i = u[i__5];
x[i__3].r = z__1.r, x[i__3].i = z__1.i;
/* L10: */
}
} else if (*idist == 2) {
/* Convert generated numbers to uniform (-1,1) distribution */
i__2 = il;
for (i__ = 1; i__ <= i__2; ++i__) {
i__3 = iv + i__ - 1;
d__1 = u[(i__ << 1) - 2] * 2. - 1.;
d__2 = u[(i__ << 1) - 1] * 2. - 1.;
z__1.r = d__1, z__1.i = d__2;
x[i__3].r = z__1.r, x[i__3].i = z__1.i;
/* L20: */
}
} else if (*idist == 3) {
/* Convert generated numbers to normal (0,1) distribution */
i__2 = il;
for (i__ = 1; i__ <= i__2; ++i__) {
i__3 = iv + i__ - 1;
d__1 = sqrt(log(u[(i__ << 1) - 2]) * -2.);
d__2 = u[(i__ << 1) - 1] * 6.2831853071795864769252867663;
z__3.r = 0., z__3.i = d__2;
z_exp(&z__2, &z__3);
z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
x[i__3].r = z__1.r, x[i__3].i = z__1.i;
/* L30: */
}
} else if (*idist == 4) {
/* Convert generated numbers to complex numbers uniformly */
/* distributed on the unit disk */
i__2 = il;
for (i__ = 1; i__ <= i__2; ++i__) {
i__3 = iv + i__ - 1;
d__1 = sqrt(u[(i__ << 1) - 2]);
d__2 = u[(i__ << 1) - 1] * 6.2831853071795864769252867663;
z__3.r = 0., z__3.i = d__2;
z_exp(&z__2, &z__3);
z__1.r = d__1 * z__2.r, z__1.i = d__1 * z__2.i;
x[i__3].r = z__1.r, x[i__3].i = z__1.i;
/* L40: */
}
} else if (*idist == 5) {
/* Convert generated numbers to complex numbers uniformly */
/* distributed on the unit circle */
i__2 = il;
for (i__ = 1; i__ <= i__2; ++i__) {
i__3 = iv + i__ - 1;
d__1 = u[(i__ << 1) - 1] * 6.2831853071795864769252867663;
z__2.r = 0., z__2.i = d__1;
z_exp(&z__1, &z__2);
x[i__3].r = z__1.r, x[i__3].i = z__1.i;
/* L50: */
}
}
/* L60: */
}
return 0;
/* End of ZLARNV */
} /* zlarnv_ */
|
the_stack_data/14199460.c | /* Hardened Benchmark Application in C.
*
* Multiplying a matrix with a vector.
* The result is a new vector.
* Ax = b. A: m*n, x: n*1, b: m*1
*
* Author: Ziang Wan, Jonathan Stein
*/
#include <stdio.h>
#include <stdlib.h>
// The main function: matrix vector multiplication.
// Ax = b. A: m*n, x: n*1, b: m*1
void matvec(float **A, float *x, float *b, const int m, const int n) {
for (int row = 0; row < m; row += 1) {
float sum = 0;
for (int col = 0; col < n; col += 1) {
//-- Hardened: prod = A[row][col] * x[col];
float prod, prodH;
do {
prod = A[row][col] * x[col];
prodH = A[row][col] * x[col];
} while (prod != prodH);
//-- Hardened: add = sum + prod
float add, addH;
do {
add = sum + prod;
addH = sum + prod;
} while (add != addH);
sum = add;
}
b[row] = sum;
}
}
int main(int argc, char* argv[]) {
const int m = 4;
const int n = 3;
// Ax = b. row-major memory allocation.
float **A = malloc(m * sizeof(float*));
for (int row = 0; row < m; row += 1) {
A[row] = malloc(n * sizeof(float));
}
float *x = malloc(n * 1 * sizeof(float));
float *b = malloc(m * 1 * sizeof(float));
// Init A and x.
float base = 0.5;
for (int row = 0; row < m; row += 1) {
for (int col = 0; col < n; col += 1) {
A[row][col] = base;
base += 0.5;
}
}
for (int col = 0; col < n; col += 1) {
x[col] = base;
base += 0.5;
}
// Main: matrix vector multiplication.
for (int run = 0; run < 5000; run += 1) {
matvec(A, x, b, m, n);
// Print result b.
printf("Result: ");
for (int i = 0; i < m - 1; i += 1) {
printf("%f ", b[i]);
}
printf("%f\n", b[m - 1]);
}
// Free
for (int row = 0; row < m; row += 1) {
free(A[row]);
}
free(A);
free(x);
free(b);
return 0;
}
|
the_stack_data/121256.c | /* $OpenBSD: wmemchr.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $NetBSD: wmemchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*-
* Copyright (c)1999 Citrus Project,
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* citrus Id: wmemchr.c,v 1.2 2000/12/20 14:08:31 itojun Exp
*/
#include <wchar.h>
wchar_t *
wmemchr(const wchar_t *s, wchar_t c, size_t n)
{
size_t i;
for (i = 0; i < n; i++) {
if (*s == c) {
/* LINTED const castaway */
return (wchar_t *)s;
}
s++;
}
return NULL;
}
|
the_stack_data/9513899.c | /*
* POK header
*
* The following file is a part of the POK project. Any modification should
* made according to the POK licence. You CANNOT use this file or a part of
* this file is this part of a file for your own project
*
* For more information on the POK licence, please see our LICENCE FILE
*
* Please follow the coding guidelines described in doc/CODING_GUIDELINES
*
* Copyright (c) 2007-2009 POK team
*
* Created by julien on Fri Jan 30 14:41:34 2009
*/
/* @(#)s_rint.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#ifdef POK_NEEDS_LIBMATH
/*
* rint(x)
* Return x rounded to integral value according to the prevailing
* rounding mode.
* Method:
* Using floating addition.
* Exception:
* Inexact flag raised if x not equal to rint(x).
*/
#include <libm.h>
#include "math_private.h"
static const double TWO52[2] = {
4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
-4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */
};
double rint(double x) {
int32_t i0, jj0, sx;
uint32_t i, i1;
double w, t;
EXTRACT_WORDS(i0, i1, x);
sx = (i0 >> 31) & 1;
jj0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
if (jj0 < 20) {
if (jj0 < 0) {
if (((i0 & 0x7fffffff) | i1) == 0) return x;
i1 |= (i0 & 0x0fffff);
i0 &= 0xfffe0000;
i0 |= ((i1 | -i1) >> 12) & 0x80000;
SET_HIGH_WORD(x, i0);
w = TWO52[sx] + x;
t = w - TWO52[sx];
GET_HIGH_WORD(i0, t);
SET_HIGH_WORD(t, (i0 & 0x7fffffff) | (sx << 31));
return t;
} else {
i = (0x000fffff) >> jj0;
if (((i0 & i) | i1) == 0) return x; /* x is integral */
i >>= 1;
if (((i0 & i) | i1) != 0) {
if (jj0 == 19)
i1 = 0x40000000;
else
i0 = (i0 & (~i)) | ((0x20000) >> jj0);
}
}
} else if (jj0 > 51) {
if (jj0 == 0x400)
return x + x; /* inf or NaN */
else
return x; /* x is integral */
} else {
i = ((uint32_t)(0xffffffff)) >> (jj0 - 20);
if ((i1 & i) == 0) return x; /* x is integral */
i >>= 1;
if ((i1 & i) != 0) i1 = (i1 & (~i)) | ((0x40000000) >> (jj0 - 20));
}
INSERT_WORDS(x, i0, i1);
w = TWO52[sx] + x;
return w - TWO52[sx];
}
#endif
|
the_stack_data/106510.c | #include<stdio.h>
long long c(int,int);
int main()
{
int n,m;
scanf("%d%d",&m,&n);
printf("%lld\n",c(m,n));
return 0;
}
long long c(int m,int n)
{
if(n==0||m==n)
return 1;
else if(n==1)
return m;
else return c(m-1,n-1)+c(m-1,n);
} |
the_stack_data/90766748.c | #include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
// This is going to be IPv4 only
int create_sock() {
int client_sock;
client_sock = socket(AF_INET, SOCK_STREAM, 0);
if(!client_sock) { return -1; }
return client_sock;
}
int client_connect(struct sockaddr server_addr, int client_sock) {
if(connect(client_sock, (struct sockaddr*)&server_addr, sizeof(server_addr)) != 0) {
return 0;
}
return 1;
} |
the_stack_data/82951099.c | #include <stdio.h>
int main() {
printf("hello, world");
return 0;
} |
the_stack_data/165765846.c | char* anames[] =
{
"XXX",
"AAA",
"AAD",
"AAM",
"AAS",
"ADCB",
"ADCL",
"ADCW",
"ADDB",
"ADDL",
"ADDW",
"ADJSP",
"ANDB",
"ANDL",
"ANDW",
"ARPL",
"BOUNDL",
"BOUNDW",
"BSFL",
"BSFW",
"BSRL",
"BSRW",
"BTL",
"BTW",
"BTCL",
"BTCW",
"BTRL",
"BTRW",
"BTSL",
"BTSW",
"BYTE",
"CALL",
"CLC",
"CLD",
"CLI",
"CLTS",
"CMC",
"CMPB",
"CMPL",
"CMPW",
"CMPSB",
"CMPSL",
"CMPSW",
"DAA",
"DAS",
"DATA",
"DECB",
"DECL",
"DECW",
"DIVB",
"DIVL",
"DIVW",
"ENTER",
"GLOBL",
"GOK",
"HISTORY",
"HLT",
"IDIVB",
"IDIVL",
"IDIVW",
"IMULB",
"IMULL",
"IMULW",
"INB",
"INL",
"INW",
"INCB",
"INCL",
"INCW",
"INSB",
"INSL",
"INSW",
"INT",
"INTO",
"IRETL",
"IRETW",
"JCC",
"JCS",
"JCXZ",
"JEQ",
"JGE",
"JGT",
"JHI",
"JLE",
"JLS",
"JLT",
"JMI",
"JMP",
"JNE",
"JOC",
"JOS",
"JPC",
"JPL",
"JPS",
"LAHF",
"LARL",
"LARW",
"LEAL",
"LEAW",
"LEAVEL",
"LEAVEW",
"LOCK",
"LODSB",
"LODSL",
"LODSW",
"LONG",
"LOOP",
"LOOPEQ",
"LOOPNE",
"LSLL",
"LSLW",
"MOVB",
"MOVL",
"MOVW",
"MOVBLSX",
"MOVBLZX",
"MOVBWSX",
"MOVBWZX",
"MOVWLSX",
"MOVWLZX",
"MOVSB",
"MOVSL",
"MOVSW",
"MULB",
"MULL",
"MULW",
"NAME",
"NEGB",
"NEGL",
"NEGW",
"NOP",
"NOTB",
"NOTL",
"NOTW",
"ORB",
"ORL",
"ORW",
"OUTB",
"OUTL",
"OUTW",
"OUTSB",
"OUTSL",
"OUTSW",
"POPAL",
"POPAW",
"POPFL",
"POPFW",
"POPL",
"POPW",
"PUSHAL",
"PUSHAW",
"PUSHFL",
"PUSHFW",
"PUSHL",
"PUSHW",
"RCLB",
"RCLL",
"RCLW",
"RCRB",
"RCRL",
"RCRW",
"REP",
"REPN",
"RET",
"ROLB",
"ROLL",
"ROLW",
"RORB",
"RORL",
"RORW",
"SAHF",
"SALB",
"SALL",
"SALW",
"SARB",
"SARL",
"SARW",
"SBBB",
"SBBL",
"SBBW",
"SCASB",
"SCASL",
"SCASW",
"SETCC",
"SETCS",
"SETEQ",
"SETGE",
"SETGT",
"SETHI",
"SETLE",
"SETLS",
"SETLT",
"SETMI",
"SETNE",
"SETOC",
"SETOS",
"SETPC",
"SETPL",
"SETPS",
"CDQ",
"CWD",
"SHLB",
"SHLL",
"SHLW",
"SHRB",
"SHRL",
"SHRW",
"STC",
"STD",
"STI",
"STOSB",
"STOSL",
"STOSW",
"SUBB",
"SUBL",
"SUBW",
"SYSCALL",
"TESTB",
"TESTL",
"TESTW",
"TEXT",
"VERR",
"VERW",
"WAIT",
"WORD",
"XCHGB",
"XCHGL",
"XCHGW",
"XLAT",
"XORB",
"XORL",
"XORW",
"FMOVB",
"FMOVBP",
"FMOVD",
"FMOVDP",
"FMOVF",
"FMOVFP",
"FMOVL",
"FMOVLP",
"FMOVV",
"FMOVVP",
"FMOVW",
"FMOVWP",
"FMOVX",
"FMOVXP",
"FCOMB",
"FCOMBP",
"FCOMD",
"FCOMDP",
"FCOMDPP",
"FCOMF",
"FCOMFP",
"FCOML",
"FCOMLP",
"FCOMW",
"FCOMWP",
"FUCOM",
"FUCOMP",
"FUCOMPP",
"FADDDP",
"FADDW",
"FADDL",
"FADDF",
"FADDD",
"FMULDP",
"FMULW",
"FMULL",
"FMULF",
"FMULD",
"FSUBDP",
"FSUBW",
"FSUBL",
"FSUBF",
"FSUBD",
"FSUBRDP",
"FSUBRW",
"FSUBRL",
"FSUBRF",
"FSUBRD",
"FDIVDP",
"FDIVW",
"FDIVL",
"FDIVF",
"FDIVD",
"FDIVRDP",
"FDIVRW",
"FDIVRL",
"FDIVRF",
"FDIVRD",
"FXCHD",
"FFREE",
"FLDCW",
"FLDENV",
"FRSTOR",
"FSAVE",
"FSTCW",
"FSTENV",
"FSTSW",
"F2XM1",
"FABS",
"FCHS",
"FCLEX",
"FCOS",
"FDECSTP",
"FINCSTP",
"FINIT",
"FLD1",
"FLDL2E",
"FLDL2T",
"FLDLG2",
"FLDLN2",
"FLDPI",
"FLDZ",
"FNOP",
"FPATAN",
"FPREM",
"FPREM1",
"FPTAN",
"FRNDINT",
"FSCALE",
"FSIN",
"FSINCOS",
"FSQRT",
"FTST",
"FXAM",
"FXTRACT",
"FYL2X",
"FYL2XP1",
"END",
"DYNT",
"INIT",
"SIGNAME",
"FCOMI",
"FCOMIP",
"FUCOMI",
"FUCOMIP",
"CMPXCHGB",
"CMPXCHGL",
"CMPXCHGW",
"CMOVLCC",
"CMOVLCS",
"CMOVLEQ",
"CMOVLGE",
"CMOVLGT",
"CMOVLHI",
"CMOVLLE",
"CMOVLLS",
"CMOVLLT",
"CMOVLMI",
"CMOVLNE",
"CMOVLOC",
"CMOVLOS",
"CMOVLPC",
"CMOVLPL",
"CMOVLPS",
"CMOVWCC",
"CMOVWCS",
"CMOVWEQ",
"CMOVWGE",
"CMOVWGT",
"CMOVWHI",
"CMOVWLE",
"CMOVWLS",
"CMOVWLT",
"CMOVWMI",
"CMOVWNE",
"CMOVWOC",
"CMOVWOS",
"CMOVWPC",
"CMOVWPL",
"CMOVWPS",
"FCMOVCC",
"FCMOVCS",
"FCMOVEQ",
"FCMOVHI",
"FCMOVLS",
"FCMOVNE",
"FCMOVNU",
"FCMOVUN",
"LAST",
};
|
the_stack_data/37523.c | /* $OpenBSD: bb.c,v 1.1.1.1 2005/09/30 14:51:52 kurt Exp $ */
/*
* Copyright (c) 2005 Kurt Miller <[email protected]>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
int bbSymbol;
|
the_stack_data/630799.c | /* SPDX-License-Identifier: BSD-2-Clause */
/* Copyright (c) 2019 KBEmbedded and DEF CON Hardware Hacking Village */
/* This is a very simple and somewhat fragile tool. Its basically a script but
* is hopefully more portable in this format.
*
* The point of this is to receive a block of text through stdin, and then
* output a PIC MPASM compatible packed data stream. This output is formatted
* specifically for PIC12F1572, but would be compatible with any 14-bit PIC.
*
* This series of PIC, being only 14-bit, is only able to put string const's
* in to the lowest 8-bits of each word. Using packing, 2x 7bit ASCII chars
* can be put in a single PIC flash word.
*
* The high byte is the first character, the low byte is the second.
*
* The input format is expected to be:
<name_of_array>
Text to put in.\r\n
Be sure to use escape sequences as needed.
* This will output:
PSECT strings,class=CODE,local,delta=2
GLOBAL _<name_of_array>
_<name_of_array>:
DW 0x... ; "XX"
...
* The final output can be redirected to a file that can be included in the PIC
* project. C can directly reference <name_of_array>. See the PIC sources for
* more information on the packing and unpacking process.
*
* Usage: ./string_packer < textfile.txt > strings.s
*/
#include <assert.h>
#include <ctype.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
/* Modifies the data in the passed pointer.
* When dealing with an escape sequence, the '\' is not encoded in to the
* binary, but the character after it needs to have the binary value of the
* whole escape sequence.
*/
void parse_escaped(char *buf)
{
switch (*buf) {
case 'n': /* Newline */
*buf = '\n';
break;
case 'r': /* Carriage return */
*buf = '\r';
break;
case '\\': /* Literal '\' */
*buf = '\\';
break;
case 't': /* Tab */
*buf = '\t';
break;
default:
/* Poor error handling to just assert, but, print the value of
* the data we tripped up at.
*/
printf("0x%X\n", *buf);
assert(0);
break;
}
}
void main(void)
{
char *buf;
char even_byte[3];
char odd_byte[3];
ssize_t sz = 128;
/* NOTE: read is used as return from getline. read does NOT include
* the NULL termination at the end of line in its count!
*/
ssize_t read;
uint32_t cnt;
uint8_t byte_num = 0;
uint16_t dw;
/* Allocate a sting buffer, 128 chars, arbitrary, most of this
* input will be under 80 chars as it is meant for serial termial
* Use of getline() will resize this if necessary.
* Use assert here, no sense in trying to recover from failure
* of malloc()
*/
buf = (unsigned char *)malloc(sz);
assert(buf);
/* Get initial information about the array we're going to get */
read = getline(&buf, &sz, stdin);
assert(read != -1); /* No stream input? */
/* Print some asm comments here */
printf("PSECT strings,class=CODE,local,delta=2\n");
printf("GLOBAL _%s\n", buf);
printf("_%s\n", buf);
read = getline(&buf, &sz, stdin);
while (read != -1) {
/* On each line, take every character that is printable, pack
* it in to a 14-bit word. Every two characters are packed
* together, with the relevant PIC mnemonic being printed out.
* Packing puts the first character in to the upper 7-bits of
* the word, and the following character in to the lower 7-bits
* of the PIC word. Repeat for all characters in the text. The
* mnemonic is followed by a comment of the two ASCII chars
* that word represents.
*
* Escape characters can be used in the source text, compatible
* escape characters are handled by packing in the binary
* representation of them.
*
* If the last character in a file is a high byte, a \0 is
* set as the low byte. If the the last character is a low byte
* then a word is added that contains two \0.
*/
for (cnt = 0; cnt <= read; cnt++) {
if (!isprint(buf[cnt])) continue;
if (byte_num == 0) {
/* If we encounter an escape sequence, we need
* to print the full sequence to the ASM
* comment. The escaped char is then analyzed
* and replaced with the correct binary value.
*/
if (buf[cnt] == '\\') {
cnt++;
even_byte[0] = '\\';
even_byte[1] = buf[cnt];
even_byte[2] = '\0';
/* This modifies buf[cnt]! */
parse_escaped(&buf[cnt]);
dw = (buf[cnt] << 7);
} else {
even_byte[0] = buf[cnt];
even_byte[1] = '\0';
dw = (buf[cnt] << 7);
}
byte_num++;
} else {
/* If we encounter an escape sequence, we need
* to print the full sequence to the ASM
* comment. The escaped char is then analyzed
* and replaced with the correct binary value.
*/
if (buf[cnt] == '\\') {
cnt++;
odd_byte[0] = '\\';
odd_byte[1] = buf[cnt];
odd_byte[2] = '\0';
/* This modifies buf[cnt]! */
parse_escaped(&buf[cnt]);
dw |= ((buf[cnt] & 0x7F));
} else {
dw |= ((buf[cnt] & 0x7F));
odd_byte[0] = buf[cnt];
odd_byte[1] = '\0';
}
byte_num = 0;
printf("DW\t0x%04X ; \"%s%s\"\n",
(dw & 0x3FFF), even_byte, odd_byte);
}
}
read = getline(&buf, &sz, stdin);
}
/* When we leave the above loop, read is -1, what is done next depends
* on the byte_num value. If byte_num is 0, then the next word needs
* to be both NULL. If byte_num is 1, then the high byte of dw was set
* up, we need to add a NULL to the last byte and print the whole dw
* string.
*/
if (byte_num == 0) printf("DW\t0x0000 ; \"\\0\\0\"\n\n\n");
else printf("DW\t0x%04X ; \"%s\\0\"\n\n\n", (dw & 0x3FFF), even_byte);
}
|
the_stack_data/10265.c | #include <stdio.h>
#include <string.h>
#define SIZE 12
main (){
char str[SIZE];
int i;
for(i=0; i<SIZE; i++)
printf("[%d] %c %d\n",i,str[i], str[i]);
printf("\n");
//str[15] = 'a';
scanf("%s", str);
while ( str != "quit"){
for(i=0; i<SIZE; i++)
printf("[%d] %c %d\n",i,str[i], str[i]);
printf("%s %d %d\n\n", str, sizeof str,strlen(str));
scanf("%s", str); // read again
}
return 0;
}
|
the_stack_data/242330102.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define LEN 10
void insert_sort(int array[]);
int main(int argc, char const *argv[])
{
srand(time(NULL));
int array[LEN];
for (int i = 0; i < LEN; i++) array[i] = rand() % 100;
for (int i = 0; i < LEN; i++) printf("%4d", array[i]);
insert_sort(array);
printf("\nAfter sort:\n");
for (int i = 0; i < LEN; i++) printf("%4d", array[i]);
return 0;
}
void insert_sort(int array[]){
int i, j, temp;
for (i = 1; i < LEN; i++)
{
temp = array[i];
j = i - 1;
for (; j >= 0 && array[j] > temp; j--)
{
array[j + 1] = array[j];
}
array[j + 1] = temp;
}
} |
the_stack_data/598370.c | #include <stdio.h>
//#define LENGTH 8
//#define MAXLINE 1000
//
//int getline(char line[], int maxline);
//
//main()
//{
// char line[MAXLINE];
// int len;
// int i, j;
// int start, pos;
//
// while ((len = getline(line, MAXLINE)) > 0) {
// i = j = 0;
// start = 0, pos = 0;
// while (pos + LENGTH < len) {
// start = pos;
// for (i = pos; i < pos + LENGTH && i < len; ++i) {
// if (line[i] == ' ' || line[i] == '\t') {
// pos = i;
// }
// }
// if (pos != start) {
// for (j = start; j < pos; ++j) {
// putchar(line[j]);
// }
// putchar('\n');
// }
// else {
// for (j = start; j < start + LENGTH; ++j) {
// putchar(line[j]);
// }
// pos = start = start + LENGTH;
// putchar('\n');
// }
// }
// for (j = start; j < start + LENGTH && j < len; ++j) {
// putchar(line[j]);
// }
// }
//}
//
//int getline(char line[], int maxline)
//{
// int c, i, j;
//
// j = 0;
// for (i = 0; (c = getchar()) != EOF && c != '\n'; ++i) {
// if (j < maxline - 2) {
// line[j] = c;
// ++j;
// }
// }
// if (c == '\n') {
// line[j] = '\n';
// ++i;
// ++j;
// }
// line[j] = '\0';
// return i;
//}
//#define MAXCOL 10 /* maximum column of input */
//#define TABINC 8 /* tab increment size */
//
//char line[MAXCOL]; /* input line */
//int exptab(int pos);
//int findblank(int pos);
//int newpos(int pos);
//void printl(int pos);
//
///* fold long input lines into two or more shorter lines */
//main()
//{
// int c, pos;
//
// pos = 0; /* position in the line */
// while ((c = getchar()) != EOF) {
// line[pos] = c; /* store current character */
// if (c == '\t') {
// pos = exptab(pos); /* expand tab charater */
// }
// else if (c == '\n') {
// printl(pos); /* print current input line */
// pos = 0;
// }
// else if (++pos >= MAXCOL) {
// pos = findblank(pos);
// printl(pos);
// pos = newpos(pos);
// }
// }
//}
//
///* exptab: expand tab into blanks */
//int exptab(int pos)
//{
// line[pos] = ' '; /* tab is at least one blank */
// for (++pos; pos < MAXCOL && pos % TABINC != 0; ++pos) {
// line[pos] = ' ';
// }
// if (pos < MAXCOL) { /* room left in current line */
// return pos;
// }
// else { /* current line is full */
// printl(pos);
// return 0; /* reset current position */
// }
//}
//
///* findblank: find blank's position */
//int findblank(int pos)
//{
// while (pos > 0 && line[pos] != ' ') {
// --pos;
// }
// if (pos == 0) { /* no blanks in the line? */
// return MAXCOL;
// }
// else { /* at least one blank */
// return pos + 1; /* position after the blank */
// }
//}
//
///* newpos: rearrange line with new position */
//int newpos(int pos)
//{
// int i, j;
//
// if (pos <= 0 || pos >= MAXCOL) {
// return 0; /* nothing to rearrange */
// }
// else {
// i = 0;
// for (j = pos; j < MAXCOL; ++j) {
// line[i] = line[j];
// ++i;
// }
// return i; /* new position */
// }
//}
//
///* print line until pos column */
//void printl(int pos)
//{
// int i;
//
// for (i = 0; i < pos; ++i) {
// putchar(line[i]);
// }
// if (pos > 0) { /* any chars printed? */
// putchar('\n');
// }
//}
#define MAXCOL 10
#define TABINC 8
char LINE[MAXCOL];
int expPos(int pos);
void printLine(int pos);
int findBlank(int pos);
int newPos(int pos);
int realpos = 0;
int nline = 0;
main()
{
int pos = 0;
int c;
while ((c = getchar()) != EOF) {
LINE[pos] = c;
++realpos;
if (c == '\t') {
pos = expPos(pos);
}
else if (c == '\n') {
printLine(pos);
pos = 0;
}
else if (++pos >= MAXCOL) {
pos = findBlank(pos);
printLine(pos);
pos = newPos(pos);
}
}
}
int expPos(int pos)
{
//int i;
//i = pos;
//LINE[i] = ' ';
//for (;(i < pos + pos % TABINC) && i < MAXCOL; ++i) {
// LINE[i] = ' ';
//}
//if (i == MAXCOL) {
// printLine(i);
// return 0;
//}
//else {
// pos = i;
// return pos;
//}
int i;
LINE[pos] = ' ';
for (++pos; pos < MAXCOL && (pos + nline * MAXCOL) % TABINC != 0; ++pos) {
LINE[pos] = ' ';
}
for (++realpos; realpos % TABINC != 0; ++realpos) {
;
}
if (pos < MAXCOL) {
return pos;
}
else {
printLine(pos);
for (i = 0; i < (realpos - nline * MAXCOL) % TABINC; ++i) {
LINE[i] = ' ';
}
return i;
}
}
void printLine(int pos)
{
int i;
for (i = 0; i < pos; ++i) {
putchar(LINE[i]);
}
if (pos > 0) {
putchar('\n');
}
++nline;
}
int findBlank(int pos)
{
while (pos > 0 && LINE[pos] != ' ') {
--pos;
}
if (pos == 0) {
return MAXCOL;
}
else {
return pos + 1;
}
}
int newPos(int pos)
{
int i, j;
if (pos <= 0 || pos >= MAXCOL) {
return 0;
}
for (i = 0, j = pos; j < MAXCOL; ++i, ++j) {
LINE[i] = LINE[j];
}
return i;
}
|
the_stack_data/140764721.c | //https://www.onlinegdb.com/online_c_compiler
#include <pthread.h> //Threads library
#include <stdio.h>
pthread_t thread_1; //References to 2nd & 3st thread
pthread_t thread_2;
int i = 0; //Global variable
void *inc() {
for (int j=0; j<1000000; j++) {
i += 1;
}
}
void *dec() {
for (int j=0; j<1000000; j++) {
i -= 1;
}
}
int main() {
pthread_create(&thread_1, NULL, inc, NULL); //2nd & 3st thread are executed, executing
pthread_create(&thread_2, NULL, dec, NULL); //functions inc/dec and passing no argument (NULL)
pthread_join(thread_1, NULL); //Wait for 2nd thread to finish
pthread_join(thread_2, NULL); //Wait for 3st thread to finish
printf("Final value: %d\n", i); //The final value is printed
return 0;
} |
the_stack_data/159516588.c | /* This test file is part of GDB, the GNU debugger.
Copyright 2007-2015 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
double a = 1.0/0.0;
double b = 0.0/0.0;
double c;
int
main()
{
c = a + b;
return 0;
}
|
the_stack_data/78827.c | int f(int n) {
int r;
r = 0;
if (n <= 1) {
r = n;
} else {
r = f(n - 1);
r = n + r;
if (n == 10) {
r = 10;
}
}
return r;
} |
the_stack_data/111265.c | // using the GM divisibilty, spot checking a few cases
// specialized signed, not taking absolute value of v
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
bool gm_divisible( const int32_t v, const int32_t dbar, const int32_t thresh1, const int32_t thresh2) {
return (uint32_t) (v*dbar-thresh1) <= (uint32_t) thresh2;
}
// Newton's method per Warren p 246 & 247
int32_t gm_multiplicative_inverse(int32_t d) {
int32_t retval;
int32_t abs_d_odd = (d ^ (d>>31)) - (d>>31); // -2**31 might be issue
int32_t x0 = abs_d_odd + 2*((abs_d_odd+1) & 4);
int32_t x1 = x0 * (2 - abs_d_odd *x0);
int32_t x2 = x1 * (2 - abs_d_odd *x1);
retval = x2 * (2 -abs_d_odd *x2);
return retval;
}
int main() {
int32_t divisors[] = {-1821, -455, 1821, +1, 455, 0x80000003, 0x80000001, -1};
for (int i=0; i < 8; ++i) {
int32_t div = divisors[i];
printf("checking %d\n", div);
int64_t longdiv = div;
int64_t abs_d1 = (longdiv ^ (longdiv>>63)) - (longdiv>>63);
uint32_t abs_d = (div ^ (div>>31)) - (div>>31);
int32_t M = gm_multiplicative_inverse(div);
int prime_thresh_low = -((0x80000000U / abs_d));
printf("ptl=%d\n",prime_thresh_low);
int prime_thresh2 = -prime_thresh_low + ((0x7fffffff / abs_d));
printf("thresholds are %d %d\n", prime_thresh_low, prime_thresh2);
for (long j= -(1L<<31); j < (1L<<31) ; ++j) {
int dividend = (int) j;
bool div1 = gm_divisible(dividend, M, prime_thresh_low, prime_thresh2);
bool div2;
if (div == -1 && dividend == 0x80000000)
div2 = true;
else
div2 = (dividend % div ==0);
//if (div2) printf("should divide\n");
if (div1 != div2) {
printf("whoops for dividend %d and divisor %d\n", dividend, div);
return 0;}
}
}
// all odd divisors for a small collection of dividends
for (int i=0; i < 8; ++i) {
int32_t dividend = divisors[i];
printf("checking dividend %d\n", dividend);
for (long j= -(1L<<31)+1; j < (1L<<31) ; j+=2 ) {
if (j==0) continue;
int32_t div = (int32_t) j;
int64_t longdiv = div;
int64_t abs_d = (longdiv ^ (longdiv>>63)) - (longdiv>>63);
int32_t M = gm_multiplicative_inverse(div);
int prime_thresh_low = -((0x80000000L / abs_d));
//printf("ptl=%d\n",prime_thresh_low);
int prime_thresh2 = -prime_thresh_low + ((0x7fffffff / abs_d));
//prime_thresh_low = 0x80000000U / (uint32_t) div;
//prime_thresh2 = prime_thresh_low + 0x7fffffff / div;
//printf("thresholds are %d %d\n", prime_thresh_low, prime_thresh2);
bool div1 = gm_divisible(dividend, M, prime_thresh_low, prime_thresh2);
bool div2;
if (div == -1 && dividend == 0x80000000)
div2 = true;
else
div2 = (dividend % div ==0);
if (div1 != div2) {
printf("whoops for dividend %d and divisor %d\n", dividend, div);
return 0;}
}
}
}
|
the_stack_data/136523.c | #include <stdio.h>
#include <stdlib.h>
// Internal assertion defintition
void __assert(const char *message, const char* function, const char* file,
int line) {
// Print debug line
printf("Assertion failed: %s, function %s, file %s, line %u.\n"
"Application will now terminate.\n", message, function, file, line);
//TODO: Convert exit() to abort()
// Terminate program
exit(-1);
} |
the_stack_data/57958.c |
//{{BLOCK(Level_1_Main_1_Back)
//======================================================================
//
// Level_1_Main_1_Back, 8x1216@2,
// + 152 tiles not compressed
// Total size: 2432 = 2432
//
// Exported by Cearn's GBA Image Transmogrifier, v0.8.6
// ( http://www.coranac.com/projects/#grit )
//
//======================================================================
const unsigned int Level_1_Main_1_BackTiles[608] __attribute__((aligned(4)))=
{
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x5FD40540,0x6ABDAFFD,
0x00000000,0x00000000,0x00000000,0x00010001,0x00000000,0x00000000,0xFD405400,0xABD0FFD0,
0x94004000,0xFD00E900,0xFF45FE40,0xBF56FE5A,0x005A0005,0x01BF01FF,0x07BF06FF,0x066A05AF,
0x40004000,0x40004000,0x40004000,0x40004000,0x6AAAAAA9,0xBAAAAAA9,0xBFFFFFE9,0xBFF5FFFE,
0xA9465405,0xAA97AA95,0xFFF7FE96,0xFFF5FFE6,0x00050000,0x001B001A,0x007B006F,0x0075006F,
0x00000000,0x00000000,0x00000000,0x00050000,0xAAA4AA94,0xAAA4AA94,0xFFF4FE94,0xFFF4FFE4,
0xAA66A95A,0xAA7BA95A,0xFF7BE96F,0xFF7BFE6F,0x466A05AA,0x97BA95AA,0xF7BF96FF,0xF7BFE6FF,
0x05A90054,0x1BAA1AAA,0x7BFF6FFE,0x7BFF6FFF,0xBFEA555E,0x555A6A9A,0x6A9ABFEA,0x7FDA555A,
0xBFEA555E,0x555A6A9A,0x6A9ABFEA,0x405A555A,0xBFEA555E,0x555A6A9A,0x6A9ABFEA,0x401A555A,
0x001A001E,0x001A001A,0x001A001A,0x001A001A,0xABF4FFE4,0xAAA4AA94,0xAAA4AA94,0xFFF4FE94,
0xBF66FE5A,0xAA66A95A,0xAA7BA95A,0xFF7BE96F,0xF66AE5AF,0xA66A95AA,0xA7BA95AA,0xF7BF96FF,
0x66AB5AFF,0x66AA5AAA,0x7BAA5AAA,0x7BFF6FFE,0x00000000,0x00000000,0x40004000,0x40004000,
0x5A940540,0xBAA9AAA9,0xBFFFFFE9,0xBFFFFFFE,0x00000000,0x00010001,0x00070006,0x00070006,
0xFFF45550,0xAA94AAAD,0xA9F4AA74,0x9FF4A7F4,0xFFFF5555,0xA9AAAAAA,0x9FDAA76A,0xFFFD7FF6,
0xFFFF5555,0x9AAAAAAA,0xFDAA76AA,0xFFD9FF6A,0xFFFF5555,0xAAAAAAAA,0xDAA96AAA,0xFD9FF6A7,
0xFFFF5555,0xAAA9AAAA,0xAA9FAAA7,0xD9FF6A7F,0xFFFF5555,0xAA9AAAAA,0xA9FDAA76,0x9FFFA7FF,
0x1FFF0555,0x1AAA6AAA,0x1DAA16AA,0x1FD91F6A,0x6ABFAFFE,0x6AAAAAA9,0xBAAAAAA9,0xBFFFFFE9,
0x00060005,0x00060005,0x00070005,0x00070006,0xFFB47FE4,0xFFB4FEE4,0xBFF4FFE4,0xBBF4EFF4,
0xFBBFFEFF,0xFBBFEEEF,0xFFFFFEFF,0xBFFBFFFE,0xBBFFEFF7,0xBBFFEEFF,0xFFFBEFFF,0xFFBBFFEE,
0xBFFFFF7F,0xBFFFEFFE,0xFFBFFFFF,0xFBBBFEEF,0xFFFBF7FE,0xFFFBFFEE,0xFBFFFFFE,0xBBBFEEFF,
0xFFBB7FEF,0xFFBBFEEE,0xBFFFFFEF,0xBBFFEFFF,0x1BFF1FF7,0x1BFF1EFF,0x1FFB1FFF,0x1FBB1FEE,
0xBFF4EFF4,0xFFB4FFE4,0xFFB4FEE4,0xBFF4FFE4,0xFFFFFFFE,0xFBBFFEFF,0xFBBFEEEF,0xFFFFFEFF,
0xFFFBFFEE,0xBBFFEFFF,0xBBFFEEFF,0xFFFBEFFF,0xFFBFFEEF,0xBFFFFFFF,0xBFFFEFFE,0xFFBFFFFF,
0xFBFFEEFF,0xFFFBFFFE,0xFFFBFFEE,0xFBFFFFFE,0xBFFFEFFF,0xFFBBFFEF,0xFFBBFEEE,0xBFFFFFEF,
0x1FFB1FEE,0x1BFF1FFF,0x1BFF1EFF,0x1FFB1FFF,0xBBF4EFF4,0xBFF4EFF4,0xFFB4FFE4,0xFFB4FEE4,
0xBFFBFFFE,0xFFFFFFFE,0xFBBFFEFF,0xFBBFEEEF,0xFFBBFFEE,0xFFFBFFEE,0xBBFFEFFF,0xBBFFEEFF,
0xBBBFEEFF,0xFBFFEEFF,0xFFFBFFFE,0xFFFBFFEE,0x1FBB1FEE,0x1FFB1FEE,0x1BFF1FFF,0x1BFF1EFF,
0x00000000,0x00000000,0x00050000,0x0016001A,0x50000000,0xA400A400,0xFD00A500,0xFD00F900,
0x016A0015,0x06EA06AA,0x1EFF1BFF,0x1EFF1BFF,0x9466405A,0xA97BA95A,0xFF7BE96F,0xFF7BFE6F,
0x005A0005,0x01BA01AA,0x07BF06FF,0x07BF06FF,0xFD00F900,0xA900A500,0xA900A500,0xFD00A500,
0x19AA16BF,0x19AA16AA,0x1EEA16AA,0x1EFF1BFF,0x066A05AF,0x066A05AA,0x07BA05AA,0x07BF06FF,
0x00000000,0x00000000,0xA5005000,0xAA40AA40,0x00000000,0x00000000,0x00160001,0x006E006A,
0xFFD05540,0xAA50AAB4,0xA7D0A9D0,0x7FD09FD0,0x07FF0155,0x06AA1AAA,0x076A05AA,0x07F607DA,
0xFFD0FA50,0xFFD0FF90,0xAFD0FF90,0xAA90AA50,0x01EF01BF,0x01EF01BF,0x019A016B,0x019A016A,
0xFED0FF90,0xFED0FB90,0xFFD0FF90,0xEFD0BFD0,0x06FF07FD,0xA6FF57BF,0xDBFEFBFF,0x57EEFBFB,
0x00000000,0xAAAA5454,0xDEDEFEFE,0x5454FEFE,0x00000000,0x01AA0054,0x01DE01FE,0x005401FE,
0x00000000,0x00000000,0xFD005400,0xA500AB40,0x00000000,0x00000000,0xFFFF5555,0x6AAAAAAA,
0x00000000,0x00000000,0xFFFF5555,0xAAAAAAAA,0x00000000,0x00000000,0xFFFF5555,0xAAA6AAAA,
0x00000000,0x00000000,0xFFFF5555,0xAA6AAAAA,0x00000000,0x00000000,0xFFFF5555,0xA6AAAAAA,
0xAA90AA50,0xFFD0FA50,0xFFFF5555,0x6AAAAAAA,0x01EE016A,0x01EF01BF,0xFFFF5555,0xAAAAAAAA,
0xFFD0BFD0,0xFED0FF90,0xFE7FFB95,0xFF6AFDAA,0xEFFFBBFF,0xFFEEFFFB,0x9FEE5FBB,0x9FFF9FFB,
0xFFFFBFFF,0xFEEFFFBF,0xAAAA5555,0xAAAAAAAA,0xFFFEFFFB,0xEEFFFBFF,0xAAAA5555,0xAAAAAAAA,
0xFFEFFFBB,0xEFFFBFFF,0xAAAA5555,0xAAAAAAAA,0xFEFFFBBF,0xFFFEFFFF,0xAAAA5555,0xAABEAAAA,
0xEFFFBBFF,0xFFEEFFFB,0xAAAA5555,0xAAAAAAAA,0x07FE07FB,0x06FF07FF,0x00AA0155,0x00AA00AA,
0x7D009D00,0xFD00FD00,0xED00F900,0xED00B900,0xF6AADAAA,0xFF67FDA9,0xEFFFBFDF,0xEFFFBBFF,
0x6AA7AAA9,0xF67FDA9F,0xFFFEFDFF,0xFFFEBFFB,0xAA7FAA9D,0x67FFA9FF,0xFFEEDFFB,0xFFEEFFBB,
0xA7F6A9DA,0x7FFF9FFD,0xFEEFFFBF,0xFEEFFBBB,0x7F6A9DAA,0xFFF6FFDA,0xEEFFFBFD,0xEEFFBBBF,
0xEFF6BFDA,0xFFFFBFFD,0xFEEFFFBF,0xFEEFFBBB,0x9EFF9BFF,0x9FFF9BFF,0x9FEE9FFB,0x9FEE9FBB,
0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xABFFAAAA,0xABFFABFF,0xFBFFFBFF,
0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAABAAAB,0xAAAAAABE,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,
0xAAAAAAAF,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0x00AA00AA,0x00AA00AA,0x00AA00AA,0x00AA00AA,
0xFD00F900,0xFD00FD00,0xFD00FD00,0xED00F900,0x9FFF9FFB,0x9EFF9BFF,0x9FFF9BFF,0x9FEE9FFB,
0xAAFAFAAA,0xAAAAAAFA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAB,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,
0xED00B900,0xFD00F900,0xFD00FD00,0xFD00FD00,0xEFFFBBFF,0xFFEFBFFF,0xFEEEFFBB,0xFFEFFFBB,
0xFFEEFFBB,0xEFFFFFFB,0xEEFFBBFF,0xEFFFBBFF,0xFEEFFBBB,0xFFFFFFBF,0xEFFEBFFF,0xFFFFBFFF,
0xEEFFBBBF,0xFFFEFBFF,0xFFEEFFFB,0xFFFEFFFB,0x9FEE9FBB,0xDFFF9FFB,0xDEFFDBFF,0x9FFFDBFF,
0xAAAAAAAA,0xAAAFAAAA,0xAAAFAAAF,0xAAAAAAAF,0xFFAAAAAA,0xFFAAFFAA,0xFFAAFFAA,0xAAAAAAAA,
0xAAABAAAA,0xAAABAAAB,0xABFBAAAB,0xABFAABFA,0xED00F900,0xED00B900,0xFD00F900,0xFD00FD00,
0x9FEE9FFB,0x9FEE9FBB,0x9FFF9FFB,0x9EFF9BFF,0xAAAAAAAA,0xAEAAAAAA,0xAAAAAAAA,0xAAAAAAAA,
0xFAAAFAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xAAAAAAAA,0xBEAAAAAA,0xAAAAAAAA,
0xFD00FD00,0xED00F900,0xED00B900,0xFD00F900,0xF7FF5BFF,0x97EEADFB,0xFFEE7FBB,0xEFFFFFFB,
0xFFFF5555,0xAAA9AAAA,0xAA9FAAA7,0xD9FE6A7F,0xFFFF5555,0xAA9AAAAA,0xA9FDAA76,0x9FEFA7FF,
0xFFFF5555,0xA9AAAAAA,0x9FDAA76A,0xFEFD7FF6,0xFFFF5555,0x9AAAAAAA,0xFDAA76AA,0xEFD9FF6A,
0x00010000,0x00010006,0x00010001,0x00010001,0xFD00FD00,0xFD00FD00,0xED00F900,0xED00B900,
0xEFFEBF7F,0xFFFFBFFF,0xFEEFFFBF,0xFEEFFBBB,0xFFEEF7FB,0xFFFEFFFB,0xEEFFFBFF,0xEEFFBBBF,
0xFEEE7FBB,0xFFEFFFBB,0xEFFFBFFF,0xEFFFBBFF,0xEEFFBBF7,0xEFFFBBFF,0xFFEEFFFB,0xFFEEFFBB,
0xFD00FC00,0xFD00CD00,0xED00C800,0xED008800,0xFEEEFCB8,0xFFEFCF8B,0xEFFF8CCC,0xEFFF88CC,
0xEEEFF8BC,0xFEFFCB8F,0xFFFECCCC,0xFFFE8CC8,0xEEFFB8FC,0xEFFF8BCF,0xFFEECCC8,0xFFEECC88,
0xEFFEBCFC,0xFFFF8FCF,0xFEEFCC8C,0xFEEFC888,0xFFEEFCF8,0xFFFECFCB,0xEEFFC8CC,0xEEFF888C,
0x00010000,0x00010001,0x00010000,0x00010000,0x3100C800,0x3100CC00,0x31000000,0x21000000,
0x33238CCC,0x3222CC88,0x33230000,0x23330000,0x3233CCCC,0x2223C88C,0x32330000,0x33320000,
0x2333CCC8,0x223388CC,0x23330000,0x33220000,0x3333CC8C,0x23328CCC,0x33330000,0x32230000,
0x3332C8CC,0x3322CCC8,0x33320000,0x22330000,0x00010000,0x00010000,0x00010000,0x00010000,
0x20000000,0x01000000,0x00000000,0x00000000,0x20300000,0x03030000,0x00000000,0x00000000,
0x30300000,0x02030000,0x00000000,0x00000000,0x30200000,0x03030000,0x00000000,0x00000000,
0x20300000,0x03020000,0x00000000,0x00000000,0x00000000,0x00010000,0x00000000,0x00000000,
};
//}}BLOCK(Level_1_Main_1_Back)
|
the_stack_data/103265201.c | //This file is a sub section of practice Question set 1
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
void display(int *p,int n);
void odd(int *p,int n);
void even(int *p,int n);
void max(int *p,int n);
void avg(int *p,int n);
void _1DArray()
{
char c,ch;
int n,i;
do
{ printf("\n\nEnter Length of Array : ");
scanf("%d",&n);
int a[n];
printf("Enter Numbers in Array : \n");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
printf("\n\nTo Display Element Set press 1\n");
printf("To Display Odd Positioned Elements press 2\n");
printf("To Display Even Numbers from Element Set press 3\n");
printf("To Display Maximum Number from Element Set press 4\n");
printf("To Display Sum and Average of Numbers of Element Set press 5\nYour Choice : ");
fflush(stdin);
c = getchar();
if(!isdigit(c))
printf("Enter a Digit.\n");
else
switch(c)
{
case '1' :
display(a,n);
break;
case '2' :
odd(a,n);
break;
case '3' :
even(a,n);
break;
case '4' :
max(a,n);
break;
case '5' :
avg(a,n);
break;
default:
printf("Choose between 1,2,3,4,5.\n");
}
fflush(stdin);
printf("\n\nDo you want to Run any 1D Array Program Again?\nIf YES press 'Y' or 'y'\nOtherwise press any key.\nYour Choice : ");
ch=getchar();
}while(ch=='Y'||ch=='y');
}//1D
void display(int *p,int n)
{
int i;
printf("\nEntered Elements are : ");
for(i=0;i<n;i++)
printf("%d ",*(p+i));
}//display
void odd(int *p,int n)
{
int i;
printf("\nOdd Positioned Elements are : ");
for(i=0;i<n;i++)
if(i%2!=0)
printf("%d ",*(p+i));
}//Odd Positioned
void even(int *p,int n)
{
int i;
printf("\nEven Elements are : ");
for(i=0;i<n;i++)
if(*(p+i)%2==0)
printf("%d ",*(p+i));
}//Even Elements
void max(int *p,int n)
{
int i,m=*(p+0);
for(i=1;i<n;i++)
if(*(p+i)>m)
m=*(p+i);
printf("\nGreatest Element from the Set : %d",m);
}//Max
void avg(int *p,int n)
{
int i,s=0;
float avg;
for(i=0;i<n;i++)
s+=*(p+i);
avg=s/(float)n;
printf("\nSum of Elements is : %d\nAverage of Elements is : %.2f",s,avg);
}//Sum and Average
|
the_stack_data/98574359.c | // RUN: %clang_cc1 -std=c99 %s -emit-llvm -o - | \
// RUN: opt -O3 -disable-output
// PR580
int X, Y;
int foo() {
int i;
for (i=0; i<100; i++ )
{
break;
i = ( X || Y ) ;
}
}
|
the_stack_data/103264189.c | #include <stdio.h>
/*
* Name : <Insert name>
* Program to experiment with hexadecimal
* and pointers
*/
int main()
{
int a = 0;
int b = 5;
int c = 1957;
/*
printf("%d\n", a);
printf("%d\n", b);
printf("%d\n", c);
*/
printf("%d: %x\n", a, a);
printf("%d: %x\n", b, b);
printf("%d: %x\n", c, c);
// printf("%lx\n", (int)&a);
int *pA = &a;
int *pB = &b;
int *p;
printf("a=%d, pA=%x, *pA=%d\n", a, (int)pA, *pA);
a = 47;
printf("a=%d, pA=%x, *pA=%d\n", a, (int)pA, *pA);
*pA = 99;
printf("a=%d, pA=%x, *pA=%d\n", a, (int)pA, *pA);
printf("Next experiment:\n");
p = pA;
*p = 22;
p = pB;
*p = 18;
p = &b;
*p = 108;
p = pA;
*p = 2;
printf("a=%d, pA=%x, *pA=%d\n", a, (int)pA, *pA);
printf("b=%d, pB=%x, *pB=%d\n", b, (int)pB, *pB);
printf("p=%x, *p=%d\n", (int)p, *p);
}
|
the_stack_data/14200332.c | /**
* Forking a process a thrice
* Result: 8 times "Hello" would be printed
* Explanation: @TODO
*/
#include <unistd.h>
#include <string.h>
int main()
{
fork();
fork();
fork();
char str[] = "Hello\n";
write(0, str, strlen(str));
return 0;
} |
the_stack_data/151705211.c | #include <stdio.h>
#include <string.h>
#include <stdbool.h>
#define SQR 10001
#define MAX 100000010
#define clr(ar) memset(ar, 0, sizeof(ar))
#define read() freopen("lol.txt", "r", stdin)
short P[MAX];
int L[MAX], ar[MAX];
void Generate(){
int i, j, k, l, d, x, y, z, p;
P[0] = P[1] = L[0] = L[1] = 1;
for (i = 4; i < MAX; i++, i++) P[i] = 2;
for (i = 3; i < SQR; i++, i++){
if (!P[i]){
d = i << 1;
for (j = (i * i); j < MAX; j += d) P[j] = i;
}
}
for (i = 2; i < MAX; i++){
if (!P[i]) L[i] = i;
else{
L[i] = P[i];
x = L[i /P[i]];
if (x > L[i]) L[i] = x;
}
}
ar[0] = 0, ar[1] = 1;
for (i = 2; i < MAX; i++){
if (L[i] == i) ar[i] = i + 1;
else{
x = i, y = 1, p = L[i];
while (L[x] == L[i]){
y += p;
x /= L[i], p *= L[i];
}
ar[i] = (ar[x] * y);
}
}
}
int main(){
Generate();
int t, n, i, r;
return 0;
}
|
the_stack_data/48814.c | /*20153292 JeongHyeonjin*/
#include <stdio.h> /* printf() and fprintf() */
#include <sys/socket.h> /* socket(),connect(), sendto(), and recvfrom() */
#include <arpa/inet.h> /* sockaddr_in, inet_addr()*/
#include <stdlib.h> /* atoi() and exit() */
#include <string.h> /* memset() */
#include <unistd.h> /* close() */
#define MAXRECVSTRING 255
int main(int argc, char *argv[])
{
int sock; /* Socket */
struct sockaddr_in mAddr; /* Multicast Address*/
char *mIP; /* IP Multicast Address */
unsigned int mPort; /* Port */
char buf[MAXRECVSTRING + 1]; /* Buffer
for received string */
int bufLen; /* Length of received string */
struct ip_mreq mReq; /* Multicast addressjoin structure */
if (argc != 3) {
fprintf(stderr, "Usage: %s <멀티캐스트 IP 주소> <멀티캐스트 포트>\n", argv[0]);
exit(1);
}
mIP = argv[1];
mPort = atoi(argv[2]);
/* 소켓 생성 */
if ((sock = socket(PF_INET, SOCK_DGRAM,IPPROTO_UDP)) < 0) {
perror("소켓 생성 실패");
exit(1);
}
/* bind에 사용할 주소 지정 */
memset(&mAddr, 0, sizeof(mAddr));
mAddr.sin_family = AF_INET;
mAddr.sin_addr.s_addr = htonl(INADDR_ANY);
mAddr.sin_port = htons(mPort);
/* bind */
if (bind(sock, (struct sockaddr *) &mAddr,sizeof(mAddr)) < 0) {
perror("bind() 실패");
exit(1);
}
/* 멀티캐스트 수신 구조체 ip_mreq 설정 */
mReq.imr_multiaddr.s_addr = inet_addr(mIP);
mReq.imr_interface.s_addr = htonl(INADDR_ANY);
/* 멀티캐스트 그룹 가입 소켓 옵션 설정 */
if (setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,(void *) &mReq, sizeof(mReq)) < 0) {
perror("소켓 옵션 설정 실패");
exit(1);
}
/* 멀티캐스트 패킷 수신 */
memset(buf, 0, MAXRECVSTRING);
if ((bufLen = recvfrom(sock, buf, MAXRECVSTRING, 0, NULL,0)) < 0) {
perror("수신 실패");
exit(1);
}
printf("Received: %s\n", buf); /* Print the received string */
close(sock);
exit(0);
}
|
the_stack_data/466136.c | /* This file was automatically generated by CasADi.
The CasADi copyright holders make no ownership claim of its contents. */
#ifdef __cplusplus
extern "C" {
#endif
/* How to prefix internal symbols */
#ifdef CODEGEN_PREFIX
#define NAMESPACE_CONCAT(NS, ID) _NAMESPACE_CONCAT(NS, ID)
#define _NAMESPACE_CONCAT(NS, ID) NS ## ID
#define CASADI_PREFIX(ID) NAMESPACE_CONCAT(CODEGEN_PREFIX, ID)
#else
#define CASADI_PREFIX(ID) phi_jac_y_uhat_ ## ID
#endif
#include <math.h>
#ifndef casadi_real
#define casadi_real double
#endif
#ifndef casadi_int
#define casadi_int int
#endif
/* Add prefix to internal symbols */
#define casadi_c0 CASADI_PREFIX(c0)
#define casadi_c1 CASADI_PREFIX(c1)
#define casadi_c2 CASADI_PREFIX(c2)
#define casadi_c3 CASADI_PREFIX(c3)
#define casadi_c4 CASADI_PREFIX(c4)
#define casadi_c5 CASADI_PREFIX(c5)
#define casadi_copy CASADI_PREFIX(copy)
#define casadi_de_boor CASADI_PREFIX(de_boor)
#define casadi_f0 CASADI_PREFIX(f0)
#define casadi_f1 CASADI_PREFIX(f1)
#define casadi_f2 CASADI_PREFIX(f2)
#define casadi_f3 CASADI_PREFIX(f3)
#define casadi_f4 CASADI_PREFIX(f4)
#define casadi_fill CASADI_PREFIX(fill)
#define casadi_fill_casadi_int CASADI_PREFIX(fill_casadi_int)
#define casadi_low CASADI_PREFIX(low)
#define casadi_mtimes CASADI_PREFIX(mtimes)
#define casadi_nd_boor_eval CASADI_PREFIX(nd_boor_eval)
#define casadi_s0 CASADI_PREFIX(s0)
#define casadi_s1 CASADI_PREFIX(s1)
#define casadi_s10 CASADI_PREFIX(s10)
#define casadi_s11 CASADI_PREFIX(s11)
#define casadi_s12 CASADI_PREFIX(s12)
#define casadi_s13 CASADI_PREFIX(s13)
#define casadi_s14 CASADI_PREFIX(s14)
#define casadi_s2 CASADI_PREFIX(s2)
#define casadi_s3 CASADI_PREFIX(s3)
#define casadi_s4 CASADI_PREFIX(s4)
#define casadi_s5 CASADI_PREFIX(s5)
#define casadi_s6 CASADI_PREFIX(s6)
#define casadi_s7 CASADI_PREFIX(s7)
#define casadi_s8 CASADI_PREFIX(s8)
#define casadi_s9 CASADI_PREFIX(s9)
#define casadi_sq CASADI_PREFIX(sq)
/* Symbol visibility in DLLs */
#ifndef CASADI_SYMBOL_EXPORT
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#if defined(STATIC_LINKED)
#define CASADI_SYMBOL_EXPORT
#else
#define CASADI_SYMBOL_EXPORT __declspec(dllexport)
#endif
#elif defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#define CASADI_SYMBOL_EXPORT __attribute__ ((visibility ("default")))
#else
#define CASADI_SYMBOL_EXPORT
#endif
#endif
static const casadi_int casadi_s0[2] = {0, 0};
static const casadi_int casadi_s1[2] = {1, 62};
static const casadi_int casadi_s2[2] = {2, 3};
static const casadi_int casadi_s3[3] = {0, 65, 102};
static const casadi_int casadi_s4[2] = {1, 63};
static const casadi_int casadi_s5[2] = {3, 2};
static const casadi_int casadi_s6[3] = {0, 67, 102};
static const casadi_int casadi_s7[2] = {3, 3};
static const casadi_int casadi_s8[3] = {0, 67, 104};
static const casadi_int casadi_s9[7] = {1, 2, 0, 1, 2, 0, 0};
static const casadi_int casadi_s10[7] = {2, 2, 0, 1, 2, 0, 0};
static const casadi_int casadi_s11[7] = {3, 1, 0, 3, 0, 1, 2};
static const casadi_int casadi_s12[8] = {4, 1, 0, 4, 0, 1, 2, 3};
static const casadi_int casadi_s13[8] = {1, 3, 0, 1, 2, 2, 0, 0};
static const casadi_int casadi_s14[11] = {1, 4, 0, 1, 2, 3, 4, 0, 0, 0, 0};
static const casadi_real casadi_c0[2046] = {3.4434809525457112e-04, 3.6156245857983747e-04, 1.7096550790628379e-04, 1.3681048324221123e-06, -3.8893371948031576e-04, -8.5070013544263565e-04, -1.1695977740862921e-03, -8.0244884967331899e-04, 1.4821322222904020e-03, 5.5875291973030670e-03, 9.7740511576272070e-03, 1.3988455411155450e-02, 1.8259816583602560e-02, 2.0799641137509657e-02, 2.0645792969570739e-02, 1.9238462167174328e-02, 1.6457152924221091e-02, 1.4498732662235420e-02, 1.3857816652281030e-02, 1.3275467795254431e-02, 1.4157191371987315e-02, 1.6092102317051132e-02, 1.7721328989280305e-02, 2.0164415147818415e-02, 1.8495544833703748e-02, 1.5698278917209318e-02, -1.5385280619149011e-03, -1.0504571542995611e-02, -1.4470957708036969e-02, -1.5602435116084307e-02, -1.4867506264172575e-02, -1.2948603066676750e-02, -1.3271136825030311e-02, -1.1109687285034670e-02, -1.1638382155511634e-02, -1.0642934816279842e-02, -1.1288805936980062e-02, -9.8409396546871031e-03, -1.1199263710768181e-02, -1.0576629500075860e-02, -1.0708625068497429e-02, -1.0332868861595443e-02, -1.0307619381577635e-02, -1.1092536469710035e-02, -1.0377115055247181e-02, -1.0766992784725690e-02, -9.7846176209770500e-03, -1.0650784572480358e-02, -8.3790411094482667e-03, -8.0676550056401689e-03, -6.0200480194559109e-03, -6.5053356392788695e-03, -5.7757807675127863e-03, -4.7189325934493195e-03, -3.9324567746326228e-03, -2.1880683071166425e-03, 1.0711696491440964e-05, 9.5598194593820088e-04, 6.9544624283375198e-04, 2.4594731892748026e-03, -3.5474273369266122e-03, 9.6298224082260325e-03, 2.5695619882295379e-04, 3.9548612420991190e-04, 2.3711264077405127e-04, 7.3055603298075381e-05, -2.4881520960584776e-04, -5.9879015575233646e-04, -6.8343115317499002e-04, 1.9586704496055759e-04, 2.8343637548499719e-03, 6.8769544499000697e-03, 1.1302026546583608e-02, 1.5451960899315085e-02, 1.9141715398101479e-02, 2.1015687397122701e-02, 2.0933120208365102e-02, 1.9097205515603399e-02, 1.7062644203464303e-02, 1.5077212350183278e-02, 1.4501171360938203e-02, 1.4233700312373504e-02, 1.4864240464331963e-02, 1.6416146827787775e-02, 1.7481438726496684e-02, 1.8512666076213380e-02, 1.5637935090140304e-02, 1.1172469608731805e-02, -1.6158137631402392e-03, -1.0408378833311027e-02, -1.4007097624950171e-02, -1.4824767526125382e-02, -1.4142104109071657e-02, -1.2680804150783931e-02, -1.2308210052799140e-02, -1.1229814158285195e-02, -1.0800841273495010e-02, -1.0838681807070871e-02, -1.0335975811739756e-02, -1.0369040730372064e-02, -1.0241457469105292e-02, -1.0515574509028305e-02, -1.0189579460991804e-02, -9.9243036810076624e-03, -1.0092191826759384e-02, -1.0138714299109439e-02, -1.0273701926825696e-02, -9.8262355272296306e-03, -9.8135480779612747e-03, -9.5059832924118612e-03, -8.7326759124544337e-03, -7.3962131151981969e-03, -6.8492969258320581e-03, -6.2681139389874265e-03, -6.2788558724401295e-03, -5.0975057915273736e-03, -4.5836423940135663e-03, -3.0420032755210757e-03, -1.1882165668670019e-03, -6.5059906671558181e-04, 2.4989678236673508e-04, -5.5864529756271576e-04, 1.7372715573970091e-04, -2.9381526295698332e-03, 3.4640563503869452e-04, 3.7290645378669496e-04, 3.4558586471034655e-04, 2.2802908425041853e-04, 2.6392503732564424e-05, -1.2441885574247108e-04, 1.6590766629732447e-04, 1.5268460907483881e-03, 4.5682216570051455e-03, 8.9034589369723551e-03, 1.3300094048920325e-02, 1.7501857855715355e-02, 2.0664699052008809e-02, 2.2027270517523415e-02, 2.1161497867974319e-02, 1.9584196993121541e-02, 1.7212226351135590e-02, 1.6220902081394734e-02, 1.5398214292212747e-02, 1.5432883812617371e-02, 1.6217421964105694e-02, 1.6875904518544954e-02, 1.7804139171289396e-02, 1.6624325738332724e-02, 1.4427236466964144e-02, 4.5811828284384459e-03, -4.4707450838731289e-03, -1.1237453984224877e-02, -1.3773694057635788e-02, -1.4084888409163110e-02, -1.2997900293175574e-02, -1.2322110065758063e-02, -1.1155521246500433e-02, -1.0605155786717918e-02, -1.0417472279197038e-02, -9.9011116610450145e-03, -1.0131376473836273e-02, -9.3988398118813599e-03, -1.0065825181714699e-02, -9.5690660075437584e-03, -9.5290134428723805e-03, -9.4352666753525077e-03, -9.3060941943088338e-03, -9.6192441547950092e-03, -9.0035312355971620e-03, -9.2142967585594066e-03, -8.8507655034566618e-03, -8.9603394903711858e-03, -8.2865490749557125e-03, -8.3620301845141742e-03, -7.3283889807010463e-03, -7.4616066284295471e-03, -6.5644772839187140e-03, -6.5642742786768161e-03, -5.4911442470789006e-03, -4.7768947780616414e-03, -4.1059535146430693e-03, -3.3186869353309056e-03, -2.8015616964507098e-03, -1.6273785112970792e-03, -2.0827328113152506e-03, -3.5612576763881937e-04, 4.5527981828124078e-04, 4.4016030747581064e-04, 4.6028373241277162e-04, 4.1277380167097956e-04, 3.2537276704891656e-04, 4.0684442630472932e-04, 1.1475209450371379e-03, 3.2343603141628194e-03, 7.1120593866097065e-03, 1.1819681344903150e-02, 1.6424420329205512e-02, 2.0319516504331794e-02, 2.2524759294151916e-02, 2.2631336696873033e-02, 2.1473305358662376e-02, 1.9399849096388311e-02, 1.8193525178676034e-02, 1.7233503882833290e-02, 1.6945101357968811e-02, 1.7151732405355613e-02, 1.7419218777381978e-02, 1.7546162549558764e-02, 1.6318268270430092e-02, 1.3343915848935073e-02, 6.7687945426234131e-03, -8.2036656211281755e-04, -6.6119777250929768e-03, -1.0696567630108456e-02, -1.2371444858181813e-02, -1.2191007346121441e-02, -1.1600755884268954e-02, -1.0902008673107227e-02, -1.0207886049521581e-02, -9.9794214559578709e-03, -9.4783197482137260e-03, -9.7331902298904427e-03, -9.2128220261407379e-03, -9.5147100716833077e-03, -9.0680449347483594e-03, -9.0067402460221047e-03, -8.9525955038928240e-03, -8.3542393730867970e-03, -8.7132406418981845e-03, -8.1488907649959891e-03, -8.3990414054971874e-03, -7.9249890003420531e-03, -8.1195824807239053e-03, -7.6385785459918698e-03, -7.9762800625159946e-03, -7.3569067602124449e-03, -7.8941464378595172e-03, -7.0627569111491456e-03, -7.3531036563247096e-03, -6.8857848975653543e-03, -6.9055665486433687e-03, -6.1947456189659772e-03, -5.8278859616343673e-03, -5.4736183483300171e-03, -4.8607292780447064e-03, -4.5443301461342584e-03, -4.7748803901969637e-03, -6.3116107488011917e-03, 5.1773229499198561e-04, 4.7392999622031945e-04, 5.3802297142537502e-04, 5.2917521354420467e-04, 5.2141594969180860e-04, 7.8941435463451490e-04, 1.8981630666005632e-03, 4.6297334157588237e-03, 9.0957752891277777e-03, 1.4137434328424389e-02, 1.8745654736403654e-02, 2.2239176491990267e-02, 2.3521415753297165e-02, 2.2930605740764276e-02, 2.1319600706762920e-02, 1.9734656643199955e-02, 1.8679375485722044e-02, 1.8099336439702657e-02, 1.7917845658820347e-02, 1.7844779179253006e-02, 1.7764782132310170e-02, 1.6691975327179309e-02, 1.3769578310168118e-02, 9.1026400954937192e-03, 2.0172948599904150e-03, -3.3150701847650121e-03, -7.4534333374330353e-03, -9.6540702416507140e-03, -1.0222316927954500e-02, -1.0756783123688773e-02, -1.0129746512269500e-02, -9.9891288515752408e-03, -9.7512485580200925e-03, -9.4656564673146204e-03, -9.6455958799547825e-03, -9.0184220639830670e-03, -9.3924105069685682e-03, -9.0103386277786413e-03, -8.4044378528674024e-03, -8.5932550509227046e-03, -8.4887463049969913e-03, -8.1141394552908253e-03, -7.5915711403755082e-03, -7.7657402389212649e-03, -7.6411014676417421e-03, -7.4151030730998380e-03, -7.0002897860508284e-03, -7.4766744304706340e-03, -6.8909050405020211e-03, -7.4184908415607792e-03, -6.7289592661317482e-03, -7.0975371154752553e-03, -6.7072013278819120e-03, -6.9322097567997287e-03, -6.6256828521193203e-03, -6.6105460678196754e-03, -6.5439538343451259e-03, -6.1847012370976201e-03, -6.0188895075298718e-03, -5.4940758826420646e-03, -5.3543820574572729e-03, -5.3400250983955885e-03, 5.6672332190665226e-04, 5.0159772350154633e-04, 5.9431222737347904e-04, 6.2644350680044966e-04, 7.0685565887089116e-04, 1.1866562890180676e-03, 2.7272368262716735e-03, 6.1447684138433226e-03, 1.1204628058594929e-02, 1.6405775828638308e-02, 2.1008531803696662e-02, 2.3731362529221062e-02, 2.4114042299275593e-02, 2.3017952293512445e-02, 2.1293657223184270e-02, 2.0045960064686147e-02, 1.9174758877213538e-02, 1.8631231850454205e-02, 1.8264887934403007e-02, 1.7897001547786784e-02, 1.6842988901716149e-02, 1.4013930917264827e-02, 1.0556710419885151e-02, 3.9033766347433274e-03, -8.3086339002097498e-04, -4.7475075731135963e-03, -7.1417917821030019e-03, -8.1463009993947844e-03, -8.6101317391125698e-03, -8.6962164686093524e-03, -9.2410835750958986e-03, -9.0482124543150855e-03, -9.1814573738062955e-03, -9.0355001438662819e-03, -8.8707908706907035e-03, -9.3638201893764539e-03, -8.3501302483192374e-03, -8.5133260747355388e-03, -8.3490906475214566e-03, -8.3049478897060935e-03, -7.8363239754647152e-03, -7.5996016571809599e-03, -7.1943859454315640e-03, -7.1002708318403662e-03, -7.0431998538274532e-03, -6.9286000793487013e-03, -6.7285631971100435e-03, -6.5178139522062417e-03, -6.7026482333796267e-03, -6.4112800729120151e-03, -6.6600572598650293e-03, -6.2580426902354436e-03, -6.5169813650482328e-03, -6.1024706656710170e-03, -6.4923165699777990e-03, -6.2036442361913385e-03, -6.2901156933500429e-03, -6.0616300763053979e-03, -5.8487544084196014e-03, -5.9342402821451132e-03, -5.5004042622628507e-03, -5.6283896051435300e-03, 5.9423716747025734e-04, 5.1195755755622380e-04, 6.3242331470651954e-04, 7.0612319716110983e-04, 8.9551987548824874e-04, 1.6317861522046340e-03, 3.6768250727872466e-03, 7.8022563732973761e-03, 1.3346094485357424e-02, 1.8691257286994445e-02, 2.2887772657175745e-02, 2.4784614169467437e-02, 2.4457586500948425e-02, 2.2909436568816305e-02, 2.1392959840291131e-02, 2.0300914736754327e-02, 1.9330272943271914e-02, 1.8769348800392049e-02, 1.7928327281070799e-02, 1.6630887146447393e-02, 1.4188601530424061e-02, 1.1456087248934432e-02, 5.2997161947579419e-03, 9.0376207283260346e-04, -2.8346535559050090e-03, -5.0326313057543204e-03, -6.5494442333600689e-03, -6.9560043447969289e-03, -7.2412002318074653e-03, -7.8637406514324715e-03, -8.0761677095027573e-03, -8.2426952976098478e-03, -8.1865877158087685e-03, -8.3699138369357773e-03, -8.6306216326303142e-03, -8.0908714721747432e-03, -7.9476122120782922e-03, -7.7901130759084058e-03, -7.9496692854700568e-03, -7.8230147758789337e-03, -7.5458196365957853e-03, -7.1621575534487059e-03, -6.9976862177772714e-03, -6.4073258036798642e-03, -6.8385937111048734e-03, -6.3142657339375630e-03, -6.5092600615335172e-03, -6.2648123540231804e-03, -5.9259533477693804e-03, -6.5169499963848576e-03, -5.5515808638975511e-03, -6.5168483949297612e-03, -5.4720755780852393e-03, -6.1571127027204020e-03, -5.8465464381617510e-03, -5.8662945223008911e-03, -5.7379445684025282e-03, -5.8030785733932111e-03, -5.7799470965867877e-03, -5.7288161125323006e-03, -5.2558599631248037e-03, -5.4274397917468686e-03, 6.0142823126992095e-04, 5.0980711590406860e-04, 6.5007392654433532e-04, 7.7703835317045195e-04, 1.0972197986482413e-03, 2.1419522188726343e-03, 4.7503346122284747e-03, 9.6285774308794182e-03, 1.5469468993286724e-02, 2.0846284631058976e-02, 2.4433658580689063e-02, 2.5402289261227548e-02, 2.4560739528091596e-02, 2.2811333579390553e-02, 2.1470962110639119e-02, 2.0145997045999231e-02, 1.9188647936009079e-02, 1.7969591332558599e-02, 1.6564022909643872e-02, 1.4214105310263014e-02, 1.1891220214573173e-02, 6.7401646799585824e-03, 2.1020304069637175e-03, -1.4060668381362662e-03, -4.0016692962207556e-03, -5.1913659549391311e-03, -6.0568864073281548e-03, -6.7211234052207969e-03, -6.7590071375614458e-03, -7.2704886199779217e-03, -7.2785958645835702e-03, -7.3616468306130778e-03, -7.5849174422818744e-03, -7.3654553981967741e-03, -7.5701221881365188e-03, -7.4406567636960685e-03, -7.3635256370686297e-03, -7.1158662364265435e-03, -7.1112679977379800e-03, -7.1138817704292090e-03, -7.0153275123218950e-03, -6.7212347407651363e-03, -6.4615533092018396e-03, -6.7444482974230446e-03, -5.9120530579919450e-03, -6.4834990614381360e-03, -6.1182806856410477e-03, -5.8238769285456626e-03, -6.1940299702547830e-03, -5.8508405244369621e-03, -6.2273934515500590e-03, -5.3513306127031951e-03, -5.9670619458812024e-03, -5.5865583418186204e-03, -5.4994331082094672e-03, -5.7900024616200918e-03, -5.4301480767039723e-03, -5.6930661371689395e-03, -5.8755911419796636e-03, -5.0698278654726023e-03, -5.2724617059072137e-03, -5.0053635679912223e-03, 5.9923326862625081e-04, 4.8362309294195174e-04, 6.5870537967737189e-04, 8.4010152980709685e-04, 1.3243076206157396e-03, 2.7192113388387860e-03, 5.9870154109267007e-03, 1.1512909996553584e-02, 1.7622435852166794e-02, 2.2805050275694211e-02, 2.5571026151638837e-02, 2.5733599111675026e-02, 2.4410650644689724e-02, 2.2737333931852094e-02, 2.1166446532339678e-02, 1.9762705703614297e-02, 1.8084595560566574e-02, 1.6516437878929480e-02, 1.4183664625126435e-02, 1.2323984724675108e-02, 7.8751415193870078e-03, 3.1914542550246505e-03, -6.6453579687308917e-04, -3.0381938529087105e-03, -4.7156392615048115e-03, -5.9209774055391517e-03, -6.2783688909373581e-03, -6.6017737166925161e-03, -6.8631376687618983e-03, -6.7975816185653071e-03, -6.8377518411859017e-03, -6.7689087333711873e-03, -6.7880713721952812e-03, -6.8890830277235360e-03, -6.9441947302592011e-03, -6.7892564337347638e-03, -6.5400784298614567e-03, -6.5371924494074529e-03, -6.5919001913239406e-03, -6.5852609945043772e-03, -6.5290753527568746e-03, -6.1454053778921547e-03, -6.3002866774083954e-03, -5.9736730674546656e-03, -6.3385427799559912e-03, -6.0878459127839124e-03, -5.9969407784647433e-03, -6.1473069748333997e-03, -5.5438941719747059e-03, -6.4326320767710832e-03, -5.8241310704222754e-03, -5.9353911494058609e-03, -5.6832295587591480e-03, -5.9079935596164923e-03, -5.7145146457389384e-03, -5.4141003611885147e-03, -5.7904151451248914e-03, -5.7653667353922688e-03, -5.4995770594407634e-03, -5.2591474893752127e-03, -4.0790641610853606e-03, -4.2471740290120075e-03, 5.8395136352396015e-04, 4.4101341793681068e-04, 6.5488210170816172e-04, 9.0632782723981328e-04, 1.5743623600554917e-03, 3.3922023397959314e-03, 7.3337058997827859e-03, 1.3496893931322619e-02, 1.9672582243834315e-02, 2.4454090812398493e-02, 2.6320783932780478e-02, 2.5874131510716367e-02, 2.4127922520844419e-02, 2.2477075357730664e-02, 2.0524422383194019e-02, 1.8583381426323625e-02, 1.6477684497626904e-02, 1.4126134054576522e-02, 1.2443336431428087e-02, 9.0154671969030487e-03, 4.0909500674305432e-03, 1.3000370098736891e-04, -2.6282203732416187e-03, -4.5618614738329177e-03, -5.9435145317907057e-03, -6.4481751568465362e-03, -6.9111665706426684e-03, -6.8573303034564215e-03, -6.8705055022569295e-03, -6.7415808196591154e-03, -6.6863392581699987e-03, -6.6187065364830822e-03, -6.5181939238314057e-03, -6.5239663751475163e-03, -6.5233882433557711e-03, -6.4355527398687884e-03, -6.3903652697039348e-03, -6.3425283891409834e-03, -6.2739165878334391e-03, -6.3426026056591367e-03, -6.2562203226851076e-03, -6.1305508020062238e-03, -6.0299967281814970e-03, -6.2899757226232700e-03, -6.0219408301097621e-03, -6.4151634826445092e-03, -6.2250032481510065e-03, -5.9121130767124941e-03, -6.3420930422136146e-03, -6.0907770400654426e-03, -6.3638092813275288e-03, -5.9775206066060571e-03, -6.1689914085576031e-03, -5.9959292053175933e-03, -5.7558198596236732e-03, -6.2251287871121774e-03, -5.5933396894675275e-03, -6.0882809228613721e-03, -5.6213952970054354e-03, -5.1614562822520846e-03, -3.3622072546093604e-03, -3.5034695429226881e-03, 5.5496330228640978e-04, 3.8667018867461281e-04, 6.3830578758471146e-04, 9.7257557286568527e-04, 1.8746414350205853e-03, 4.1418789926824309e-03, 8.8537771916987612e-03, 1.5440288502597196e-02, 2.1682842041374710e-02, 2.5751043420683878e-02, 2.6734523896722831e-02, 2.5716823605176270e-02, 2.3825128289407221e-02, 2.1725747509530324e-02, 1.9326549945951121e-02, 1.6880797440984252e-02, 1.4159388046464633e-02, 1.2308593875745844e-02, 9.3858102399848597e-03, 5.5039194016900383e-03, 6.4757177362573248e-04, -2.2212681149226809e-03, -4.6811893017131845e-03, -6.1549790547756333e-03, -6.8098569182629687e-03, -7.2684896074195482e-03, -7.2874089822024535e-03, -7.3721376629653224e-03, -6.9910616896721178e-03, -6.9962116927023144e-03, -6.8595928705706410e-03, -6.8266423854677627e-03, -6.6727572971117532e-03, -6.7229625590693731e-03, -6.6138336108240159e-03, -6.5966706602131053e-03, -6.6415001154546405e-03, -6.5711347556199895e-03, -6.5479239634853303e-03, -6.6036647737686138e-03, -6.5005811564452509e-03, -6.4737218970331301e-03, -6.5711282848661123e-03, -6.5004392652229237e-03, -6.7002911921027197e-03, -6.6385322391671470e-03, -6.4887428773796191e-03, -6.5743865367413057e-03, -6.5239766647560149e-03, -6.6183756036931607e-03, -6.5284445020142856e-03, -6.5007372696995885e-03, -6.3034687557121105e-03, -6.0426305944982217e-03, -5.9228873883185318e-03, -5.6728508196041694e-03, -5.9768771247477662e-03, -5.6819689175489907e-03, -5.2726074007422366e-03, -4.8952511505786570e-03, -4.5135853741693488e-03, -3.2007773954480720e-03, 5.1277087322909587e-04, 3.2553792937047021e-04, 6.0539509157939500e-04, 1.0535950537810743e-03, 2.2143654529682075e-03, 5.0194436280723009e-03, 1.0454142246041631e-02, 1.7425341258023377e-02, 2.3451665290893542e-02, 2.6739439609520577e-02, 2.6894378455370280e-02, 2.5302286355361969e-02, 2.3181409812480680e-02, 2.0513287681356379e-02, 1.7573252183138099e-02, 1.4541321402741003e-02, 1.2178692139451608e-02, 9.8582751831745585e-03, 6.4413837724268119e-03, 1.3104451246631066e-03, -1.9649324758228004e-03, -4.9902945528059184e-03, -6.4955872701415451e-03, -7.2631394001856919e-03, -7.8693927782355622e-03, -7.9098529161058251e-03, -7.9836979572547317e-03, -7.5970825243972528e-03, -7.6515825188576692e-03, -7.3912055040362135e-03, -7.3411410762388996e-03, -7.3945937375613779e-03, -7.2673831150578405e-03, -7.3186416645311114e-03, -7.2525012443960535e-03, -7.3529579637362785e-03, -7.2404304778780071e-03, -7.3519487152373386e-03, -7.3021116489536964e-03, -7.3684021488024665e-03, -7.2464825612670869e-03, -7.2949584625842528e-03, -7.2087946178972795e-03, -7.3346067178195890e-03, -7.2291670297814636e-03, -7.1931999215321119e-03, -7.1081802377565284e-03, -6.8002250491493305e-03, -6.6445772536016939e-03, -6.6389235200943614e-03, -6.6281280023076233e-03, -6.3336317514655766e-03, -5.8928182020581282e-03, -5.4013081489402079e-03, -4.9535599861926446e-03, -5.0215793817355615e-03, -4.6621072012066091e-03, -4.7112690315990087e-03, -4.3854139798489462e-03, -3.0353699919380295e-03, -3.7605063827279780e-03, -7.8183025511823177e-03, 4.5996701802532985e-04, 2.5027425395749564e-04, 5.6734042094220422e-04, 1.1395997840909014e-03, 2.6262201705479424e-03, 5.9833680690442245e-03, 1.2197513720885768e-02, 1.9278216453662629e-02, 2.5062773081516485e-02, 2.7278928764088134e-02, 2.6855947006483055e-02, 2.4733918094959617e-02, 2.2057813835521550e-02, 1.8673899506751607e-02, 1.5366968641392392e-02, 1.2185583652631837e-02, 1.0358869664609555e-02, 6.8610477975624695e-03, 2.1773831723108095e-03, -1.6385003323725611e-03, -4.9670136350514205e-03, -6.8464868547210012e-03, -8.0101005064322772e-03, -8.7401510494548584e-03, -8.6630014090683660e-03, -8.7028875985160070e-03, -8.4887367876227970e-03, -8.4133798232836621e-03, -8.2380272578850555e-03, -8.1954532465072505e-03, -8.2531344219879121e-03, -8.3345436304551046e-03, -8.3030350814719545e-03, -8.3119035602215730e-03, -8.3201538679686937e-03, -8.3510788444263184e-03, -8.4561500501315334e-03, -8.3721316702955045e-03, -8.3891718204482379e-03, -8.2776686474611005e-03, -8.2316331502202550e-03, -7.9507752423939038e-03, -7.9334201917589803e-03, -7.5774098750910485e-03, -7.5644378898805653e-03, -7.3369529374539486e-03, -6.7306532525549523e-03, -6.4069140193011229e-03, -5.8189660622469039e-03, -5.6832674859693399e-03, -5.5718945972042903e-03, -5.1571514444030409e-03, -4.3247279427082730e-03, -2.6908761678836636e-03, -2.3586808141906682e-03, -2.0430974497236184e-03, -2.0737070407292483e-03, -1.9132339906790877e-03, -1.6724057106562405e-03, -1.6528319806856681e-03, -2.5404271960312945e-03, -5.4302989590590848e-04, 4.0182159935273076e-04, 1.5783995351772301e-04, 5.2767189846919874e-04, 1.2526710640632585e-03, 3.0824155856246441e-03, 7.0952573867657590e-03, 1.3911776475214577e-02, 2.1210799010203084e-02, 2.6214121182780353e-02, 2.7721249635976122e-02, 2.6370603208480531e-02, 2.3912251318016720e-02, 2.0290530503539517e-02, 1.6599697530695928e-02, 1.2690293525628560e-02, 1.0500186233637909e-02, 7.2207212746543403e-03, 3.5582936399629062e-03, -1.5788918848042011e-03, -4.9325445100052434e-03, -7.0401206998434163e-03, -8.8003618627375546e-03, -9.4227130288068450e-03, -9.5319823686425276e-03, -9.7631049993627816e-03, -9.3875876570687078e-03, -9.4401431825253401e-03, -9.3827789147796214e-03, -9.3139810303576875e-03, -9.3913592671224788e-03, -9.5393221663910288e-03, -9.5263549773199341e-03, -9.6003221547053541e-03, -9.6359964161237127e-03, -9.5736760733176607e-03, -9.6255410790058865e-03, -9.4781634988329450e-03, -9.3688050815294854e-03, -9.0557126558209605e-03, -8.7930018925013453e-03, -8.4621603963558056e-03, -7.9596712934727407e-03, -7.4333525526335403e-03, -6.9197563265647535e-03, -6.4342290779166728e-03, -6.0418235094932167e-03, -5.6183533887267621e-03, -3.5546180020262497e-03, -2.8783124246992038e-03, -2.5084408225753115e-03, -2.3532747170792959e-03, -2.0844494410597525e-03, -1.5426421158291990e-03, -1.1178839232553277e-03, -6.4079230010254888e-04, -5.5683863045995967e-04, -4.6339979154286172e-04, -4.6619305195361063e-04, -4.4138090099831752e-04, -4.6207155162730686e-04, -5.8175875870775280e-04, -9.5258379322518162e-04, 3.4891118241320296e-04, 4.7046456319144170e-05, 4.9597147628996363e-04, 1.3819027653117696e-03, 3.6205443474186111e-03, 8.2848475806964056e-03, 1.5735146663552198e-02, 2.2859431335294528e-02, 2.7244238575606580e-02, 2.7731411303479489e-02, 2.5720669176207134e-02, 2.2446184870956981e-02, 1.8310255037895795e-02, 1.3831550829793815e-02, 1.0761898630502142e-02, 7.8886536501692472e-03, 4.4705292690732645e-03, -9.4171851476476665e-04, -4.8567785200292202e-03, -7.3751146215112195e-03, -9.3714701097296904e-03, -1.0180401877869838e-02, -1.0570040078743237e-02, -1.0859179329775676e-02, -1.0568469799636937e-02, -1.0685079817254750e-02, -1.0547874109026828e-02, -1.0693227495426172e-02, -1.0755282760338769e-02, -1.0848712324176307e-02, -1.0923192070676796e-02, -1.0995641345471333e-02, -1.0946171699723353e-02, -1.0728408735519362e-02, -1.0653942685119336e-02, -1.0139847023239626e-02, -9.8818786788770485e-03, -9.1981080598371526e-03, -8.5646010770887085e-03, -7.8275264173618443e-03, -7.1141844606248221e-03, -6.4821002659410237e-03, -4.7440347844369974e-03, -3.4030062785556005e-03, -2.9319660102722000e-03, -2.5865381702140314e-03, -1.9683111992524873e-03, -1.5348750507211892e-03, -9.2035134654954766e-04, -7.0966661518265034e-04, -5.9661588627357405e-04, -4.7422479431220551e-04, -2.8982046078678599e-04, -1.0685855076006390e-06, 1.1312918870802187e-04, 1.9941512466145834e-04, 1.8060079347109433e-04, 1.7896805843291936e-04, 1.5046164046898531e-04, 1.0047921278795230e-04, -7.1955945862377853e-05, 7.0998858239831267e-04, 2.8340320391721102e-04, -6.0347310900973894e-05, 4.5883899424541824e-04, 1.5532423085119831e-03, 4.2061283153091780e-03, 9.6326801842668078e-03, 1.7468969774692859e-02, 2.4456884473266258e-02, 2.7829551320283752e-02, 2.7414373256355290e-02, 2.4735780926478185e-02, 2.0622303622318428e-02, 1.5783271350363087e-02, 1.1398526990716890e-02, 8.5141445725833154e-03, 4.8759643788671425e-03, 4.4993760313644104e-04, -4.5182614027200751e-03, -7.6240248102402430e-03, -9.7687939720432215e-03, -1.0966710268701940e-02, -1.1705073271159216e-02, -1.1924094357876919e-02, -1.2013385504549640e-02, -1.1930514194083336e-02, -1.2033097533324044e-02, -1.2047287492262554e-02, -1.2293149177182577e-02, -1.2290210672430010e-02, -1.2337067416599262e-02, -1.2214110014432344e-02, -1.2063944571273993e-02, -1.1521007642151963e-02, -1.1089765986235671e-02, -1.0039875838789993e-02, -9.4257327103955124e-03, -8.1879793444471528e-03, -7.4785411228117139e-03, -5.3918373567024835e-03, -3.8418704527802463e-03, -3.1899993182498785e-03, -2.4638117159747792e-03, -1.8565168091936694e-03, -1.2467934300041971e-03, -8.3908995764404425e-04, -6.2256816972682373e-04, -4.5440846395678781e-04, -1.0731283433097066e-04, 5.5057702928153901e-05, 1.6375759259237236e-04, 1.8216558365527925e-04, 1.9688177029709292e-04, 2.4384737468967441e-04, 2.7102767182569194e-04, 3.2031451723175605e-04, 3.0984843995136889e-04, 3.0078933255656788e-04, 2.6902454177176881e-04, 2.4516119095047335e-04, 2.1006648829894692e-04, 2.8288997461483213e-04, 1.6171342938838267e-04, 2.2814646185086163e-04, -1.6572025701319659e-04, 4.2128215837709815e-04, 1.7579881427091035e-03, 4.8935521934267631e-03, 1.1032369264035162e-02, 1.9217016082456365e-02, 2.5812286036048473e-02, 2.8087802950143806e-02, 2.6801143781340436e-02, 2.3326695379161683e-02, 1.8272409258690198e-02, 1.3099927124702815e-02, 9.1020408163629551e-03, 5.7158439445767484e-03, 1.6050713038643916e-03, -3.6707117372368203e-03, -7.5968709182718530e-03, -1.0083032637844658e-02, -1.1927164659560618e-02, -1.2746734630355971e-02, -1.3066153980609202e-02, -1.3442721760307363e-02, -1.3324216160316316e-02, -1.3599045460667702e-02, -1.3568799416985952e-02, -1.3742863987113718e-02, -1.3682121049716889e-02, -1.3595124211716894e-02, -1.3177934505347030e-02, -1.2523568248812143e-02, -1.1462129661940199e-02, -1.0534986709229838e-02, -9.0238002132240480e-03, -8.1514513067417766e-03, -4.7702482293513274e-03, -3.9466586516098707e-03, -2.8211670407456519e-03, -2.1286239286311469e-03, -1.3796939086714527e-03, -8.5992059678106827e-04, -5.7084286013787868e-04, -2.2547502295313434e-04, 2.6476273931906776e-05, 1.5312112995083133e-04, 2.0973690883882568e-04, 2.7362062836243199e-04, 2.8882466473220810e-04, 3.4180304746454608e-04, 3.3672366896487583e-04, 3.1593612135238751e-04, 2.8887998583564892e-04, 2.6611543712474952e-04, 2.6236031342028484e-04, 2.4153873853026203e-04, 2.2859449041562146e-04, 2.0386742111926895e-04, 1.8780771895156030e-04, 1.7052366706652464e-04, 1.7225488321580577e-04, 1.7236919336187118e-04, 3.2590147710315415e-04, 1.6676688425337760e-04, -2.7996231059670973e-04, 3.9979198688588902e-04, 2.0045109560339822e-03, 5.6581512335487916e-03, 1.2573734656940921e-02, 2.0855790061681784e-02, 2.6848045054168837e-02, 2.8076890007246336e-02, 2.5841363071984785e-02, 2.1425711789023805e-02, 1.5646147274029465e-02, 1.0293097349055313e-02, 6.8613805636501268e-03, 2.3374114619072461e-03, -2.1920338765676894e-03, -7.2522485079586640e-03, -1.0236370511826659e-02, -1.2468290306062807e-02, -1.3854908540728489e-02, -1.4433425382640530e-02, -1.4750025534063127e-02, -1.4924698672526521e-02, -1.5172908536032259e-02, -1.5101005950821395e-02, -1.5096982215167490e-02, -1.4974322816921612e-02, -1.4366915549744896e-02, -1.3426846663729168e-02, -1.2080285053321482e-02, -1.0681667297495739e-02, -9.1967897627678961e-03, -5.8056863593493307e-03, -4.3541994902828269e-03, -2.8446384305556380e-03, -2.1352459284119597e-03, -1.0814571750647002e-03, -7.0556211357617350e-04, -2.3723948678733547e-04, 4.1608002524894626e-05, 1.9776005340985895e-04, 2.9979617791291331e-04, 3.3983804996483812e-04, 3.7244532517615369e-04, 3.7877545975593258e-04, 3.5848819973743245e-04, 3.2239489524022889e-04, 3.1172531154092164e-04, 2.8083781346290439e-04, 2.5590245025289152e-04, 2.2243989387927101e-04, 1.9093192112631615e-04, 1.6575367387908929e-04, 1.4045242200243094e-04, 1.2472383811717048e-04, 1.0584385029148723e-04, 9.3804860716874196e-05, 8.2112769963468867e-05, 7.9983933421478426e-05, 8.0038735630571196e-05, 1.2762940536565994e-04, 4.8875690391848002e-05, 1.3517163505198659e-04, -4.1106169712103874e-04, 4.0599311267139337e-04, 2.2999326367425868e-03, 6.5240436432463106e-03, 1.4122486665217072e-02, 2.2468937189321386e-02, 2.7550971583198899e-02, 2.7773582076376188e-02, 2.4498644880837334e-02, 1.9049978440025261e-02, 1.2756337663131334e-02, 7.9078518201171344e-03, 3.8225695546953709e-03, -7.8001804742819369e-04, -6.5324917101751423e-03, -1.0017753001374474e-02, -1.3056631313056011e-02, -1.4621239482629916e-02, -1.5760425861423455e-02, -1.6311818570435482e-02, -1.6525307004383455e-02, -1.6623115413795866e-02, -1.6606335582830090e-02, -1.6483200890779814e-02, -1.5763874495159085e-02, -1.4437326501170203e-02, -1.2935173454978726e-02, -1.1205210904411608e-02, -8.7113248900722098e-03, -5.2343203970306703e-03, -3.6084959725850413e-03, -2.4226363811097992e-03, -1.2617577115985913e-03, -7.0726452321484036e-04, -5.6402541719543890e-05, 1.4564174877586267e-04, 3.5645513871036079e-04, 3.9485068544279798e-04, 4.3304095649972230e-04, 4.3238247531717389e-04, 3.9921613424111994e-04, 3.6972982887440125e-04, 3.3263487557593668e-04, 2.9164556624890594e-04, 2.4952460466075429e-04, 2.1442960993616855e-04, 1.7640455251974937e-04, 1.5137466747976348e-04, 1.2443449024154824e-04, 1.0164042648851918e-04, 8.1015962724413816e-05, 6.2868811237041405e-05, 4.9767919183005819e-05, 3.6769518022747175e-05, 2.8542681392656490e-05, 2.1141722977116955e-05, 1.8569750953755578e-05, 1.8320289180972599e-05, 2.6788643417585760e-05, 3.2990951033516283e-05, 4.0158694214299480e-05, 1.0758659726599340e-04, -5.3946315569570330e-04, 4.3697361797942480e-04, 2.6523352745594156e-03, 7.4592293326308304e-03, 1.5700826649093773e-02, 2.3876364903948274e-02, 2.7983473132291714e-02, 2.7056303183770891e-02, 2.2795888602092168e-02, 1.6328900491790643e-02, 1.0022752829953102e-02, 5.2767964499568221e-03, 3.1498569697596679e-04, -4.6581204194120207e-03, -9.5902357296941132e-03, -1.3123789082437803e-02, -1.5476326324931705e-02, -1.6918860167974892e-02, -1.7645516055418836e-02, -1.8120590275431780e-02, -1.8253441131280107e-02, -1.8027465185448385e-02, -1.7553239497728655e-02, -1.5931403973453502e-02, -1.4132796610064481e-02, -1.2231658153838719e-02, -8.8045855927947163e-03, -5.2428063606135451e-03, -3.4009589000150082e-03, -2.0298058226161752e-03, -9.1587364046134042e-04, -1.7732013187863986e-04, 1.7267439358872524e-04, 4.2996645523951530e-04, 4.5668154390445014e-04, 5.2315335155704709e-04, 4.7323130824400645e-04, 4.4063185807104296e-04, 3.8205369816143278e-04, 3.2531593258676873e-04, 2.7354644739077259e-04, 2.2303766982201235e-04, 1.8143611928777577e-04, 1.4566842471893613e-04, 1.1483933099913952e-04, 8.7145290695146265e-05, 6.7676432360362350e-05, 4.9120591787518177e-05, 3.5843967220877367e-05, 2.4181740187251502e-05, 1.4847943228502697e-05, 7.5889014233212094e-06, 1.0791260356153424e-06, -3.0055930003567615e-06, -6.7112387671094476e-06, -8.1640806494678831e-06, -8.7198415589174783e-06, -6.0701700371728197e-06, -3.3444915442955964e-06, 7.5117329292558234e-06, -2.2103664507627216e-05, 1.1345740173476782e-04, -6.5661335774083035e-04, 4.9412686572876396e-04, 3.0627427385068115e-03, 8.5031917523922529e-03, 1.7244040611798385e-02, 2.5198652947351297e-02, 2.7985147721703074e-02, 2.6048289896712540e-02, 2.0618368444277835e-02, 1.3505602800527899e-02, 7.1969359520173137e-03, 2.2686675131398104e-03, -3.0007733206031673e-03, -8.6719934124626918e-03, -1.2922369525150940e-02, -1.5803709401143340e-02, -1.7935373866806742e-02, -1.9045265774637235e-02, -1.9599647187091562e-02, -1.9710846255987680e-02, -1.9380995667703210e-02, -1.8258883670644356e-02, -1.5842228282106303e-02, -1.4036144050690164e-02, -1.0145186427964550e-02, -5.6462642279146748e-03, -3.5885541775233119e-03, -1.9204037313780458e-03, -7.1204737332775884e-04, 3.6765591205772073e-05, 3.8992927042373572e-04, 5.2435495411996954e-04, 5.8541364698283917e-04, 5.3379226056302119e-04, 4.9772670618104223e-04, 4.0562717794819739e-04, 3.4233352304625421e-04, 2.6738825457994634e-04, 2.1046627958623126e-04, 1.6129981145981192e-04, 1.2017177308173704e-04, 8.8500979219829012e-05, 6.2812040127372543e-05, 4.2753677930799553e-05, 2.6999729854841322e-05, 1.5587169574042889e-05, 5.8411925576159845e-06, -1.4210019336427927e-07, -5.0899829209127714e-06, -8.2230799749029944e-06, -1.0453564801062070e-05, -1.2088608157792324e-05, -1.2906660803347155e-05, -1.3758884308291957e-05, -1.3829607938912054e-05, -1.3826681828294182e-05, -1.2832308861451634e-05, -1.1609903008969524e-05, -8.8504979380952956e-06, -1.0150844107275745e-05, -1.0451857010489496e-05, 1.2406291775841904e-04, -7.4821531741445929e-04, 5.6332384428775528e-04, 3.5515879924921737e-03, 9.6140681908507622e-03, 1.8812078544357888e-02, 2.6097479869479023e-02, 2.7873083111639343e-02, 2.4599407558413805e-02, 1.8066039684150020e-02, 1.0377085311572914e-02, 4.4341369415169807e-03, -1.2627690800976754e-03, -6.5862828159568287e-03, -1.2190659123999498e-02, -1.5746396109282551e-02, -1.8747669845406600e-02, -2.0243057289763583e-02, -2.1100477163759151e-02, -2.1140758644344254e-02, -2.0593193214116991e-02, -1.8588150914817685e-02, -1.6117788131570363e-02, -1.3659559307805101e-02, -6.7077096501551581e-03, -4.3311562258967692e-03, -2.1792624702373763e-03, -6.8941916379206079e-04, 1.2975328046166152e-04, 4.9585497872869054e-04, 6.1944870441132472e-04, 6.3372323116569216e-04, 5.7822552425725493e-04, 4.7540785203422135e-04, 3.8764084645155161e-04, 2.8853330293629361e-04, 2.2134398549026043e-04, 1.5568068706334052e-04, 1.1069401886897737e-04, 7.3181289676398065e-05, 4.6034988765325936e-05, 2.6301721379767395e-05, 1.1650766024135249e-05, 1.6445175850517764e-06, -5.2090255624304789e-06, -9.6400252010983112e-06, -1.2672805288158886e-05, -1.3913937842073207e-05, -1.4761638908188362e-05, -1.4582966582750353e-05, -1.4137613371421014e-05, -1.3389191651989068e-05, -1.2509226736682311e-05, -1.1785261907568166e-05, -1.0977109012401103e-05, -1.0433088902843393e-05, -9.7662146678985297e-06, -9.1610539301042543e-06, -8.1270995698101253e-06, -7.5097777829391001e-06, -6.9620870723670189e-06, -1.2109480408937687e-05, 1.6958931350848083e-04, -8.4867214902042964e-04, 6.8593842341407862e-04, 4.0824171132717579e-03, 1.0828019694942126e-02, 2.0243168161705807e-02, 2.6872397704744283e-02, 2.7241054182892230e-02, 2.2851301365619747e-02, 1.5174653296236712e-02, 7.3967962773084373e-03, 1.3958736662537663e-03, -4.7220732674538024e-03, -1.0585768438697740e-02, -1.5302424319670660e-02, -1.9053624835886435e-02, -2.1126009600145781e-02, -2.2535102205431576e-02, -2.2554235333499151e-02, -2.1904816997677629e-02, -1.8938635747580361e-02, -1.6568131754837380e-02, -1.1202874760307346e-02, -5.6307629886111158e-03, -3.3770588407335740e-03, -9.3176201085757009e-04, 7.1664449271228222e-05, 5.6540689834179035e-04, 7.0165227055215499e-04, 6.9905033526332957e-04, 6.0764544031573025e-04, 4.8418478851824400e-04, 3.6284227010534005e-04, 2.6478452534578478e-04, 1.7872040667670105e-04, 1.2027909750675232e-04, 7.0937567039551207e-05, 4.0321581966686195e-05, 1.6621618089334491e-05, 2.2327111150020494e-06, -7.2686927129527801e-06, -1.2943319077325367e-05, -1.5826349542652236e-05, -1.7079398912251651e-05, -1.7141691887797276e-05, -1.6525764716693352e-05, -1.5357463134313068e-05, -1.4177577293148787e-05, -1.2677817729305060e-05, -1.1302309538421297e-05, -9.8827760296934250e-06, -8.5791591920273788e-06, -7.4387352754670300e-06, -6.4396059194034614e-06, -5.7298188885876076e-06, -5.1661881966992093e-06, -4.7929791249857682e-06, -4.3165239080261852e-06, -3.6139690178042953e-06, -2.5725267831497755e-06, -1.9379803436037306e-06, -3.6732929854052226e-06, 2.5517467781735470e-04, -9.3347103603857312e-04, 8.4734008316511567e-04, 4.6839230295881717e-03, 1.2119215474814010e-02, 2.1590681655832097e-02, 2.7227446948053083e-02, 2.6361372705807143e-02, 2.0661845841153215e-02, 1.2193643990821734e-02, 4.4069054916926198e-03, -2.1457986608822976e-03, -8.2058952193053147e-03, -1.4286053149237754e-02, -1.8831616851752858e-02, -2.1746879025273835e-02, -2.3730040027304930e-02, -2.3839028591575426e-02, -2.3339703270967432e-02, -1.9657943075167897e-02, -1.7175750624868806e-02, -9.0104766646663982e-03, -5.0829925882998148e-03, -2.2997611088552282e-03, -2.0720902426534524e-04, 4.6667417096382452e-04, 7.9043776306842329e-04, 7.8781142881064522e-04, 6.7684578074186908e-04, 5.1649576925924068e-04, 3.7086296094892310e-04, 2.5138452322080550e-04, 1.6076765236679123e-04, 9.2465183919609052e-05, 4.8183443366194028e-05, 1.6214389730580860e-05, -1.2006621180837515e-06, -1.2957454600256085e-05, -1.7983524374911284e-05, -2.0375039139823131e-05, -2.0400782416773604e-05, -1.9273461362091533e-05, -1.7588357095444897e-05, -1.5597678087726587e-05, -1.3582778269381618e-05, -1.1628827387100189e-05, -9.8817076810383723e-06, -8.2298988305830034e-06, -6.8500628504653112e-06, -5.5815783734375589e-06, -4.5093190889936433e-06, -3.5839402228119396e-06, -2.8164199637653446e-06, -2.2464426788752233e-06, -1.8411171157941302e-06, -1.6179644638728860e-06, -1.4299816051024490e-06, -9.0768633852897758e-07, 2.8485385886223648e-07, 2.9589994345581645e-06, 6.5612844086800255e-06, 5.9925138249066251e-06, 3.6081965607556721e-04, -1.0153107400634534e-03, 1.0642594374688369e-03, 5.3371002763106939e-03, 1.3456330311247017e-02, 2.2826024769135089e-02, 2.7285120227393822e-02, 2.5053749425795385e-02, 1.8182360122700275e-02, 8.9765266444589709e-03, 1.3441057223753661e-03, -5.8066762195119193e-03, -1.2065413602404540e-02, -1.7835851918091367e-02, -2.1850040097856988e-02, -2.4648586951470472e-02, -2.5140055287144775e-02, -2.4785103480654186e-02, -2.0791587111777358e-02, -1.7928266984715894e-02, -7.8601334187207092e-03, -4.7789076642258191e-03, -1.2724999500655747e-03, 1.6213300099510684e-04, 7.2129406402600621e-04, 9.0483258973897938e-04, 7.8833396360541486e-04, 6.0421198307656742e-04, 4.1770118292034004e-04, 2.6958561521416398e-04, 1.5857973521751504e-04, 8.2227892579520749e-05, 3.2479737175426549e-05, 3.3806499546311700e-06, -1.3882488733141062e-05, -2.1112504087387145e-05, -2.4337884779379625e-05, -2.3539125768673965e-05, -2.1755292948935717e-05, -1.8935573834753648e-05, -1.6093245449570963e-05, -1.3355057590538705e-05, -1.0875113453235530e-05, -8.7353045427875236e-06, -6.9093204546883599e-06, -5.3929873938649250e-06, -4.1201280761967034e-06, -3.1126004054697604e-06, -2.2637450362087067e-06, -1.6004502337655039e-06, -1.0540663499082815e-06, -6.2453429555866239e-07, -3.0240870389064813e-07, -8.1636889157048881e-08, 2.3888343137185941e-08, 5.7733615470458152e-08, 2.6538146587633439e-07, 9.9176387719733381e-07, 3.6791328328604980e-06, 8.1108675001268804e-06, 2.1685607853183308e-05, 1.1410483460277811e-05, 5.3549931014848506e-04, -1.0634947778380283e-03, 1.3019367109688706e-03, 6.0717515161230751e-03, 1.4772751630316272e-02, 2.3936390879076189e-02, 2.7019751403306577e-02, 2.3517701078079545e-02, 1.5162116929509778e-02, 5.8158429627999664e-03, -2.0066297501204478e-03, -9.2758284162175741e-03, -1.6253784446897679e-02, -2.1324874728206517e-02, -2.4842194176165844e-02, -2.6357805363436973e-02, -2.6218251342543575e-02, -2.2291816460726609e-02, -1.8922806247192878e-02, -7.8720310242676398e-03, -4.7497182679292916e-03, -6.1960125830749823e-04, 3.7721758520370061e-04, 9.6431461854367155e-04, 9.5276130385617513e-04, 7.5484758190980496e-04, 5.2822104053490578e-04, 3.3233912341499227e-04, 1.8669380573674952e-04, 8.8388291791921417e-05, 2.8552218596694958e-05, -4.8210938333533596e-06, -2.1033692270511762e-05, -2.7479298776882404e-05, -2.7615640379483201e-05, -2.5451443961525082e-05, -2.1551957378816833e-05, -1.7815986797074207e-05, -1.4064612215970783e-05, -1.0931176303501862e-05, -8.2611713450506775e-06, -6.1161130265253478e-06, -4.4219319555740774e-06, -3.0979794146010443e-06, -2.0837953159564843e-06, -1.3090316322190716e-06, -7.3659742388126784e-07, -3.0091152374497345e-07, 4.6744607237162068e-09, 2.3278954530808727e-07, 3.9041540329944708e-07, 4.9915757462963757e-07, 5.6874905693648494e-07, 5.9303589688649606e-07, 5.7927014413604685e-07, 6.0076662555599305e-07, 7.8766575237977014e-07, 2.0712830556764194e-06, 5.1335705671694861e-06, 1.3780320760429482e-05, 3.1110808090971571e-05, 4.3904063390882433e-05, 6.4456008693745959e-04, -1.0620692363197543e-03, 1.5771405005572947e-03, 6.8419891686457984e-03, 1.6125997571287007e-02, 2.4753231702930104e-02, 2.6528608103966553e-02, 2.1452131291321647e-02, 1.2101665973860504e-02, 2.5250381885963957e-03, -5.6470689412992936e-03, -1.3263724643565206e-02, -1.9928334443552354e-02, -2.4578869469670778e-02, -2.7148935439687161e-02, -2.7506313944790632e-02, -2.4166788204892920e-02, -2.0326141627882384e-02, -8.9014041837859378e-03, -5.0300171408431656e-03, -4.3667037494379184e-04, 4.8482719883908209e-04, 1.1554463082524172e-03, 9.7707963666700281e-04, 7.3698064925832043e-04, 4.6951424011266259e-04, 2.6545663679232814e-04, 1.2429956216970217e-04, 3.9937972564577112e-05, -5.4530669585446288e-06, -2.6004941467179122e-05, -3.2340306727727139e-05, -3.1348714262069221e-05, -2.6960989744445959e-05, -2.1865726860051675e-05, -1.6720247996275224e-05, -1.2474590647546798e-05, -8.8719294354904345e-06, -6.1635906538317275e-06, -4.0639261923091589e-06, -2.5440557442470493e-06, -1.4441909748720062e-06, -6.7098349163993969e-07, -1.4195072036403151e-07, 2.1180897506582492e-07, 4.3618197801103663e-07, 5.7349375787673056e-07, 6.4147289638888686e-07, 6.7020203860641793e-07, 6.6712474865480509e-07, 6.4698865682891009e-07, 6.2350964419576613e-07, 5.9227078703076195e-07, 5.7287051932297488e-07, 5.4980763704466900e-07, 5.2543444482367526e-07, 7.7088986703675475e-07, 1.2416640580692451e-06, 4.9687141675796177e-06, 1.0127792680334288e-05, 4.5767271052662653e-05, 2.8321134717521957e-05, 9.9154249583269238e-04, -1.1406281618511899e-03, 1.9050876674165940e-03, 7.6541108564049110e-03, 1.7403959663818164e-02, 2.5385626446086301e-02, 2.5546461519766542e-02, 1.9165393901961841e-02, 8.7412889865475796e-03, -6.7619825303288916e-04, -9.5436066979625866e-03, -1.7166321551361829e-02, -2.3471952643738914e-02, -2.7383505074471445e-02, -2.8618514285924559e-02, -2.6266637563402924e-02, -2.1974871227956227e-02, -1.1079232394441240e-02, -5.6502957136473683e-03, -7.2563381326721339e-04, 4.9146565393393517e-04, 1.2533250994176013e-03, 1.0010457399722522e-03, 7.4242413042451547e-04, 4.3236559333816624e-04, 2.2030272282266277e-04, 8.2173595676028822e-05, 8.7551736783074874e-06, -2.5773541785381463e-05, -3.6660067568821108e-05, -3.5916030066754790e-05, -3.0208721426526258e-05, -2.3294112251954135e-05, -1.6949002993529296e-05, -1.1647717296248974e-05, -7.6725218077530028e-06, -4.6918535985562859e-06, -2.6579512718132589e-06, -1.2406325449325112e-06, -3.3835815932588276e-07, 2.3393219437402952e-07, 5.6449037019398480e-07, 7.3740531402567222e-07, 8.0779586058779421e-07, 8.1301547646283777e-07, 7.7996207100257614e-07, 7.2369861586833424e-07, 6.5737076053050316e-07, 5.8637421214560248e-07, 5.1382661435817999e-07, 4.5258826063444705e-07, 3.8955818885304857e-07, 3.6547474338777730e-07, 3.2282488971282532e-07, 3.2426083115702584e-07, 1.9581431513781590e-07, -1.6520908884340305e-07, -6.6629070262031126e-07, -2.2888178563787876e-06, 6.4446369744543372e-07, 3.0531403492387813e-06, 8.5210320281116087e-05, 8.7856440297705285e-04, -1.1031555554896211e-03, 2.2254215202427985e-03, 8.5253591207764684e-03, 1.8560669821985301e-02, 2.5704188158744048e-02, 2.4412973398854856e-02, 1.6429102785816080e-02, 5.4033674392025000e-03, -4.1523149635418199e-03, -1.3191439728865162e-02, -2.1276732523717479e-02, -2.6675012494867631e-02, -2.9322808730748953e-02, -2.8460770420549515e-02, -2.3895286759791079e-02, -1.4296999683322886e-02, -6.5843210416058964e-03, -1.4691116468776686e-03, 4.1080783507322716e-04, 1.2565113295295565e-03, 1.0354500860090582e-03, 7.5916763741951034e-04, 4.1481327226506394e-04, 1.9432613735030104e-04, 5.5533201293463938e-05, -1.0718573051071061e-05, -3.7168641561860367e-05, -4.0865734764500121e-05, -3.5348708956714103e-05, -2.6899190425479673e-05, -1.8848844630146477e-05, -1.2299536561146114e-05, -7.4319214995175652e-06, -4.0843899026132377e-06, -1.8479148398814325e-06, -4.8239325660342873e-07, 3.3959871356072140e-07, 7.6150600657126720e-07, 9.5531230576879087e-07, 9.9669272103859366e-07, 9.5742814645462097e-07, 8.7454117479896925e-07, 7.7359653337144736e-07, 6.6909337880078197e-07, 5.6923093260593811e-07, 4.7703685924117974e-07, 3.9545398981774311e-07, 3.1894637726174633e-07, 2.5861647061457680e-07, 1.8997182875272659e-07, 1.6436807443766244e-07, 9.7192347293030177e-08, 1.3848781796004216e-07, -2.5106083597290494e-08, -2.1516648480389953e-07, -1.4020196756437211e-06, -4.5195545018203098e-06, -1.0338527204434549e-05, -2.7032382483727329e-05, -4.0736130930208201e-05, -1.1365584079967315e-04, 1.6893613456742812e-03, -1.4352757798944821e-03, 2.5567658089940826e-03, 9.2999139165720751e-03, 1.9749636187723435e-02, 2.5699404190634184e-02, 2.2979087962836708e-02, 1.3558514408888389e-02, 2.1219933896519938e-03, -7.9536562460691962e-03, -1.6988303267644583e-02, -2.4735233267078674e-02, -2.9341036236727694e-02, -3.0446373146229049e-02, -2.6254737271334424e-02, -1.8447779964648948e-02, -7.8487283330059120e-03, -2.5674346532081520e-03, 3.2759248246981955e-04, 1.2428909691060714e-03, 1.1266478652811221e-03, 8.0046662693495914e-04, 4.2049511948265273e-04, 1.7956685592206427e-04, 3.4840828833152893e-05, -2.6702854433240065e-05, -4.5843002794563681e-05, -4.3025895987244605e-05, -3.3419285219402160e-05, -2.2959411373688066e-05, -1.4436562300837235e-05, -8.2408691469742969e-06, -4.1238823891428470e-06, -1.5692038429601825e-06, -7.7858831569249318e-08, 6.9581884851134188e-07, 1.0510487452003274e-06, 1.1388811718728020e-06, 1.0965159283294820e-06, 9.8076766064927531e-07, 8.4264491620141858e-07, 7.0161501875801342e-07, 5.7173785147478923e-07, 4.5745385421282377e-07, 3.6086178533062743e-07, 2.7950226722732278e-07, 2.1444931145187668e-07, 1.5610791485876074e-07, 1.1544982418004203e-07, 6.0284808676720064e-08, 4.7978653917434694e-08, -3.3969415015253079e-08, 3.9480881789321839e-08, -1.4693518953531708e-07, 7.0130030878877425e-08, -8.1767175007046132e-07, -1.6641893924285688e-06, -6.5414829404212595e-06, -1.7744389616860135e-05, -3.5365737206104414e-05, -1.3647060209326660e-04, -5.3625267074268804e-05, -1.2020086488340187e-04, -1.1996527566826148e-03, 2.5488337910615569e-03, 1.0216821719341407e-02, 2.1047355234927484e-02, 2.5710215957397461e-02, 2.0975337347383799e-02, 9.4738543768844163e-03, -2.1317042748614790e-03, -1.2897729338869374e-02, -2.1846365719234845e-02, -2.8892468520620870e-02, -3.2195816638980058e-02, -2.9295583444666345e-02, -2.2655620576314612e-02, -7.2827294074438390e-03, -2.7018893876945282e-03, 1.3470984967738219e-03, 1.8163191826183105e-03, 1.5203000558592643e-03, 9.3194816271868156e-04, 4.0376167142615067e-04, 1.1044618904037466e-04, -4.1736586010682371e-05, -8.0804035464580350e-05, -7.6162551274744882e-05, -5.3671465895456689e-05, -3.2460085106325413e-05, -1.6400102225685130e-05, -6.5470709427603233e-06, -1.1168510767965018e-06, 1.3812700883726256e-06, 2.2685835315266328e-06, 2.3414511813374048e-06, 2.0540980963882488e-06, 1.6733200563787479e-06, 1.2847544160836909e-06, 9.5887494489617017e-07, 6.8759387118364976e-07, 4.8142655734292536e-07, 3.2348668647886811e-07, 2.0836978148995600e-07, 1.2462484618933067e-07, 6.6228816960126058e-08, 2.4376057068242057e-08, -8.7133966058042245e-10, -2.3981141227761432e-08, -2.6775321883276693e-08, -5.7765706665963146e-08, -2.6400910812119510e-08, -1.2229401223466663e-07, 4.5383859444397129e-08, -2.6728352489364254e-07, 4.7336071030360666e-07, -6.2762835596448865e-07, 1.7936925766895082e-06, -2.6901395365577264e-06, 2.0664304939610120e-06, -1.3446402916656060e-05, -1.5263151960441361e-05, -4.0612266909988235e-05, -3.9085264272406117e-04, 4.1415196656347103e-03, -2.6986629390305106e-03, 1.9576397709565319e-03, 1.0067119400721677e-02, 2.1937420597393426e-02, 2.6335091028350230e-02, 1.9559953621367310e-02, 6.8438194285765641e-03, -5.5113989028438837e-03, -1.5694727057071728e-02, -2.5362890259312210e-02, -3.1154923322271197e-02, -3.3178176783496965e-02, -2.9500893047008540e-02, -1.3315330548804323e-02, -5.4974179931128256e-03, 1.9437995272838680e-03, 2.9054181295840166e-03, 2.8259098686490773e-03, 1.7793477582950376e-03, 8.6438485406018645e-04, 2.7880928912008950e-04, -3.2883974288695772e-05, -1.2914050880045991e-04, -1.3244065150826937e-04, -9.4630260776331146e-05, -5.5873144152861209e-05, -2.5880539076252214e-05, -7.8750018532624047e-06, 1.4580625561106536e-06, 5.0415778669720551e-06, 5.6571032566741022e-06, 4.9150287642274124e-06, 3.7739873140936464e-06, 2.6753235051685600e-06, 1.7681680890583792e-06, 1.0989613636403286e-06, 6.2139217348392006e-07, 3.0630371990018890e-07, 1.0119793270382815e-07, -2.1728876493237737e-08, -9.2443492679360195e-08, -1.2683017942306807e-07, -1.4096733580437615e-07, -1.3797954241407534e-07, -1.3494686436181513e-07, -1.1192270310891872e-07, -1.2119055865702361e-07, -6.0134937444542014e-08, -1.4557112258412747e-07, 8.1514416425988723e-08, -2.9283242040413493e-07, 7.2104339042099869e-07, -7.2361151449117089e-07, 3.6922217260294821e-06, -2.0355535557473048e-06, 1.5597760066131568e-05, -6.9595769276072084e-06, 5.9462678638527028e-05, -1.3302500520430416e-05, 3.3113781884272584e-04, 2.7032940467472920e-04, -4.9101936592472473e-03, -9.3916159395923682e-04, 1.3255739807594494e-03, 8.7764278401479406e-03, 2.4056541646156157e-02, 2.6764488349983753e-02, 1.9352737456772878e-02, 3.8626823312064573e-03, -7.6201581639290528e-03, -1.7816873869754224e-02, -2.7714954521238622e-02, -3.3315479319779850e-02, -3.3520853217390574e-02, -3.1208971472861502e-02, -9.4449181920196433e-03, -3.7463509266876926e-04, 4.4661994578010997e-03, 4.6550627176945780e-03, 3.4397103903778328e-03, 1.8739156359087426e-03, 7.5963671290701917e-04, 9.8662900906907464e-05, -1.6554087864162001e-04, -2.2251627625770494e-04, -1.7809542099312715e-04, -1.1349460879227571e-04, -5.7250406261666678e-05, -2.0413405875982504e-05, -1.0297438618814270e-08, 8.6792584525745980e-06, 1.0812111248193618e-05, 9.7423093996344690e-06, 7.5877118597481030e-06, 5.3639414798398177e-06, 3.5034742540875768e-06, 2.1064207036645965e-06, 1.1282278592310291e-06, 4.8489293770492825e-07, 8.2889732277643957e-08, -1.4980449395025908e-07, -2.7227475222005304e-07, -3.2327581029473196e-07, -3.3270086092877793e-07, -3.1549511317167933e-07, -2.9015415134968359e-07, -2.4980663069183728e-07, -2.2849322375145809e-07, -1.6579177999909156e-07, -1.9589122722887820e-07, -3.4984192385026369e-08, -2.7197981778727398e-07, 3.8924644563814725e-07, -6.7346431637665960e-07, 2.4134552551891703e-06, -2.2140519239793877e-06, 1.1905820741626993e-05, -9.2615481396465110e-06, 5.3672279289887492e-05, -4.2016026074297858e-05, 2.3623403242304351e-04, -3.1830851458548685e-04, 1.8894039448862053e-03};
static const casadi_real casadi_c1[102] = {-2.5000000000000000e-01, -2.5000000000000000e-01, -2.5000000000000000e-01, 2.5000000000000000e-01, 5.0000000000000000e-01, 7.5000000000000000e-01, 1., 1.2500000000000000e+00, 1.5000000000000000e+00, 1.7500000000000000e+00, 2., 2.2500000000000000e+00, 2.5000000000000000e+00, 2.7500000000000000e+00, 3., 3.2500000000000000e+00, 3.5000000000000000e+00, 3.7500000000000000e+00, 4., 4.2500000000000000e+00, 4.5000000000000000e+00, 4.7500000000000000e+00, 5., 5.2500000000000000e+00, 5.5000000000000000e+00, 5.7500000000000000e+00, 6., 6.2500000000000000e+00, 6.5000000000000000e+00, 6.7500000000000000e+00, 7., 7.2500000000000000e+00, 7.5000000000000000e+00, 7.7500000000000000e+00, 8., 8.2500000000000000e+00, 8.5000000000000000e+00, 8.7500000000000000e+00, 9., 9.2500000000000000e+00, 9.5000000000000000e+00, 9.7500000000000000e+00, 10., 1.0250000000000000e+01, 1.0500000000000000e+01, 1.0750000000000000e+01, 11., 1.1250000000000000e+01, 1.1500000000000000e+01, 1.1750000000000000e+01, 12., 1.2250000000000000e+01, 1.2500000000000000e+01, 1.2750000000000000e+01, 13., 1.3250000000000000e+01, 1.3500000000000000e+01, 1.3750000000000000e+01, 14., 1.4250000000000000e+01, 1.4500000000000000e+01, 1.4750000000000000e+01, 1.5250000000000000e+01, 1.5250000000000000e+01, 1.5250000000000000e+01, -6., -6., -6., -6., -4., -3., -2., -1., 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 26., 26., 26., 26.};
static const casadi_real casadi_c2[2016] = {6.3335470708721997e-04, 6.1150673297931564e-04, 6.2422810759059344e-04, 6.5730167402447718e-04, 6.8418448594909694e-04, 7.3672892715202277e-04, 8.3119516953588496e-04, 1.0135076523776231e-03, 1.3878761128653268e-03, 1.8949629375751655e-03, 2.3784974072990420e-03, 2.9514881781576921e-03, 3.5003027362175559e-03, 3.8310147916546487e-03, 3.9120321390095428e-03, 4.0197798535574272e-03, 3.9668086092183308e-03, 4.1938678389345299e-03, 4.4107977219149802e-03, 4.6520557376614202e-03, 5.0113929315810796e-03, 5.2765363412103222e-03, 5.3980530327365633e-03, 5.3080941841927021e-03, 4.6886882823408138e-03, 3.6170846285045188e-03, 1.9199061378254445e-03, 1.8909239998659566e-03, 1.9269962659976547e-03, 2.1009437971552247e-03, 2.3925691433898111e-03, 2.6645949515526623e-03, 2.7650195450124593e-03, 3.1261170845991587e-03, 3.0810695071302047e-03, 3.3951473378864352e-03, 3.3217422163398097e-03, 3.6790535133049140e-03, 3.4810156099230605e-03, 3.8401929505466406e-03, 3.8630885721894770e-03, 4.0577306750040898e-03, 4.2109426177245057e-03, 4.2917279507813447e-03, 4.6494112647565700e-03, 4.6881911879146296e-03, 5.0409751594756511e-03, 5.0301262381065685e-03, 5.4594267181322514e-03, 5.3268136670049406e-03, 5.5786043759206800e-03, 5.2676360360296246e-03, 5.3565941736389159e-03, 5.1679410092911621e-03, 5.0259760600118919e-03, 4.7817814527440381e-03, 4.4615558395923755e-03, 4.0119577408329592e-03, 3.4094898610877904e-03, 3.2424088134126597e-03, 1.7333495699939005e-03, 3.1287825047437668e-03, -1.3211254705199592e-05, 6.2298029738573320e-04, 6.3788853675502354e-04, 6.3224361914921931e-04, 6.6840136046131802e-04, 7.0714473069940381e-04, 7.7594665903400685e-04, 8.9453948403647320e-04, 1.1068741889045518e-03, 1.4396189503515094e-03, 1.8730834258903028e-03, 2.3797095476583742e-03, 2.8792264232425533e-03, 3.3917006623426210e-03, 3.7724465758194534e-03, 4.0253423559196318e-03, 4.0824367708219358e-03, 4.2041846402014714e-03, 4.2415801771192932e-03, 4.5275026099221571e-03, 4.7517633427407932e-03, 5.0515592178017599e-03, 5.3898545927451927e-03, 5.5047940154344874e-03, 5.5854691266326653e-03, 5.1133840421625013e-03, 4.8107093863684613e-03, 3.1628876912951215e-03, 2.4491548611118991e-03, 2.2418860733834367e-03, 2.3002369652120325e-03, 2.4852067444526005e-03, 2.7712576984266213e-03, 2.8609312196830883e-03, 3.1491034212577651e-03, 3.3052680141495844e-03, 3.4011102627240775e-03, 3.6355027992305416e-03, 3.6866526337064123e-03, 3.9292028633290885e-03, 3.9731109351767366e-03, 4.2097380605478733e-03, 4.3748795650777293e-03, 4.4971388164915180e-03, 4.6936632246041554e-03, 4.8235307606827628e-03, 5.1410734334898962e-03, 5.2940581256574522e-03, 5.5347537692836055e-03, 5.6711647197937743e-03, 5.7826964291684546e-03, 5.5412421618394603e-03, 5.4214691481222132e-03, 5.1230959757616826e-03, 5.0516906228920367e-03, 4.6849985011046761e-03, 4.4581230378383432e-03, 4.0244001622032014e-03, 3.2949659252591848e-03, 2.6279439581053535e-03, 1.8650793384009925e-03, 1.5088349338228714e-03, 9.4471994205913351e-04, 1.3750577523809692e-03, 5.9224916564599214e-04, 6.0585843855131042e-04, 6.1846853611801961e-04, 6.4714300304362588e-04, 6.8178263755998107e-04, 7.3784143693179666e-04, 8.3745330231564706e-04, 1.0215057920793618e-03, 1.3416647089695682e-03, 1.8186342832704231e-03, 2.3654259847574475e-03, 2.9512371623109197e-03, 3.4795481589265029e-03, 3.8283094543283339e-03, 3.9415718629563917e-03, 4.0000357674603963e-03, 3.9654705368229182e-03, 4.1494640669867480e-03, 4.3393269047564756e-03, 4.6293682295857411e-03, 4.9516523407241581e-03, 5.1769892432134701e-03, 5.3026626240285576e-03, 5.0240618301174295e-03, 4.4089849758553734e-03, 2.9730271150414933e-03, 1.9602366043131245e-03, 1.5587554840844065e-03, 1.6601716754812423e-03, 1.9230934003788558e-03, 2.2781960996991688e-03, 2.5401606763691548e-03, 2.8064296874911951e-03, 2.9841112869247316e-03, 3.1014364739422387e-03, 3.2775275735016027e-03, 3.3090128418430814e-03, 3.4812418007860030e-03, 3.4595161270731326e-03, 3.6465999233793213e-03, 3.7520360036646348e-03, 3.8601143672233017e-03, 4.0628069863981250e-03, 4.1739670274751201e-03, 4.4496582880624337e-03, 4.5630001312061789e-03, 4.8047453358719336e-03, 4.9418421526343272e-03, 5.1896723297054480e-03, 5.2478477695378951e-03, 5.4363084115944694e-03, 5.3302288883772565e-03, 5.4050132103673322e-03, 5.2571457655412063e-03, 5.1968625244996061e-03, 4.9316583429562686e-03, 4.6658113102867058e-03, 4.3429489764758369e-03, 3.9388993365385037e-03, 3.5528054149896295e-03, 2.8235675062803344e-03, 2.3187898352400134e-03, 1.5743542125947170e-03, 5.8969013095971608e-04, 6.0009887707817384e-04, 6.0854129926430104e-04, 6.3445437893516927e-04, 6.6355473190347555e-04, 7.1256552756419856e-04, 8.0820800964664496e-04, 9.9586854003750128e-04, 1.3447118154365023e-03, 1.8406407910660201e-03, 2.4200790369463300e-03, 3.0003876387458654e-03, 3.4803026356604837e-03, 3.7294667504467957e-03, 3.8042840114196064e-03, 3.7658578484447425e-03, 3.8495597351476535e-03, 3.9710223119091559e-03, 4.1874804511264976e-03, 4.4306665263393816e-03, 4.6039282198137299e-03, 4.6903190585457777e-03, 4.4767722529509141e-03, 3.8395997628854206e-03, 2.7792808245250822e-03, 1.5914059038668327e-03, 9.6772999820378403e-04, 7.5736609511876940e-04, 1.0179904422332048e-03, 1.5552724247900329e-03, 1.9138284803981997e-03, 2.2815808233980633e-03, 2.5098007787810600e-03, 2.6239601516564320e-03, 2.7524013988172447e-03, 2.7105823658819805e-03, 2.8892744073588245e-03, 2.8443772871518669e-03, 2.9704701481280335e-03, 3.1363719185982727e-03, 3.2397432173731228e-03, 3.3557055170970809e-03, 3.4157304965460739e-03, 3.6961478719267429e-03, 3.7919355034454240e-03, 3.9814204879092853e-03, 4.1088919697198391e-03, 4.3887151433881083e-03, 4.4291911722684173e-03, 4.7005349277719106e-03, 4.6851389074348271e-03, 4.9764357003667693e-03, 4.9677406492852419e-03, 5.1292162313959413e-03, 5.1176100165873477e-03, 5.1875809407183598e-03, 5.0836308285049352e-03, 4.9046138603272456e-03, 4.7268431381353448e-03, 4.4373030807640535e-03, 4.1207211685947848e-03, 3.9758457517797066e-03, 4.1377766935139738e-03, 5.9038750630915687e-04, 5.9855267746160117e-04, 6.0546960928190788e-04, 6.2423269459794270e-04, 6.4854976791200395e-04, 6.9490969520677459e-04, 7.9422017880266278e-04, 1.0014886187204404e-03, 1.3802473682415651e-03, 1.9074605606083529e-03, 2.4745459356618326e-03, 3.0402652024850846e-03, 3.4133117117927832e-03, 3.5614683482873902e-03, 3.5833049864744324e-03, 3.5768191155797699e-03, 3.6546449709513179e-03, 3.7784908188241914e-03, 3.9114646715120785e-03, 3.9982252404077434e-03, 4.0112808325411878e-03, 3.7808325248926827e-03, 3.1113214224140623e-03, 2.3081044498433206e-03, 1.0082885846557227e-03, 2.9624902215287519e-04, -6.1860324934270849e-05, 1.6050063898237488e-05, 3.9299237446221991e-04, 7.9603867167270248e-04, 1.3111803354425577e-03, 1.5333460697359580e-03, 1.7685751690509968e-03, 1.9110229651044461e-03, 2.0185620459665307e-03, 2.2122632982825505e-03, 2.1259137669342038e-03, 2.3864838315965364e-03, 2.5107369698573120e-03, 2.5245737711937985e-03, 2.5966505614979513e-03, 2.7597561438810203e-03, 2.8883905934084866e-03, 2.9876868921444727e-03, 3.1540542439146974e-03, 3.3035296473682696e-03, 3.4251553958060538e-03, 3.4930870430412500e-03, 3.7328021626073481e-03, 3.7798663643879467e-03, 4.0316690565501377e-03, 4.0488945581168174e-03, 4.2587681644267704e-03, 4.3063231551351902e-03, 4.5137579279173681e-03, 4.5470994984527485e-03, 4.6488249563598327e-03, 4.7122844916086034e-03, 4.7430522818066589e-03, 4.7855860565842265e-03, 4.6388645900832118e-03, 4.6023590388818173e-03, 4.5542982877571610e-03, 5.9704146946057413e-04, 6.0162711038784164e-04, 6.0421706890151101e-04, 6.1692076467919060e-04, 6.3684068726935564e-04, 6.8400674142369503e-04, 7.9528920722033662e-04, 1.0326862688492299e-03, 1.4470582587127433e-03, 1.9824248654033670e-03, 2.5537952299924012e-03, 3.0236054433621720e-03, 3.2869183534237657e-03, 3.3728044038419738e-03, 3.3456754726679389e-03, 3.3705011269446541e-03, 3.4342397949616993e-03, 3.4731183114762934e-03, 3.5076475489607545e-03, 3.4235073856277026e-03, 3.1069787852928549e-03, 2.4433819424698328e-03, 1.8039210253872340e-03, 4.8967246910543161e-04, -2.6023117137224938e-04, -7.6117871284325789e-04, -8.3245964600343891e-04, -6.8437275881770565e-04, -3.8679859516824178e-04, -4.4565718341965654e-05, 1.6355323595225457e-04, 4.5478220235053990e-04, 6.5616149152684933e-04, 9.0487890602623106e-04, 1.0712754827588572e-03, 1.1313177922739545e-03, 1.4495549715743822e-03, 1.5501844806346185e-03, 1.7309877303414017e-03, 1.8308430708542517e-03, 1.9513263493110417e-03, 2.0239524340282741e-03, 2.1333134599613376e-03, 2.1824883918749108e-03, 2.3557246489150363e-03, 2.4068761845956813e-03, 2.5604597709484658e-03, 2.6152855548425974e-03, 2.6785359543883627e-03, 2.8727096757909243e-03, 2.8462921949227137e-03, 3.1234112939145832e-03, 3.0587098677410038e-03, 3.3199363144817522e-03, 3.3062758052194059e-03, 3.4677183381734179e-03, 3.5520557666460298e-03, 3.6900985478829085e-03, 3.7547364236109552e-03, 3.7719382515691586e-03, 3.8404129747734283e-03, 3.9015490495579400e-03, 3.9350406851240520e-03, 6.0237066881035396e-04, 6.0356917944363094e-04, 6.0303156903059214e-04, 6.0891510630986436e-04, 6.2664389531219989e-04, 6.7706887610219802e-04, 8.0461039276919812e-04, 1.0729877776295051e-03, 1.5295680420250157e-03, 2.0604116690073407e-03, 2.5991685050234734e-03, 2.9856399859018029e-03, 3.1400587588418308e-03, 3.1658470156276236e-03, 3.1413212682711855e-03, 3.1608218358581824e-03, 3.1220924131694083e-03, 3.0866861613536994e-03, 2.8867467943953368e-03, 2.5456707015386049e-03, 1.9414752424925102e-03, 1.3671299135297882e-03, 1.8814927128582570e-04, -6.1127217566273040e-04, -1.1887294034049478e-03, -1.4804833384838845e-03, -1.5201670007800872e-03, -1.3970275442721086e-03, -1.3383073093780756e-03, -1.2177590358165707e-03, -1.0694460279529333e-03, -8.7005306672313654e-04, -6.4979094997394404e-04, -4.9937338159222050e-04, -2.4825877190746970e-04, 1.6866089215979152e-05, 1.7941976633564782e-04, 3.2544141008806343e-04, 4.9400311995852902e-04, 7.0360344189154822e-04, 8.8088669325397939e-04, 1.0135097243224520e-03, 1.1237404274933444e-03, 1.2577736546372023e-03, 1.1734930312014072e-03, 1.4051281944796393e-03, 1.3628198626044960e-03, 1.4605647065776134e-03, 1.5707985629469928e-03, 1.5037794073256422e-03, 1.6703067753126161e-03, 1.5013536283994891e-03, 1.7927330739561306e-03, 1.6689864820071398e-03, 1.8116250722325852e-03, 1.8984034047206562e-03, 1.9174764198908560e-03, 1.9944255428154950e-03, 2.0219286518715629e-03, 1.9980176405233439e-03, 2.2176803895432445e-03, 2.2135299538476420e-03, 2.2838759911402492e-03, 6.0416528507294381e-04, 6.0379945796566574e-04, 5.9725345222513652e-04, 6.0013060326948118e-04, 6.1589639742864240e-04, 6.7266835292051699e-04, 8.1698313291205492e-04, 1.1261533325866114e-03, 1.5972364740051530e-03, 2.1354781887251706e-03, 2.6251695998839794e-03, 2.9095114926214229e-03, 2.9923389552332924e-03, 2.9548167343828244e-03, 2.9363168224982097e-03, 2.8601879279233494e-03, 2.7643650923271160e-03, 2.4883519984664898e-03, 2.1250636350592100e-03, 1.5299740639298509e-03, 1.0574439175328743e-03, 5.3424243736333032e-05, -8.3375336249714993e-04, -1.5253949134563516e-03, -1.9334266671494627e-03, -2.1119191584704766e-03, -2.2943220211204818e-03, -2.3496926420227826e-03, -2.3198552198907124e-03, -2.3458878526908256e-03, -2.2276611023376719e-03, -2.1174500964882548e-03, -1.9692655721777821e-03, -1.7700540546561339e-03, -1.6509609620378243e-03, -1.4944790975684949e-03, -1.3316290150781687e-03, -1.1257672132763755e-03, -9.8109876652160283e-04, -8.5125681491809296e-04, -7.1910162093688501e-04, -5.9753858104562990e-04, -4.5358124032738451e-04, -4.1326458237902347e-04, -2.2057077488692872e-04, -3.2719320537794028e-04, -2.2827991821438437e-04, -1.9794494142030827e-04, -2.7880245299224254e-04, -1.1626850342222328e-04, -2.6171639150575354e-04, -1.6090079622380765e-04, -3.0691593039947410e-04, -2.3595783361896050e-04, -3.1631663806842847e-04, -3.7008702245079628e-04, -2.7611149734290200e-04, -3.6617826444813178e-04, -3.8425341400396412e-04, -2.9024989336923906e-04, -3.5335643467011152e-04, -5.5007048464648239e-05, 7.1357874698550761e-05, 6.0405823830848773e-04, 6.0151125412477233e-04, 5.9085883537348706e-04, 5.8958440938375149e-04, 6.0614098374193060e-04, 6.6865466860186861e-04, 8.3690241884115495e-04, 1.1735750410551762e-03, 1.6695710247474349e-03, 2.1821076226643150e-03, 2.5943677568403857e-03, 2.7818072021257960e-03, 2.8169403018861311e-03, 2.7462582709248048e-03, 2.6811936273944473e-03, 2.5206875901080325e-03, 2.2258565207853645e-03, 1.8241287550504470e-03, 1.2265527989622077e-03, 7.9147075053762062e-04, -3.5658631405394159e-05, -9.8170649439451030e-04, -1.7470691329038307e-03, -2.2379902769959631e-03, -2.6189071822270149e-03, -2.9258759997984884e-03, -3.0576754376253346e-03, -3.2158748575516621e-03, -3.2797640042426385e-03, -3.2816059626163963e-03, -3.2676057628898483e-03, -3.2297526171358726e-03, -3.1922020679138463e-03, -3.1247327058228774e-03, -3.0334535426788725e-03, -2.9282519209530150e-03, -2.8398259974865211e-03, -2.8023977074471407e-03, -2.7537316923805233e-03, -2.6742357915078979e-03, -2.6135711942965878e-03, -2.5453574367786461e-03, -2.5416437928071633e-03, -2.4740713055004387e-03, -2.5531469692925898e-03, -2.4739964818310325e-03, -2.5558258742961817e-03, -2.6128414917177475e-03, -2.5540430171875211e-03, -2.7535927347472483e-03, -2.6681289755708382e-03, -2.8030485282971515e-03, -2.8135808925972006e-03, -2.9350213550468143e-03, -2.9570052664720896e-03, -2.9673315699432733e-03, -3.1700886764241890e-03, -3.1208198125098480e-03, -3.2015483593771238e-03, -3.2320029187682918e-03, -3.1994391830605807e-03, -3.0202249564415806e-03, -2.8962742087600274e-03, 6.0316231225246517e-04, 5.9833096871287315e-04, 5.8474516139732369e-04, 5.7921972335617331e-04, 5.9578165976264131e-04, 6.7085142850391473e-04, 8.5827059172553961e-04, 1.2382884147045334e-03, 1.7241370575231778e-03, 2.2267020069082766e-03, 2.5509401589796227e-03, 2.6543751499652109e-03, 2.6150481735801867e-03, 2.5393496157208872e-03, 2.3515176536708024e-03, 2.0520495443600781e-03, 1.6264035480252348e-03, 1.0468294352346669e-03, 5.9244439052699716e-04, -1.7193715733380965e-04, -1.0498241061370622e-03, -1.9106686795882649e-03, -2.4984866335657774e-03, -3.0117288656836688e-03, -3.4100082609193477e-03, -3.6265938575374135e-03, -3.8316724701806665e-03, -3.9257330730706128e-03, -4.0544349129478380e-03, -4.0845739598016351e-03, -4.1482316780624348e-03, -4.1915450811625954e-03, -4.2435290434087655e-03, -4.2821698867288524e-03, -4.3319189327093166e-03, -4.3545302745763778e-03, -4.3948097546624570e-03, -4.4575934661001335e-03, -4.5147450577198850e-03, -4.5832469016328578e-03, -4.6485124436602271e-03, -4.7096026521002629e-03, -4.7953954258569895e-03, -4.9306783150281433e-03, -4.9832942006780567e-03, -5.1528817911762961e-03, -5.2087239803069556e-03, -5.2746588876141087e-03, -5.4402272526213116e-03, -5.4856981582569117e-03, -5.6175977991638412e-03, -5.6587566043355304e-03, -5.7895607701089133e-03, -5.8231801068975401e-03, -5.8348554541926972e-03, -5.8766223363664119e-03, -5.7385528444894099e-03, -5.8344372033094696e-03, -5.7328592019813742e-03, -5.6456622279155745e-03, -5.5569271840244325e-03, -5.8447717139144297e-03, -5.7943230226686583e-03, 6.0119551429996341e-04, 5.9416344279041109e-04, 5.7888037796437544e-04, 5.6791014596260358e-04, 5.8816501619145083e-04, 6.7309602067835636e-04, 8.9248717952582386e-04, 1.2925784431115413e-03, 1.7888416319680866e-03, 2.2310474443477946e-03, 2.4781464915569693e-03, 2.5181101312188314e-03, 2.4144758187652562e-03, 2.2535461995336209e-03, 1.9504312424901346e-03, 1.5121068017868791e-03, 9.2723779222606689e-04, 4.3206381547281070e-04, -1.8051585767001055e-04, -9.1662247455952250e-04, -1.9649910438162554e-03, -2.6181171061783887e-03, -3.3103737156491980e-03, -3.7639732077562882e-03, -4.0410132941088028e-03, -4.3058972591019512e-03, -4.4662380862735204e-03, -4.6403103300365900e-03, -4.6965465453945726e-03, -4.8616767526909604e-03, -4.9604252055244352e-03, -5.0808122569414998e-03, -5.2228000949649037e-03, -5.3714565494514255e-03, -5.5203763258168601e-03, -5.6800432342098695e-03, -5.8691150600906627e-03, -6.0188476506965044e-03, -6.2140511406008417e-03, -6.4025980619679332e-03, -6.5937824057263963e-03, -6.7802577569318553e-03, -6.9855668983196360e-03, -7.1449834815774278e-03, -7.3535253447265941e-03, -7.4857443041462801e-03, -7.6244112247375213e-03, -7.7792705648317487e-03, -7.8357301929337549e-03, -7.8658803401451746e-03, -7.8710173192454748e-03, -7.8959381943188092e-03, -7.8541618147603062e-03, -7.7514991763468107e-03, -7.5911685649573072e-03, -7.3488367144258354e-03, -7.1860188549586835e-03, -6.8573263740733942e-03, -6.6146514025858987e-03, -6.3928530473625761e-03, -5.7728926611490330e-03, -5.5846229132886904e-03, -6.3542104392443986e-03, 5.9843284374826427e-04, 5.8963220121430442e-04, 5.7081628236106078e-04, 5.5813139214866241e-04, 5.7963257472611919e-04, 6.8259625412105292e-04, 9.2357736436403381e-04, 1.3594202330750680e-03, 1.8226390319848809e-03, 2.2254159796406166e-03, 2.3602882682825059e-03, 2.3506804060606998e-03, 2.2085883409601118e-03, 1.9276893467203293e-03, 1.4678423030691362e-03, 9.1627141763270942e-04, 3.2733698010541795e-04, -1.2761863860509537e-04, -8.7692548500811762e-04, -1.9429256350371182e-03, -2.6801619992960352e-03, -3.4306822891031902e-03, -3.8947303645819609e-03, -4.2733586736546439e-03, -4.6426115859719355e-03, -4.8410137436801365e-03, -5.0392724142826820e-03, -5.1655321218746983e-03, -5.3696064465963006e-03, -5.5162176313531472e-03, -5.7172795669709064e-03, -5.9452779034081596e-03, -6.1802653766315913e-03, -6.4391783682351197e-03, -6.6874938421577351e-03, -6.9544069980508952e-03, -7.2039372182234052e-03, -7.5078671112867867e-03, -7.7629128500513282e-03, -8.0346778929249636e-03, -8.2619945175896221e-03, -8.5082821648279142e-03, -8.6722363597803269e-03, -8.8533927532457521e-03, -8.9140935425636170e-03, -8.9979112575883924e-03, -9.0338495115688516e-03, -8.9394677652684575e-03, -8.8411400078064056e-03, -8.6347372099677081e-03, -8.3958232014364528e-03, -8.1317648501606186e-03, -7.8376447733949847e-03, -7.4456222085575218e-03, -6.7680142132933857e-03, -6.1192944202928916e-03, -5.3746739372899054e-03, -4.7275738971705658e-03, -4.0280651369405856e-03, -3.3498130696424091e-03, -2.8889670658916217e-03, -2.5839472692174509e-03, -1.3714018266713823e-03, 5.9297848465086900e-04, 5.8328758153876857e-04, 5.6017900642882541e-04, 5.4695616560449141e-04, 5.7522398559758069e-04, 6.8927283936675611e-04, 9.6724516879713972e-04, 1.3958108573793419e-03, 1.8789564965144556e-03, 2.1667935218304228e-03, 2.2773737398024199e-03, 2.1560377903017888e-03, 1.9506210960660644e-03, 1.5088002630705560e-03, 9.9024976905663642e-04, 3.2108099011567831e-04, -1.0026836463280370e-04, -8.8480546212160727e-04, -1.7104940015214981e-03, -2.6495627658002507e-03, -3.4730738102084213e-03, -3.9913505764064203e-03, -4.4798193284105586e-03, -4.8329724590042006e-03, -5.0309302888011179e-03, -5.3059561863747218e-03, -5.4771312010128970e-03, -5.7149827997385327e-03, -5.9573325726125226e-03, -6.2263210157306806e-03, -6.5252975208844877e-03, -6.8468444569852668e-03, -7.1447972937014742e-03, -7.4691190620098241e-03, -7.8001422759853591e-03, -8.1135228273226008e-03, -8.4321383859674928e-03, -8.6876417481428457e-03, -8.9368101009513409e-03, -9.1034453097945216e-03, -9.2322786210545828e-03, -9.2899104325884704e-03, -9.2921344453581797e-03, -9.1671175355768197e-03, -9.0027041484452459e-03, -8.7201519454542728e-03, -8.3963695884640907e-03, -8.1182946225070423e-03, -7.4052206181883240e-03, -6.6700572088013990e-03, -5.8763505429528917e-03, -5.0716955729216435e-03, -4.3035200720858216e-03, -3.6079986153660527e-03, -3.2147505542089688e-03, -2.7852784256869388e-03, -2.4137137208710244e-03, -2.0111369085744277e-03, -1.6493766738930583e-03, -1.3416204714785775e-03, -9.4470032845912397e-04, -4.5503321912823854e-04, -5.2329220201478388e-04, 5.8491034132802933e-04, 5.7609193850477469e-04, 5.4839356420512998e-04, 5.3782675681205219e-04, 5.7013468212417998e-04, 7.0466687257267173e-04, 1.0020644210553334e-03, 1.4579069681397386e-03, 1.8700650494125996e-03, 2.1275943976191564e-03, 2.1301348144949980e-03, 1.9676513064266488e-03, 1.6011346946617142e-03, 1.1060658282507838e-03, 4.1402915302525545e-04, -6.8069570756348896e-05, -7.2095271662351440e-04, -1.4085007180187833e-03, -2.5335037567007015e-03, -3.3529754155069563e-03, -3.9636179433834504e-03, -4.5464552958550189e-03, -4.8914652996380897e-03, -5.1782970621221877e-03, -5.5100963024054747e-03, -5.7114375024740136e-03, -6.0358105425205241e-03, -6.3127432741458961e-03, -6.6403554193075337e-03, -7.0006808518028041e-03, -7.3650191160662612e-03, -7.7109865921377030e-03, -8.0783081841755526e-03, -8.4147705704300524e-03, -8.6878736502789648e-03, -8.9579403032293836e-03, -9.0865167892878185e-03, -9.1874455842988444e-03, -9.1447713288757611e-03, -9.0219934341926981e-03, -8.7806245654078220e-03, -8.4436305814750770e-03, -8.0742378245921478e-03, -7.4019083825430116e-03, -6.5227208705407238e-03, -5.6471551036296058e-03, -4.7833337688098091e-03, -3.8708232214412406e-03, -3.3658874836149755e-03, -2.8763972140775614e-03, -2.4267036622293960e-03, -1.9875389545279658e-03, -1.5849827928410790e-03, -1.2717773790804758e-03, -9.9257354464354387e-04, -8.0409317244090127e-04, -6.1502973366054682e-04, -4.5402958740705778e-04, -2.9273930981042528e-04, -1.4477867444359958e-04, 4.2738247028153531e-05, 1.7018895023949727e-04, 4.4728434617674628e-04, 5.7725948413534997e-04, 5.6634148771935074e-04, 5.3949304591432122e-04, 5.2711555189947218e-04, 5.6995043769952555e-04, 7.1634642967216729e-04, 1.0533045805647678e-03, 1.4867603583499332e-03, 1.8861236428428657e-03, 2.0324518290121586e-03, 1.9531923172311089e-03, 1.7069702547988716e-03, 1.2509999426392332e-03, 6.1925402075605623e-04, 1.0998060986824876e-05, -5.5094045349288190e-04, -1.3041127713184081e-03, -2.3092606878026140e-03, -3.2033964097914411e-03, -3.8952079823441968e-03, -4.4936278199771973e-03, -4.8924378597202597e-03, -5.2736057080426044e-03, -5.6121192778260248e-03, -5.9006708215195158e-03, -6.2411819201311156e-03, -6.5781863491484391e-03, -6.9530396949573706e-03, -7.3530201153964719e-03, -7.7367520934192822e-03, -8.1088408665250210e-03, -8.4315703524639081e-03, -8.6986461589145733e-03, -8.8423551445217258e-03, -8.9326944572008030e-03, -8.7791777456184671e-03, -8.6006491674074387e-03, -8.1771743337999657e-03, -7.7472825995436052e-03, -6.9540916694470489e-03, -5.9576776783016490e-03, -4.9766313927079135e-03, -3.9720592552163524e-03, -3.2501797614055204e-03, -2.7111265492676694e-03, -2.1879075361106305e-03, -1.6969150359888287e-03, -1.3184393521649038e-03, -9.6154879806734908e-04, -7.1769653569792372e-04, -4.9934048375416804e-04, -3.0464511627195472e-04, -1.3686847511963011e-04, -3.4515162505150115e-06, 6.4572548082808133e-05, 1.1636888021374168e-04, 1.4397720903621932e-04, 1.7402434380758770e-04, 1.9653846464230007e-04, 2.2021335226267208e-04, 2.5674244409967025e-04, 3.4545392421897274e-04, 2.5407473205065102e-04, 5.6497065333384507e-04, 5.5576119632278626e-04, 5.2941795979473058e-04, 5.1689901450528881e-04, 5.6808547305456890e-04, 7.3994144258396517e-04, 1.0898637125260537e-03, 1.5268752894669300e-03, 1.8657256801624840e-03, 1.9302885876274975e-03, 1.7769812188737841e-03, 1.4247098320446586e-03, 8.3723624113760109e-04, 1.6640018472253298e-04, -4.0772135886595062e-04, -1.1072965158675924e-03, -1.9250197846182801e-03, -2.9551821197115954e-03, -3.7248344985995399e-03, -4.3395864555006436e-03, -4.8791791273799928e-03, -5.3241852177935006e-03, -5.6644553951559970e-03, -6.0441122457636082e-03, -6.3718199097052772e-03, -6.7889527263513688e-03, -7.1728781972668458e-03, -7.5967723209796369e-03, -7.9440152891132147e-03, -8.2702436739349357e-03, -8.4804604461218777e-03, -8.5578250047168274e-03, -8.4073712773833787e-03, -8.1608660441528473e-03, -7.6443746008999416e-03, -7.1722684678878872e-03, -6.0083973476268409e-03, -4.9480671744175208e-03, -3.7837236539010055e-03, -2.9679202968831715e-03, -2.3523761608559728e-03, -1.7698564804887703e-03, -1.2966142665295451e-03, -8.8885381996941138e-04, -5.7053639398538540e-04, -3.2248362208666650e-04, -1.1440735244525415e-04, 6.7599920634550800e-05, 1.6663429540034549e-04, 2.3832063153444354e-04, 2.8156215062756940e-04, 3.1500478505184647e-04, 3.3800433893648547e-04, 3.4357135454525425e-04, 3.4140451494390247e-04, 3.2171057026852897e-04, 3.0139708288459211e-04, 2.7716660502526738e-04, 2.5686239932021525e-04, 2.3820301834922807e-04, 2.2559914998818105e-04, 1.9796895467494083e-04, 2.2533362929406939e-04, 5.5565617331724583e-04, 5.4542624371766747e-04, 5.1686573032178919e-04, 5.0970233982472121e-04, 5.7133304315594088e-04, 7.6248280318644800e-04, 1.1478241514128878e-03, 1.5575176462192426e-03, 1.8164574007493335e-03, 1.8137291650249660e-03, 1.5737839876860532e-03, 1.0985380901515837e-03, 4.4197259398640054e-04, -2.5973484992547480e-04, -8.1989991310368188e-04, -1.6645080337710574e-03, -2.6137843288790777e-03, -3.5091685215595386e-03, -4.1690434199482401e-03, -4.7653578370027774e-03, -5.2472938072947450e-03, -5.6689664953658847e-03, -6.0899343837293660e-03, -6.4604286117841553e-03, -6.9226017057131412e-03, -7.2980918282515642e-03, -7.6801375277969486e-03, -7.9880022352489220e-03, -8.1592008602559239e-03, -8.1171314732589924e-03, -7.8427191102526054e-03, -7.3822438724235042e-03, -6.8159088976304291e-03, -5.6335838101603019e-03, -4.4661836294249968e-03, -3.1394804103784622e-03, -2.4807298351436202e-03, -1.7644294660073274e-03, -1.2355282342149578e-03, -7.6268212375400486e-04, -4.0735664595491802e-04, -1.4293648340718622e-04, 7.4723276105511782e-05, 2.1605154433500490e-04, 3.0254380714606662e-04, 3.5895738959734194e-04, 3.9614521232199363e-04, 4.0833877904144285e-04, 4.1406394074362124e-04, 3.9882263224321081e-04, 3.7861732756521474e-04, 3.5524327069693561e-04, 3.3075625451960242e-04, 3.0566581370818736e-04, 2.7518884085372388e-04, 2.4598511575045100e-04, 2.1529745571941743e-04, 1.8778181561881875e-04, 1.6135807837179588e-04, 1.3872314496053435e-04, 1.0798442909878947e-04, 9.6799482099736657e-05, 5.0628517647852301e-05, 5.3900735280140895e-04, 5.3374147793451045e-04, 5.0096663130342819e-04, 5.0303367323193023e-04, 5.7688909340908139e-04, 7.9336219583346114e-04, 1.1805501979024989e-03, 1.5838369798123995e-03, 1.7595686120699151e-03, 1.6837416293523783e-03, 1.3480620815655153e-03, 7.5412874431587951e-04, 3.1676341591346802e-05, -5.6463504064319797e-04, -1.3243377928818870e-03, -2.1036951702157469e-03, -3.1888096286176101e-03, -3.8801857519715627e-03, -4.5852509522789006e-03, -5.1234882464206780e-03, -5.5998675765944195e-03, -6.0694658735431575e-03, -6.5132862411232395e-03, -6.9378904264405759e-03, -7.2962471881400336e-03, -7.6417959231296385e-03, -7.8085189931275372e-03, -7.6742699141896849e-03, -7.3163343904981424e-03, -6.7609254506687524e-03, -5.9186854098564343e-03, -4.5568486847401670e-03, -3.1597752371944534e-03, -2.3140127426345709e-03, -1.5409022979635117e-03, -1.0065588211283123e-03, -4.8684797445520836e-04, -1.8007324349506764e-04, 8.5431069576565933e-05, 2.4345361263409930e-04, 3.4131185112780621e-04, 3.9996745660463495e-04, 4.2482244568668661e-04, 4.3229539041407739e-04, 4.2234277801402314e-04, 4.0056030463726648e-04, 3.7331940586809694e-04, 3.4632808454208185e-04, 3.1249789478678878e-04, 2.8013210829100355e-04, 2.4726511828816777e-04, 2.1706525144047977e-04, 1.8958626184000421e-04, 1.6386504617949221e-04, 1.4119392047463595e-04, 1.1920534045103013e-04, 9.9880048226322430e-05, 8.1714263791383130e-05, 6.5828509038954808e-05, 5.0412597978828351e-05, 3.2662567241166541e-05, 9.0029536581306272e-06, 7.5501209618725380e-06, 5.2400938527227478e-04, 5.1941187897460751e-04, 4.8731151433094137e-04, 4.9763834943361736e-04, 5.8573900888782456e-04, 8.1953543123395450e-04, 1.2141204272031296e-03, 1.5659773558598516e-03, 1.6741027431330553e-03, 1.4947830199817311e-03, 1.0690939502954397e-03, 3.8882446323678516e-04, -2.9457174505777284e-04, -9.5233558759785092e-04, -1.8292315520277019e-03, -2.7987571450236587e-03, -3.5631931499034014e-03, -4.3397021701692337e-03, -4.9446259231381573e-03, -5.5190310944744012e-03, -5.9903036429732465e-03, -6.4424965692223210e-03, -6.8745301009464840e-03, -7.2256175438596137e-03, -7.4623435225842551e-03, -7.3243942932526770e-03, -6.9166248219790262e-03, -6.3652077351461552e-03, -5.3325607696001528e-03, -3.8419596336506370e-03, -2.5143681361363369e-03, -1.7132394925327130e-03, -1.0400839095017877e-03, -4.7875484719399797e-04, -1.2014682089716883e-04, 1.6416092371642009e-04, 2.9243194512241859e-04, 3.8680984581771470e-04, 4.1600388820112611e-04, 4.2744918135818736e-04, 4.1470236677361498e-04, 3.8793573109101369e-04, 3.5651830937842685e-04, 3.1984526961532965e-04, 2.8204558054328941e-04, 2.4555129516079695e-04, 2.1187997674539325e-04, 1.8005889693513768e-04, 1.5287686689529094e-04, 1.2731334797222961e-04, 1.0516571721706189e-04, 8.5801045641744969e-05, 6.9259040767767182e-05, 5.5439063314337140e-05, 4.3266865027489521e-05, 3.3323087271713537e-05, 2.4509607231772052e-05, 1.7183156325125843e-05, 1.0360758196957579e-05, 4.2631433924212242e-06, -5.7812349282058979e-06, -1.2151039454271013e-05, -2.2528099241258794e-05, 5.0286974412455145e-04, 5.0384821153601385e-04, 4.7456066102473209e-04, 4.9361174360784514e-04, 5.9621360959469412e-04, 8.5720421453504975e-04, 1.2430077052112028e-03, 1.5735797160619583e-03, 1.5739983634147983e-03, 1.3219950416502105e-03, 7.7761500219662716e-04, 7.1790579380941189e-05, -6.3466364010300591e-04, -1.3866958743072588e-03, -2.2156356287020423e-03, -3.2191038769647101e-03, -4.0521373258289167e-03, -4.7221174055053008e-03, -5.3368792909740601e-03, -5.8684806926396459e-03, -6.3570134755578274e-03, -6.7545774706968022e-03, -7.0364661048025780e-03, -7.0943207261015707e-03, -6.6665679221959828e-03, -6.1927529415051483e-03, -5.1958503959801654e-03, -3.5495019144991544e-03, -2.2454940606813035e-03, -1.4148934033724285e-03, -7.4266552170061618e-04, -2.2602266824512936e-04, 1.0042805947613968e-04, 2.7584683097579203e-04, 3.7903164432432051e-04, 4.0498809565519699e-04, 4.1524938622434501e-04, 3.8586784282213258e-04, 3.5314339652269455e-04, 3.0983249564992037e-04, 2.6693564100611997e-04, 2.2593161072438078e-04, 1.8758794214712189e-04, 1.5395376949657607e-04, 1.2429774970647525e-04, 9.8569063009441100e-05, 7.6609162723366558e-05, 5.8719632443090714e-05, 4.3260822492404123e-05, 3.0945149497183509e-05, 2.0711661961735971e-05, 1.2610456921197347e-05, 6.2850799138061548e-06, 1.3657025185277713e-06, -2.1307441912128531e-06, -4.8190670181966520e-06, -6.5986593111473036e-06, -8.0143096058538783e-06, -9.0424264314874174e-06, -1.0427359674436593e-05, -1.2262695139036492e-05, -1.6678339398169385e-05, -1.4736371481979766e-05, 4.8613470939562302e-04, 4.8790229539956431e-04, 4.6500180548115708e-04, 4.8806746500082085e-04, 6.1027877849716139e-04, 8.8799788811178872e-04, 1.2800073712516645e-03, 1.5047141017835962e-03, 1.4766979492676635e-03, 1.1144773646929798e-03, 4.7639517466102621e-04, -3.0573419757772002e-04, -9.9643395020280329e-04, -1.8792930985121747e-03, -2.7756704723505901e-03, -3.6553369002347916e-03, -4.3613435462676944e-03, -5.0973336573335096e-03, -5.6742545130727198e-03, -6.1880573603531989e-03, -6.5733352246663719e-03, -6.7939219641986997e-03, -6.5957107759773183e-03, -6.0604368912088201e-03, -5.5147696476335190e-03, -3.6826610474997678e-03, -2.2291534969828227e-03, -1.3624030575634979e-03, -6.3761930413068512e-04, -1.2508005117075824e-04, 1.7689553684335411e-04, 3.2256631514474227e-04, 3.8351480533023138e-04, 3.9698244786455272e-04, 3.6948099912739827e-04, 3.3294314559953085e-04, 2.8064479478834373e-04, 2.3457399667385948e-04, 1.8791078767813106e-04, 1.4873722875038880e-04, 1.1441598127293051e-04, 8.5599775599309012e-05, 6.2132262673816611e-05, 4.2919709374893170e-05, 2.7627828739312979e-05, 1.5637152866005471e-05, 6.4772141020205627e-06, -5.8777961352988111e-07, -5.5265622134521790e-06, -9.1814468921581996e-06, -1.1554692807617595e-05, -1.3033326156747100e-05, -1.3767232869478850e-05, -1.3872387514201346e-05, -1.3592037790256599e-05, -1.2896593966283885e-05, -1.2047464207266720e-05, -1.1032347417167807e-05, -1.0114533684330962e-05, -9.2438328245411126e-06, -8.7969261061557135e-06, -7.9997368474285311e-06, -8.2760074138365633e-06, 4.6719475242972160e-04, 4.7478248505473421e-04, 4.4966827715324162e-04, 4.9053980352868273e-04, 6.2324708372357880e-04, 9.2673495974641973e-04, 1.2845073640833995e-03, 1.4782368228997145e-03, 1.3202295907129361e-03, 8.8320304251442161e-04, 1.6035644553609452e-04, -5.8471581303002479e-04, -1.3442816318458284e-03, -2.2091076786848601e-03, -3.2089790843700880e-03, -3.9869203832878786e-03, -4.8137275649388495e-03, -5.4083125036236447e-03, -5.9813237325406429e-03, -6.3447632749756427e-03, -6.5357778633089864e-03, -6.1221384966748289e-03, -5.6171337066797528e-03, -4.3884053638639986e-03, -2.3812062840655023e-03, -1.5485435817101062e-03, -6.9869502795030639e-04, -1.3596329807315526e-04, 1.7774321746030753e-04, 3.2071796498293090e-04, 3.7151680411659065e-04, 3.6856598809269204e-04, 3.3118137743083002e-04, 2.7733556389285128e-04, 2.2467973222074214e-04, 1.7244962227702949e-04, 1.3038607091964418e-04, 9.2784466306966860e-05, 6.3944690032803286e-05, 4.0426589837892561e-05, 2.2689445197543557e-05, 9.3635248279738776e-06, -4.4773528629931292e-07, -7.3170141779961841e-06, -1.1997993302322041e-05, -1.4981159883663740e-05, -1.6702594762562500e-05, -1.7373759224101046e-05, -1.7439669086869941e-05, -1.6918713792149115e-05, -1.6098549531066852e-05, -1.5034840195634954e-05, -1.3832332080644532e-05, -1.2564709215340712e-05, -1.1228295218299535e-05, -9.9164726873461616e-06, -8.5997475108101156e-06, -7.3564386250819253e-06, -6.1453061195624080e-06, -5.0170234815609505e-06, -3.3712731482978437e-06, -2.1152464661070216e-06, -7.0921522885161105e-07, 4.4357100753254948e-04, 4.5783523491735832e-04, 4.3663551316282245e-04, 4.9043606641316698e-04, 6.4081254549227043e-04, 9.6361149046024150e-04, 1.3004898639918140e-03, 1.3892521748190140e-03, 1.1693318055477422e-03, 6.2196792443110910e-04, -1.2328440192263534e-04, -8.7075709832658971e-04, -1.7561751801106057e-03, -2.6271306680734838e-03, -3.5522018457084872e-03, -4.4344999787290368e-03, -5.1078135260758870e-03, -5.7588211328656741e-03, -6.0848027294016366e-03, -6.2811697137687070e-03, -5.7194512331412740e-03, -5.2787299524633853e-03, -3.3893161799206399e-03, -1.8593456369187574e-03, -1.0265951669797854e-03, -2.3413271286272823e-04, 1.1547633259262043e-04, 2.9516966104191919e-04, 3.5077079365913291e-04, 3.4456917120656143e-04, 2.9893052970553918e-04, 2.3973490986383742e-04, 1.8153484353947781e-04, 1.3101618910484059e-04, 8.7936353748296667e-05, 5.5302112920669912e-05, 2.9285935976627046e-05, 1.1251378687218306e-05, -2.0683804545172635e-06, -1.0719666070578707e-05, -1.6371603634285002e-05, -1.9654626060240208e-05, -2.1237161631431750e-05, -2.1677663519629915e-05, -2.1307233313498649e-05, -2.0417504908894735e-05, -1.9193270576496444e-05, -1.7824331713177770e-05, -1.6337412097536325e-05, -1.4880473377826387e-05, -1.3450290586580452e-05, -1.2106926351405506e-05, -1.0858121609101648e-05, -9.7025427811762260e-06, -8.6542519710441667e-06, -7.6820765278457960e-06, -6.7950205946392161e-06, -5.9542712146683859e-06, -5.1020618222940844e-06, -4.1273561031274515e-06, -2.2835140305581376e-06, -1.5869784248719881e-07, 1.4522699592314427e-06, 4.2443957594497962e-04, 4.4204707232135126e-04, 4.2158714631513119e-04, 4.9389359774970609e-04, 6.5718790943033664e-04, 9.9146661853858828e-04, 1.3003023968643362e-03, 1.3147207166995210e-03, 9.8781489669658162e-04, 3.6794346708334674e-04, -4.3633586950734410e-04, -1.2020358118366575e-03, -2.1172552014940629e-03, -3.0821347972688692e-03, -3.9695844894822724e-03, -4.7241903010083047e-03, -5.4496172825574639e-03, -5.8021210975174251e-03, -6.0386398197871151e-03, -5.4016107799895966e-03, -4.9691917573765959e-03, -2.6402874558395717e-03, -1.5823952057294267e-03, -6.2977204617086662e-04, -1.4298518708282860e-05, 2.1782725336455500e-04, 3.2736685805834372e-04, 3.2684090819259161e-04, 2.8094104675907214e-04, 2.1615489730368991e-04, 1.5442735879242075e-04, 1.0135655235956871e-04, 5.9067394699247524e-05, 2.6995415901406361e-05, 4.7242824101618902e-06, -1.0792200614671882e-05, -2.0123924069163884e-05, -2.5908229734487852e-05, -2.8553647526592322e-05, -2.9496589670098432e-05, -2.9136723343831061e-05, -2.8059839102030399e-05, -2.6580238159142194e-05, -2.4901927248589852e-05, -2.3186333862355084e-05, -2.1517969408681771e-05, -1.9959009410372956e-05, -1.8518614509162537e-05, -1.7239289902884226e-05, -1.6092710449320075e-05, -1.5097428414402062e-05, -1.4233615229630722e-05, -1.3493763747817401e-05, -1.2865260932848727e-05, -1.2324059485419184e-05, -1.1857808120686354e-05, -1.1438883600850519e-05, -1.1015042833105823e-05, -1.0540180279174246e-05, -9.6916105356746807e-06, -7.9743211804851078e-06, -4.1932403193592870e-06, -3.2902453801307562e-06, 3.9755804705980669e-04, 4.2667132273862401e-04, 4.1462531329498030e-04, 4.9385107112832546e-04, 6.7751388108142074e-04, 1.0066192108487346e-03, 1.2842107383340094e-03, 1.2178685323121982e-03, 8.3385644538323811e-04, 7.8795647085613818e-05, -7.1137527332913730e-04, -1.5490591414530908e-03, -2.4163471906295045e-03, -3.4634399017527892e-03, -4.3356956042815767e-03, -5.0837341238587908e-03, -5.5110387268504160e-03, -5.7805877407001161e-03, -5.1572659857182217e-03, -4.6900707695721015e-03, -2.1760117794600376e-03, -1.3984079917621832e-03, -3.5858139028260285e-04, 5.3847993534715966e-05, 2.5439339792185714e-04, 3.1226020787939937e-04, 2.7476395592210577e-04, 2.0973572515447849e-04, 1.4176751023908471e-04, 8.4015665943187071e-05, 3.8716335087626436e-05, 6.2094559324214161e-06, -1.5552790670797115e-05, -2.8931148032281689e-05, -3.6646135215160088e-05, -4.0079423126745617e-05, -4.1164158095280100e-05, -4.0467676245139405e-05, -3.9036891502239466e-05, -3.7114221318998234e-05, -3.5113121936185284e-05, -3.3155103410055215e-05, -3.1345367269051874e-05, -2.9732071894636511e-05, -2.8322740612589893e-05, -2.7116359327906923e-05, -2.6095370387495461e-05, -2.5249487724416601e-05, -2.4546565503985404e-05, -2.3979460629752300e-05, -2.3521150684983900e-05, -2.3160030246681968e-05, -2.2879107279134892e-05, -2.2661317838928108e-05, -2.2492649642417224e-05, -2.2353804192167510e-05, -2.2218045939646126e-05, -2.2087474868020266e-05, -2.1817595073400493e-05, -2.1453985639823247e-05, -1.9564167886389047e-05, -1.7207867826941981e-05, -1.1792271171841209e-05, 3.8980997022181746e-04, 4.0798676635331321e-04, 4.0834315173288172e-04, 5.0007774826235640e-04, 6.9263716139303724e-04, 1.0309486466357209e-03, 1.2351588525991997e-03, 1.1123730277641936e-03, 5.9598058107471902e-04, -1.6913215783759955e-04, -9.9183335138849221e-04, -1.9019431491832037e-03, -2.8989172060201115e-03, -3.8175547051837802e-03, -4.6310533905498455e-03, -5.2077387064301747e-03, -5.4948658517685895e-03, -4.9820000673559258e-03, -4.4905813591448697e-03, -1.9852308432931351e-03, -1.2747273724370168e-03, -1.9646539919064186e-04, 7.9641715096003224e-05, 2.7419889585818236e-04, 2.7739015038901518e-04, 2.2344498673955150e-04, 1.5211165129026591e-04, 8.6420550354621498e-05, 3.4410660043298965e-05, -2.2782982497441368e-06, -2.5738637937360648e-05, -3.9377927953329167e-05, -4.6257731176922612e-05, -4.8836486674811980e-05, -4.8706909416702863e-05, -4.7269431036844988e-05, -4.5086632045532524e-05, -4.2817290362715012e-05, -4.0581276022319066e-05, -3.8606020631784302e-05, -3.6889208103986130e-05, -3.5459929203785219e-05, -3.4291948690871887e-05, -3.3354211574888353e-05, -3.2615204401329099e-05, -3.2041303328573522e-05, -3.1604999926015995e-05, -3.1277477130576496e-05, -3.1041881025543030e-05, -3.0875499131072355e-05, -3.0766915330235676e-05, -3.0702772016853310e-05, -3.0671683999461778e-05, -3.0665803566938208e-05, -3.0670844911329089e-05, -3.0678210538101933e-05, -3.0697043583285013e-05, -3.0701237554620766e-05, -3.0908642304022560e-05, -3.0949856403920027e-05, -3.2167365763951765e-05, -2.8503250023528992e-05, -3.1100404802422414e-05, 3.5792257114350239e-04, 4.1575297262604061e-04, 3.9611324124318170e-04, 5.0542896352961594e-04, 7.0845938546939408e-04, 1.0279499086021833e-03, 1.1860485943912327e-03, 9.4051194834122998e-04, 3.6882760100127865e-04, -4.7126664582695238e-04, -1.2715757562342736e-03, -2.2457101954000969e-03, -3.2213594223492528e-03, -4.1072639723958929e-03, -4.8084228735960598e-03, -5.1758175851554095e-03, -4.8658984898084824e-03, -4.3179192455743091e-03, -2.0061919372140230e-03, -1.1934148196793804e-03, -1.1731898778539237e-04, 1.1471501943403938e-04, 3.0683949457866919e-04, 2.6823935250862795e-04, 2.0957547594800612e-04, 1.3342171196796757e-04, 7.1118832645467608e-05, 2.5298072366392793e-05, -3.5880247564558780e-06, -2.0015903343945522e-05, -2.7817653496514641e-05, -3.0295425646408558e-05, -2.9762529321108338e-05, -2.7748878818579567e-05, -2.5245882130850401e-05, -2.2691379739899726e-05, -2.0429448192769170e-05, -1.8483763930521542e-05, -1.6930269389602248e-05, -1.5699529862377444e-05, -1.4768137854131625e-05, -1.4073640869476355e-05, -1.3571470533209858e-05, -1.3219373331793455e-05, -1.2981936686555498e-05, -1.2831635061206245e-05, -1.2745690037958360e-05, -1.2708138823460459e-05, -1.2704164357425055e-05, -1.2725121314040259e-05, -1.2763445847614415e-05, -1.2812045946663031e-05, -1.2870533810498710e-05, -1.2927232821409457e-05, -1.2989744228811994e-05, -1.3046130930283905e-05, -1.3128535962705370e-05, -1.3362560701675409e-05, -1.3839549391847798e-05, -1.5653932397837399e-05, -1.8815042058800353e-05, -2.9493574734656321e-05, -2.0012043807390628e-05, 4.0564114993704367e-04, 3.8681146779443940e-04, 3.9617961938483159e-04, 5.0295757032689861e-04, 7.2076963641978797e-04, 1.0099471759615723e-03, 1.0895876041260091e-03, 8.0621557389808779e-04, 1.2214279486164742e-04, -7.1233759197462249e-04, -1.5813667696018552e-03, -2.4933250273274990e-03, -3.5209277704164113e-03, -4.3216927331985906e-03, -4.8065186472679676e-03, -4.7670826809242065e-03, -4.1742449800212453e-03, -2.2547770938629100e-03, -1.1310492556540744e-03, -8.5753238961649449e-05, 1.9835717312346069e-04, 3.8961859202236602e-04, 3.3514983867023024e-04, 2.7468031303204475e-04, 1.9277759849218191e-04, 1.3326773449521558e-04, 9.2075354112915886e-05, 6.8852311931140908e-05, 5.7371358121098955e-05, 5.3598309876319290e-05, 5.3926149529346037e-05, 5.6180359439664821e-05, 5.9020328638759761e-05, 6.1768972561461767e-05, 6.4148242934964703e-05, 6.6039074783373635e-05, 6.7495226525341525e-05, 6.8547591610829735e-05, 6.9296979107173236e-05, 6.9797513745049184e-05, 7.0120931361322849e-05, 7.0311621492988988e-05, 7.0409855937054154e-05, 7.0444139902247480e-05, 7.0435590070443393e-05, 7.0399609546027871e-05, 7.0346926761428715e-05, 7.0285261322271922e-05, 7.0219782129593729e-05, 7.0152925170872775e-05, 7.0089122634936873e-05, 7.0023468526966441e-05, 6.9967170998362594e-05, 6.9900100399338913e-05, 6.9854016131400712e-05, 6.9766674402712138e-05, 6.9663929202726699e-05, 6.9354726556026619e-05, 6.8391410606226621e-05, 6.6378983269212681e-05, 5.7153367875488433e-05, 4.6206050055626688e-05, 1.3061689875495152e-05, 3.2535716838039130e-04, 4.6048999216326270e-04, 3.7745993606204745e-04, 4.8790803231247779e-04, 6.8154673126137946e-04, 9.7878832269591293e-04, 9.7759233066844684e-04, 6.1912097166390984e-04, -9.8526122568012853e-05, -9.1886963495563939e-04, -1.8692049555874835e-03, -2.8184208402823388e-03, -3.6830460261226376e-03, -4.3495519615876534e-03, -4.6304430654576772e-03, -4.0789347781539044e-03, -2.7170580793683717e-03, -1.1049902417891286e-03, -1.0076864468969225e-04, 3.4840738764717978e-04, 5.5642817115539084e-04, 5.2396230509328223e-04, 4.6521644032475741e-04, 3.8054831084054306e-04, 3.2173670675479313e-04, 2.8186537962550607e-04, 2.6130636569383008e-04, 2.5252525825795693e-04, 2.5106094465161084e-04, 2.5292255703788537e-04, 2.5601988143364186e-04, 2.5913553846480250e-04, 2.6178753233559551e-04, 2.6383144587859632e-04, 2.6529712529273566e-04, 2.6629875806049669e-04, 2.6693469148259485e-04, 2.6731805198304580e-04, 2.6751787259762382e-04, 2.6760162507806338e-04, 2.6760798891678348e-04, 2.6756947696557419e-04, 2.6750552368365007e-04, 2.6742982285281899e-04, 2.6735078718302934e-04, 2.6727372928466179e-04, 2.6720129711831715e-04, 2.6713565023136983e-04, 2.6707581371263007e-04, 2.6702493957435965e-04, 2.6697535665887520e-04, 2.6693985836516638e-04, 2.6689027399280315e-04, 2.6687584612642725e-04, 2.6680449037455340e-04, 2.6682829940317243e-04, 2.6667767308685578e-04, 2.6661213065765955e-04, 2.6610664854800935e-04, 2.6425518294490296e-04, 2.6147739803744391e-04, 2.3754378024667930e-04, 2.4754887586758006e-04, 6.0987788930586852e-04, 3.8368261298615813e-04, 4.2786192983838324e-04, 4.2587892535525182e-04, 5.9779913837450065e-04, 8.4112145972526156e-04, 8.4314866599337346e-04, 4.6744542559595814e-04, -2.9842833040479022e-04, -1.0959966425010681e-03, -2.0230103474010996e-03, -2.9338970570742737e-03, -3.7133786671134372e-03, -4.2486499925357534e-03, -4.0328769234927470e-03, -3.3580425431765318e-03, -1.2645955637005742e-03, -2.9956326145468974e-04, 4.3441170416693033e-04, 7.1354796044477246e-04, 7.6556216421099616e-04, 7.2905596998053854e-04, 6.5467379082263691e-04, 5.9653961636470980e-04, 5.5504522100231985e-04, 5.3336180894649485e-04, 5.2408811578871263e-04, 5.2262027895729531e-04, 5.2460136849746754e-04, 5.2779246530878946e-04, 5.3086977913958846e-04, 5.3336722499409614e-04, 5.3517137610072378e-04, 5.3636996346084916e-04, 5.3710321127790504e-04, 5.3750295320189700e-04, 5.3768623467837222e-04, 5.3773005449166285e-04, 5.3769630332410460e-04, 5.3761963043838978e-04, 5.3752600398151984e-04, 5.3742866181344688e-04, 5.3733617833145921e-04, 5.3725234464296813e-04, 5.3717898994848324e-04, 5.3711589887443399e-04, 5.3706332882314249e-04, 5.3701862311326509e-04, 5.3698433250637596e-04, 5.3695185459434226e-04, 5.3693560102193827e-04, 5.3690367489703478e-04, 5.3691855363599593e-04, 5.3686103530974278e-04, 5.3697734079096262e-04, 5.3684651109342941e-04, 5.3733614190469700e-04, 5.3714377625267273e-04, 5.3875776002161938e-04, 5.3956363252790772e-04, 5.4458927883932343e-04, 5.6256271668618811e-04, 5.2040929472996406e-04, 1.6609855926007569e-04, 8.7638531434642425e-04, 5.0163276875945031e-04, 3.0456809539110632e-04, 2.6714251573617398e-04, 4.8965885635265938e-04, 6.4587762409085148e-04, 2.9203169258672917e-04, -3.6547704449023388e-04, -1.2104007014858351e-03, -1.9096501310364236e-03, -2.7887812660557648e-03, -3.3543949664683465e-03, -3.5999850025975732e-03, -3.6513124031831217e-03, -1.3162398963055496e-03, -8.6991204272279614e-04, 2.9151018602180287e-04, 6.8109009422435149e-04, 9.3348776573204319e-04, 9.9824969134098651e-04, 9.8135886417636273e-04, 9.5012076859984744e-04, 9.1428822776757983e-04, 8.9243724707013545e-04, 8.7952809305921319e-04, 8.7491116568381663e-04, 8.7436074611946550e-04, 8.7600563262698380e-04, 8.7813690772008948e-04, 8.8013819109480722e-04, 8.8167779833074936e-04, 8.8274675662282473e-04, 8.8340836793099993e-04, 8.8376650196418899e-04, 8.8392180831638406e-04, 8.8394552032455397e-04, 8.8389907206144313e-04, 8.8381470136859007e-04, 8.8371937883076920e-04, 8.8362432167460943e-04, 8.8353801778386640e-04, 8.8346281446532407e-04, 8.8339995070892097e-04, 8.8334815167072985e-04, 8.8330756277085927e-04, 8.8327404388968396e-04, 8.8325205849921367e-04, 8.8322845469002024e-04, 8.8322786238232559e-04, 8.8319806982938259e-04, 8.8324902193654775e-04, 8.8316446786658562e-04, 8.8341154959541428e-04, 8.8311230653921559e-04, 8.8419226905971408e-04, 8.8323495752660487e-04, 8.8780693242727720e-04, 8.8555043057188514e-04, 9.0377770096068091e-04, 9.0443125144068460e-04, 9.9736877287886312e-04, 1.1075657807786614e-03, 2.3068279395817501e-03, 4.3899608361260695e-05, 7.0371261276299182e-04, 3.8767971766445058e-04, -9.6329617550697244e-05, 6.9834077573532188e-04, 8.5936477134789663e-04, 7.8165870962498829e-04, -3.3626770188879829e-04, -1.1270524247957436e-03, -1.9228574795516831e-03, -2.8048815777740807e-03, -3.6150900768398275e-03, -3.7435937395499351e-03, -4.3841231492447921e-03, -2.9327185154505385e-03, -1.0116749277840171e-03, -6.5774953840055440e-05, 5.9034176670140514e-04, 8.2051696234968852e-04, 8.5597991645482803e-04, 8.1669936352239030e-04, 7.4914446794244714e-04, 6.9939812881010055e-04, 6.6438221601363388e-04, 6.4726167745681167e-04, 6.4018754695083268e-04, 6.3967107366003084e-04, 6.4172124861013209e-04, 6.4467051276562290e-04, 6.4737846122679688e-04, 6.4954241124475518e-04, 6.5107436354836477e-04, 6.5207661970918514e-04, 6.5267285252133996e-04, 6.5298340905218513e-04, 6.5311025378266213e-04, 6.5312122871850854e-04, 6.5307004150509185e-04, 6.5298626125973340e-04, 6.5289213534973790e-04, 6.5279818064634034e-04, 6.5271161852723447e-04, 6.5263441702166983e-04, 6.5256896910515731e-04, 6.5251190362680678e-04, 6.5246883121443259e-04, 6.5242511726919163e-04, 6.5240839181118825e-04, 6.5235748320251934e-04, 6.5239895330134346e-04, 6.5226639296351403e-04, 6.5252217253827967e-04, 6.5199923214823065e-04, 6.5317563218686078e-04, 6.5096077956810702e-04, 6.5618879492962238e-04, 6.4686655435245615e-04, 6.6960350043401666e-04, 6.3154898616670733e-04, 7.5631725263844429e-04, 5.1277487760286421e-04, 9.1754351265573323e-04};
static const casadi_real casadi_c3[102] = {-2.5000000000000000e-01, -2.5000000000000000e-01, -2.5000000000000000e-01, -2.5000000000000000e-01, 2.5000000000000000e-01, 5.0000000000000000e-01, 7.5000000000000000e-01, 1., 1.2500000000000000e+00, 1.5000000000000000e+00, 1.7500000000000000e+00, 2., 2.2500000000000000e+00, 2.5000000000000000e+00, 2.7500000000000000e+00, 3., 3.2500000000000000e+00, 3.5000000000000000e+00, 3.7500000000000000e+00, 4., 4.2500000000000000e+00, 4.5000000000000000e+00, 4.7500000000000000e+00, 5., 5.2500000000000000e+00, 5.5000000000000000e+00, 5.7500000000000000e+00, 6., 6.2500000000000000e+00, 6.5000000000000000e+00, 6.7500000000000000e+00, 7., 7.2500000000000000e+00, 7.5000000000000000e+00, 7.7500000000000000e+00, 8., 8.2500000000000000e+00, 8.5000000000000000e+00, 8.7500000000000000e+00, 9., 9.2500000000000000e+00, 9.5000000000000000e+00, 9.7500000000000000e+00, 10., 1.0250000000000000e+01, 1.0500000000000000e+01, 1.0750000000000000e+01, 11., 1.1250000000000000e+01, 1.1500000000000000e+01, 1.1750000000000000e+01, 12., 1.2250000000000000e+01, 1.2500000000000000e+01, 1.2750000000000000e+01, 13., 1.3250000000000000e+01, 1.3500000000000000e+01, 1.3750000000000000e+01, 14., 1.4250000000000000e+01, 1.4500000000000000e+01, 1.4750000000000000e+01, 1.5250000000000000e+01, 1.5250000000000000e+01, 1.5250000000000000e+01, 1.5250000000000000e+01, -6., -6., -6., -4., -3., -2., -1., 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 26., 26., 26.};
static const casadi_real casadi_c4[2079] = {9.2798850035421773e-04, 9.8537984956331291e-04, 1.0757704642082723e-03, 1.1327589668437001e-03, 1.1331009930518057e-03, 1.0358675631817267e-03, 8.2319252932106781e-04, 5.3079308579949479e-04, 3.3018087338116504e-04, 7.0071392895376553e-04, 2.0975962282795322e-03, 4.5411090176863339e-03, 8.0382228704751965e-03, 1.2603177016375837e-02, 1.7803087300753251e-02, 2.2964535543145936e-02, 2.7774151084939518e-02, 3.1888439315994790e-02, 3.5513122481553645e-02, 3.8977576644623903e-02, 4.2296443593437510e-02, 4.5835741436434339e-02, 4.9858767015697122e-02, 5.4289099263017199e-02, 5.9330203049971802e-02, 6.3954089258397739e-02, 6.7878658987700069e-02, 6.7494026972221344e-02, 6.4867884086472441e-02, 6.1250144659463199e-02, 5.7349535880442122e-02, 5.3632659314398978e-02, 5.0395508547729791e-02, 4.7077724341472213e-02, 4.4300302520213546e-02, 4.1390706981335637e-02, 3.8729973277265677e-02, 3.5907771793020661e-02, 3.3447536879348885e-02, 3.0647720951656840e-02, 2.8003563576637875e-02, 2.5326407309513518e-02, 2.2743190094114657e-02, 2.0166285248720248e-02, 1.7393151131292740e-02, 1.4798872367480944e-02, 1.2107124171299522e-02, 9.6609697660552593e-03, 6.9982736229351698e-03, 4.9035133455731031e-03, 2.8865995941630609e-03, 1.3815875892990831e-03, -2.4474632052063424e-04, -1.6886915123988308e-03, -2.8684246607611607e-03, -3.8515388544193164e-03, -4.3985559311984770e-03, -4.3958780070756168e-03, -4.1568825205910665e-03, -3.9830209598826286e-03, -3.1631965634576942e-03, -4.0500533976893472e-03, -2.4450829963183415e-03, 1.3502249717456979e-03, 1.3930510048828567e-03, 1.4919225359353346e-03, 1.5709600828600183e-03, 1.5892239836845371e-03, 1.5270201812830752e-03, 1.3773226423449911e-03, 1.2064648540512435e-03, 1.2554316152913829e-03, 1.9640225540038759e-03, 3.6832611664788933e-03, 6.5087678031247953e-03, 1.0371758027953567e-02, 1.5157186877478936e-02, 2.0411108726759612e-02, 2.5644388778850887e-02, 3.0418690157751737e-02, 3.4684351208617813e-02, 3.8453654296163632e-02, 4.2078947136398183e-02, 4.5637372214491559e-02, 4.9353432330574550e-02, 5.3457469037521493e-02, 5.7827828719145664e-02, 6.2455995238199009e-02, 6.6365479010734085e-02, 6.9158596412917037e-02, 6.8754642972131977e-02, 6.6152548263804220e-02, 6.2650773857566677e-02, 5.8944581976035332e-02, 5.5409055948767418e-02, 5.2238854911071435e-02, 4.9161802397871650e-02, 4.6354348858300351e-02, 4.3654138539926599e-02, 4.0944468088158881e-02, 3.8360474135223942e-02, 3.5768213952630926e-02, 3.3207849585354603e-02, 3.0578955958097526e-02, 2.8031561092849575e-02, 2.5550485172597660e-02, 2.3027437215907814e-02, 2.0492758641130454e-02, 1.7924333159424030e-02, 1.5467774277616623e-02, 1.3014387258126304e-02, 1.0637891435023339e-02, 8.4547224569097301e-03, 6.6056691781101809e-03, 4.8933449466521664e-03, 3.3263164619053097e-03, 1.7566024937952774e-03, 4.8222604591343390e-04, -6.6368455258995773e-04, -1.4241853714702267e-03, -1.7212395131869771e-03, -1.8838892798658726e-03, -1.8214150842741888e-03, -2.0076301834617608e-03, -1.9641983945268356e-03, -2.4538904994551411e-03, 1.9732052691314311e-03, 2.0309395416378802e-03, 2.1241661550845540e-03, 2.2393614433213363e-03, 2.2963687143839409e-03, 2.3029668403170820e-03, 2.2718621263814642e-03, 2.3133390429557954e-03, 2.6950505656428924e-03, 3.8371059798941788e-03, 6.0629707141372675e-03, 9.3879942263673487e-03, 1.3763458690296188e-02, 1.8929633453298390e-02, 2.4436451082679243e-02, 2.9726825549672823e-02, 3.4622874797953208e-02, 3.8925931385737106e-02, 4.2981156906085789e-02, 4.6830710479138976e-02, 5.0688931432293319e-02, 5.4743286923319742e-02, 5.8962263052955981e-02, 6.3413297845778330e-02, 6.7569379280361511e-02, 7.1176188397102547e-02, 7.2321484104212158e-02, 7.1203797833243876e-02, 6.8394434337187657e-02, 6.4951010822778710e-02, 6.1429788720487932e-02, 5.8180313647194039e-02, 5.5099786130754523e-02, 5.2310905819129415e-02, 4.9659616872449935e-02, 4.7055248802650676e-02, 4.4579970887389422e-02, 4.2047126768930354e-02, 3.9697416815960014e-02, 3.7180960520531339e-02, 3.4788694018645400e-02, 3.2406440657927305e-02, 3.0047623989089178e-02, 2.7721100440511969e-02, 2.5316289401813217e-02, 2.3065406592913926e-02, 2.0761832403274075e-02, 1.8549141027409909e-02, 1.6309056154817113e-02, 1.4237418886078185e-02, 1.2146911339949641e-02, 1.0314814094774380e-02, 8.4494124376669928e-03, 6.8082931166873143e-03, 5.1672245470181103e-03, 3.7944384852483851e-03, 2.6002147907329748e-03, 1.5737264120722074e-03, 7.4405467823948103e-04, 4.3664254126803606e-05, -4.9879524963888943e-04, -1.0194784524677021e-03, -1.0788327470741719e-03, 2.7628708233260876e-03, 2.8387507930396276e-03, 2.9487908699085802e-03, 3.1022187807128372e-03, 3.2054122311305821e-03, 3.2867554228928112e-03, 3.3884665294689935e-03, 3.6753467657282780e-03, 4.4839368442689828e-03, 6.2619516909214095e-03, 9.2168720271471969e-03, 1.3322977109448575e-02, 1.8402856235531524e-02, 2.4034046059069503e-02, 2.9691880233287761e-02, 3.5060206572953355e-02, 3.9910168847050433e-02, 4.4458550141719441e-02, 4.8766926112427764e-02, 5.3003201451919967e-02, 5.7291134553258870e-02, 6.1645939247604364e-02, 6.6032479884994055e-02, 7.0112046952601578e-02, 7.3448025914835346e-02, 7.5140224550491200e-02, 7.4935132909962995e-02, 7.3282138478689751e-02, 7.0607996571162637e-02, 6.7515135356617184e-02, 6.4467383520086824e-02, 6.1567194549019585e-02, 5.8841692380742779e-02, 5.6289720868362383e-02, 5.3794865504372916e-02, 5.1425285567319484e-02, 4.8991988009846874e-02, 4.6688782503311689e-02, 4.4310104985390862e-02, 4.2043093751703772e-02, 3.9791408690198246e-02, 3.7553259814225040e-02, 3.5464699970953341e-02, 3.3286389810478795e-02, 3.1249167119229797e-02, 2.9149406767855501e-02, 2.7168159517769987e-02, 2.5138263897589011e-02, 2.3228619261091044e-02, 2.1234549245462045e-02, 1.9395322555408934e-02, 1.7421785945944054e-02, 1.5656096718156768e-02, 1.3817820804075591e-02, 1.2096374579684252e-02, 1.0369982942523410e-02, 8.8212965377819155e-03, 7.3643250473733237e-03, 5.9959204602908194e-03, 4.7807381407796428e-03, 3.2659614254015568e-03, 2.0722413278523159e-03, 1.0203062030521173e-03, 3.3525609542858037e-03, 3.4388496701178014e-03, 3.5573321691728813e-03, 3.7366731596480064e-03, 3.8689669630340576e-03, 3.9993209504570098e-03, 4.1966745391156385e-03, 4.6712153057657793e-03, 5.8286486597054852e-03, 8.1025924819874296e-03, 1.1636951064093527e-02, 1.6323364748194440e-02, 2.1883158871192007e-02, 2.7763512809516298e-02, 3.3496164244707367e-02, 3.8826064421398097e-02, 4.3759728582198086e-02, 4.8429572453628597e-02, 5.2954406563554261e-02, 5.7433867978259348e-02, 6.1895062773072600e-02, 6.6336258306150142e-02, 7.0509252137944969e-02, 7.3951646715486999e-02, 7.6227306739360429e-02, 7.6731630454358032e-02, 7.5902862908166779e-02, 7.4039504573808521e-02, 7.1625987013395842e-02, 6.9070407781407217e-02, 6.6381212000485024e-02, 6.3848775372417649e-02, 6.1351493159523839e-02, 5.8913681020018815e-02, 5.6547266903190160e-02, 5.4135867933201465e-02, 5.1881262417205698e-02, 4.9533159790463556e-02, 4.7280575133518896e-02, 4.5179465670302045e-02, 4.3031151907571369e-02, 4.0908965331322121e-02, 3.8880430467499415e-02, 3.6982537682405538e-02, 3.5041102622675221e-02, 3.3130827255764786e-02, 3.1277051487489826e-02, 2.9526979040977119e-02, 2.7657810433359461e-02, 2.5935084173233956e-02, 2.4080461462843761e-02, 2.2398221646310824e-02, 2.0623837367442010e-02, 1.8947037035471532e-02, 1.7213984596271600e-02, 1.5557563883241770e-02, 1.3904927366286851e-02, 1.2268938907700569e-02, 1.0722763598426164e-02, 9.2180412215436963e-03, 7.3866825939963411e-03, 6.0480870796320229e-03, 5.1580828965660909e-03, 3.9429484605949605e-03, 4.0374023475794026e-03, 4.1628017784547892e-03, 4.3609058542459491e-03, 4.5175167309460616e-03, 4.6942306456637843e-03, 4.9908947179183013e-03, 5.6727039244862196e-03, 7.2088960279470503e-03, 1.0010053042595782e-02, 1.4111496999755360e-02, 1.9363629950679525e-02, 2.5296470582984790e-02, 3.1324981157803689e-02, 3.7079469231181800e-02, 4.2402883536977867e-02, 4.7414373553149404e-02, 5.2208063272452788e-02, 5.6865871235066340e-02, 6.1432093218667091e-02, 6.5906343605613787e-02, 7.0117090831042825e-02, 7.3620573560359032e-02, 7.6259751165330320e-02, 7.7235595324016151e-02, 7.7027879476510908e-02, 7.5841002583232509e-02, 7.4055554637706758e-02, 7.2018979387858062e-02, 6.9866446453079920e-02, 6.7692392335927581e-02, 6.5382121442153607e-02, 6.3120068328574835e-02, 6.0824703985123262e-02, 5.8565828949156691e-02, 5.6348131231484015e-02, 5.4007176184139902e-02, 5.1919643622060092e-02, 4.9791312103376208e-02, 4.7704039441495844e-02, 4.5627802469069320e-02, 4.3668721475203141e-02, 4.1768821060907901e-02, 3.9970224574550010e-02, 3.8195156866589919e-02, 3.6434356903133056e-02, 3.4702206883295880e-02, 3.3020066084018369e-02, 3.1390612595966809e-02, 2.9714950537621902e-02, 2.8112130519393898e-02, 2.6447116204427641e-02, 2.4882605531868780e-02, 2.3253360190606722e-02, 2.1727742524188968e-02, 2.0104663381694518e-02, 1.8553752322646683e-02, 1.6981223399309173e-02, 1.5465815880232823e-02, 1.4003627278127923e-02, 1.2025547184079553e-02, 1.0650446118513840e-02, 9.7123811843232519e-03, 4.5399899300555347e-03, 4.6390294579672442e-03, 4.7670188473563002e-03, 4.9778266189251397e-03, 5.1543574182154172e-03, 5.3782373870874794e-03, 5.7861839251386379e-03, 6.7053901933354495e-03, 8.6559542866597936e-03, 1.1992477907999149e-02, 1.6665292229747761e-02, 2.2387235394041697e-02, 2.8583388936408556e-02, 3.4697785561645662e-02, 4.0425144703849739e-02, 4.5773384663922521e-02, 5.0848613348111103e-02, 5.5681181583929082e-02, 6.0373518784027094e-02, 6.4855600604294794e-02, 6.9013322390906642e-02, 7.2560472773512658e-02, 7.5424494585746266e-02, 7.6749423634435751e-02, 7.6975364152643902e-02, 7.6266700763667650e-02, 7.5008542937229070e-02, 7.3371181878889052e-02, 7.1632180792689820e-02, 6.9821880734737954e-02, 6.7855945571879836e-02, 6.5836903644504147e-02, 6.3776229820101685e-02, 6.1729582891149493e-02, 5.9637104431915548e-02, 5.7479449023757970e-02, 5.5456731155714284e-02, 5.3469828102694711e-02, 5.1522299833717609e-02, 4.9534882512350095e-02, 4.7579128818380362e-02, 4.5692673909231415e-02, 4.3902134520869239e-02, 4.2152712966424921e-02, 4.0550881515504955e-02, 3.8841233087728737e-02, 3.7262666654244346e-02, 3.5635351638860967e-02, 3.4069148550355172e-02, 3.2587660213412827e-02, 3.0958422714316612e-02, 2.9570527498342224e-02, 2.7941315399609784e-02, 2.6573296505088474e-02, 2.5034018329408374e-02, 2.3572381719867936e-02, 2.2105808089292713e-02, 2.0671321947192081e-02, 1.9220552303843778e-02, 1.7775565529697081e-02, 1.5865960158852981e-02, 1.4551995168071780e-02, 1.3647421869447304e-02, 5.1423605988658886e-03, 5.2425986374108752e-03, 5.3700504163868923e-03, 5.5867417252350041e-03, 5.7810013135276171e-03, 6.0553062631896774e-03, 6.5907943179078360e-03, 7.7783779709649547e-03, 1.0185522328684809e-02, 1.4052889577006490e-02, 1.9264460734771234e-02, 2.5372875379943500e-02, 3.1723447695250387e-02, 3.7863632577273286e-02, 4.3566465972120924e-02, 4.8934206499780704e-02, 5.3970705761280512e-02, 5.8767867745282781e-02, 6.3260265578422431e-02, 6.7401271305833399e-02, 7.0954797633399153e-02, 7.3927602687042446e-02, 7.5612643857032091e-02, 7.6138151458773021e-02, 7.5786634749238954e-02, 7.4786217425183765e-02, 7.3488375936448982e-02, 7.1974154334616944e-02, 7.0293873483311745e-02, 6.8604121698921383e-02, 6.6786499543926903e-02, 6.4966850577781010e-02, 6.3126438870127741e-02, 6.1230209509557272e-02, 5.9388845660008079e-02, 5.7496315112973949e-02, 5.5636150922049932e-02, 5.3795269512782774e-02, 5.2016302953676138e-02, 5.0238485954241643e-02, 4.8460015511634341e-02, 4.6706183633553867e-02, 4.5025874948362583e-02, 4.3410486621062123e-02, 4.1724374546706362e-02, 4.0246361282208376e-02, 3.8625486516848842e-02, 3.7095916345438580e-02, 3.5639947113302164e-02, 3.4091439620738469e-02, 3.2628729489629228e-02, 3.1071881126741713e-02, 2.9734048473565915e-02, 2.8242282987095614e-02, 2.6845643401640959e-02, 2.5470785124588592e-02, 2.4023284509183569e-02, 2.2665747490007576e-02, 2.1242480955715341e-02, 1.9773583170220425e-02, 1.8083640548396226e-02, 1.6765525121919422e-02, 1.5931297860587553e-02, 5.7465258839388324e-03, 5.8463980953765409e-03, 5.9673038686120288e-03, 6.1868723285044853e-03, 6.3968977109562595e-03, 6.7279746161101944e-03, 7.4077774508198909e-03, 8.9045313035515661e-03, 1.1782758802689962e-02, 1.6188367765731661e-02, 2.1889630334655213e-02, 2.8282386872564923e-02, 3.4715786650483679e-02, 4.0818449311656110e-02, 4.6502782794619134e-02, 5.1794394427704053e-02, 5.6735070853607628e-02, 6.1256219743749271e-02, 6.5385329213481641e-02, 6.8931245369763250e-02, 7.2012241550932027e-02, 7.3981026930778779e-02, 7.4778890494534941e-02, 7.4612756545316669e-02, 7.3853208082089492e-02, 7.2674298266713289e-02, 7.1194053915328501e-02, 6.9624461692594161e-02, 6.7974018263421032e-02, 6.6258233846230558e-02, 6.4558838441589231e-02, 6.2849400481292755e-02, 6.1157173297949959e-02, 5.9460155454901138e-02, 5.7737884697970254e-02, 5.6001836015405454e-02, 5.4304521906971763e-02, 5.2669502299506399e-02, 5.1035204187154536e-02, 4.9387229139323550e-02, 4.7740913890697456e-02, 4.6108645052508238e-02, 4.4572293708035199e-02, 4.2997222038683100e-02, 4.1503803771819434e-02, 3.9919168076830436e-02, 3.8397206598634458e-02, 3.6897971404018272e-02, 3.5361144660309922e-02, 3.3975171117316245e-02, 3.2367013098123475e-02, 3.0910980330517906e-02, 2.9427132543166441e-02, 2.8006325153476654e-02, 2.6529326763572531e-02, 2.5100698102137796e-02, 2.3747173011840667e-02, 2.2299569225559444e-02, 2.0858227541711377e-02, 1.9483333276851186e-02, 1.7730284113726114e-02, 1.6710518073454774e-02, 1.6002655735286104e-02, 6.3505841222473202e-03, 6.4479093495013132e-03, 6.5581627039855159e-03, 6.7764567378882368e-03, 7.0030386946981901e-03, 7.3966292847120630e-03, 8.2446798696610459e-03, 1.0078106344606742e-02, 1.3452329827437397e-02, 1.8370475388395976e-02, 2.4483998091495599e-02, 3.1064194074690719e-02, 3.7532726952369810e-02, 4.3564707582580915e-02, 4.9183976422013581e-02, 5.4315082017812086e-02, 5.8960927374392992e-02, 6.3080348498799718e-02, 6.6611882012443849e-02, 6.9722716120300871e-02, 7.1976582919526633e-02, 7.2999320436384268e-02, 7.3031821361631111e-02, 7.2374766268320706e-02, 7.1234300899862477e-02, 6.9748422266914800e-02, 6.8136378477703166e-02, 6.6408586835042499e-02, 6.4694254259178394e-02, 6.2976627883614161e-02, 6.1291232678699382e-02, 5.9619647864156883e-02, 5.7964971230036112e-02, 5.6335422749078261e-02, 5.4704431155291382e-02, 5.3073584094452439e-02, 5.1464695909485242e-02, 4.9867104592059258e-02, 4.8281472494774012e-02, 4.6712993347815653e-02, 4.5127342696400868e-02, 4.3563287615729591e-02, 4.2030649915228036e-02, 4.0523150733182661e-02, 3.8950656802526844e-02, 3.7445171594999403e-02, 3.5841380724338276e-02, 3.4285129912300524e-02, 3.2807101643122401e-02, 3.1221578382568997e-02, 2.9698884122552636e-02, 2.8107931802220754e-02, 2.6613551650569240e-02, 2.5071303798429839e-02, 2.3572321497100441e-02, 2.2133366532194523e-02, 2.0577084335416478e-02, 1.9178749413049596e-02, 1.7656679182334253e-02, 1.6251330358082895e-02, 1.4530844930665534e-02, 1.3690293117013193e-02, 1.3106381526526076e-02, 6.9537464344997853e-03, 7.0462403182141864e-03, 7.1429078653828396e-03, 7.3556764612444101e-03, 7.5988203544608314e-03, 8.0674807132159777e-03, 9.1029504613865855e-03, 1.1316394759311276e-02, 1.5176466884960575e-02, 2.0597177395304252e-02, 2.7034938250475222e-02, 3.3718569224655930e-02, 4.0147775125949997e-02, 4.6104057198301802e-02, 5.1535494075684384e-02, 5.6367131562172164e-02, 6.0587330922418227e-02, 6.4127177934034385e-02, 6.7204326402970846e-02, 6.9550778962967061e-02, 7.0926758813389570e-02, 7.1088651756796004e-02, 7.0533334728065333e-02, 6.9363037402637037e-02, 6.7824292638943129e-02, 6.6121828409377387e-02, 6.4304706007522500e-02, 6.2482853761971886e-02, 6.0639819346230556e-02, 5.8892053923812526e-02, 5.7143001000636948e-02, 5.5428102782994287e-02, 5.3721442186627347e-02, 5.2053252862349408e-02, 5.0372512222582065e-02, 4.8719053819876061e-02, 4.7069886154822785e-02, 4.5409511125959125e-02, 4.3766727437054127e-02, 4.2129746446182795e-02, 4.0478830252740641e-02, 3.8853684963629329e-02, 3.7235254489371046e-02, 3.5592472418154518e-02, 3.3967362601848787e-02, 3.2292289803823107e-02, 3.0632656744031320e-02, 2.9010471024686416e-02, 2.7366874390501089e-02, 2.5735880224312085e-02, 2.4081286323388795e-02, 2.2449175197885224e-02, 2.0823990880460327e-02, 1.9248123691532299e-02, 1.7737466042907744e-02, 1.6256744195828111e-02, 1.4838531490927068e-02, 1.3344312209740127e-02, 1.1923819980352879e-02, 1.0605668130167320e-02, 8.9739177466411010e-03, 7.8455214030987638e-03, 7.3120585038574182e-03, 7.5549419487997488e-03, 7.6404037610045975e-03, 7.7217882433472150e-03, 7.9235866072070137e-03, 8.1869853706522822e-03, 8.7405767338943341e-03, 9.9954376409124093e-03, 1.2608973202422817e-02, 1.6965308516928661e-02, 2.2828224839652047e-02, 2.9513084742032191e-02, 3.6236679355874761e-02, 4.2562250944715253e-02, 4.8357603397835423e-02, 5.3485925318174518e-02, 5.7879238363959043e-02, 6.1514568714644294e-02, 6.4559241749507196e-02, 6.7023810545300835e-02, 6.8634156488407538e-02, 6.8961767769573315e-02, 6.8470534650617615e-02, 6.7222961012416135e-02, 6.5599064194880749e-02, 6.3783279344834326e-02, 6.1815931150275436e-02, 5.9838467921248979e-02, 5.7842543431935296e-02, 5.5943272800835983e-02, 5.4030377171121566e-02, 5.2182575795112512e-02, 5.0347290526052788e-02, 4.8498642091662443e-02, 4.6681796312897983e-02, 4.4852135896765205e-02, 4.3039010585666192e-02, 4.1200771094732122e-02, 3.9390663475262620e-02, 3.7552676296453286e-02, 3.5727148384214862e-02, 3.3885047847014245e-02, 3.2073427206697473e-02, 3.0249687591051410e-02, 2.8447488936577090e-02, 2.6613837257122193e-02, 2.4806545499676827e-02, 2.3008245519293799e-02, 2.1231200459854667e-02, 1.9531144197567334e-02, 1.7869999884166911e-02, 1.6210269004143320e-02, 1.4553237003566415e-02, 1.2969829065700021e-02, 1.1496624515185488e-02, 1.0146297477950436e-02, 8.9079074814022753e-03, 7.6525126359683849e-03, 6.4869858356667327e-03, 5.3091685777669805e-03, 4.2128150828047439e-03, 3.2010250854920676e-03, 2.2608984898100730e-03, 9.5784806461301976e-04, 8.1533747925480130e-03, 8.2300359622189019e-03, 8.2926045257082758e-03, 8.4817179993556761e-03, 8.7666179453784014e-03, 9.4231729880153870e-03, 1.0919015005276443e-02, 1.3968393435497885e-02, 1.8787947548913542e-02, 2.5053640819292664e-02, 3.1873373010314697e-02, 3.8587359761935461e-02, 4.4770839285675365e-02, 5.0285292744555753e-02, 5.4953767621243654e-02, 5.8795509781591752e-02, 6.1841905694749712e-02, 6.4431623110902100e-02, 6.6146885060292718e-02, 6.6691230853370420e-02, 6.6281605770277280e-02, 6.5039852361514425e-02, 6.3328230647834174e-02, 6.1325705521226105e-02, 5.9140667758862391e-02, 5.6974917406595299e-02, 5.4799195506966297e-02, 5.2677011310060598e-02, 5.0573666354239682e-02, 4.8514159539768419e-02, 4.6465296228141606e-02, 4.4402012622644628e-02, 4.2318376715030852e-02, 4.0242617944662863e-02, 3.8164642054607470e-02, 3.6084603587615297e-02, 3.3996833876508717e-02, 3.1882796363975834e-02, 2.9789763446401957e-02, 2.7692470491289898e-02, 2.5623053329424623e-02, 2.3565145041869559e-02, 2.1577451231271083e-02, 1.9594096183331338e-02, 1.7699743714558576e-02, 1.5808634242088435e-02, 1.3974396007724947e-02, 1.2291732694586209e-02, 1.0690004189760929e-02, 9.2352626741992027e-03, 7.8144458027068677e-03, 6.4214721534057951e-03, 5.1321842923050349e-03, 4.0510023066279667e-03, 3.3782832646570508e-03, 2.7886130611093837e-03, 2.2778386986784791e-03, 1.7594119384961671e-03, 1.2811034408263952e-03, 8.6300201316233502e-04, 3.1205801960044576e-04, -3.2304877940737787e-04, -4.1355376205836264e-04, 8.7463532771988820e-03, 8.8133235437576705e-03, 8.8527835321371012e-03, 9.0286741649601675e-03, 9.3418419309759821e-03, 1.0112445827382143e-02, 1.1886260174073583e-02, 1.5364204292877227e-02, 2.0666904045427998e-02, 2.7220434341123086e-02, 3.4150746750117117e-02, 4.0743397552237250e-02, 4.6721460381741430e-02, 5.1794093007626309e-02, 5.5944017390300291e-02, 5.9116590771707431e-02, 6.1741637330116908e-02, 6.3546817648780493e-02, 6.4436391058771220e-02, 6.4041668087570169e-02, 6.2808531960068859e-02, 6.1048501785108004e-02, 5.8848411319423616e-02, 5.6492733062221905e-02, 5.4109737470061273e-02, 5.1668961220220577e-02, 4.9322064305953400e-02, 4.6962028510322065e-02, 4.4616333781627160e-02, 4.2287838524037738e-02, 3.9939998707257118e-02, 3.7555168165659361e-02, 3.5173579421329378e-02, 3.2773498882653039e-02, 3.0364499778622111e-02, 2.7971080760292696e-02, 2.5564695490541224e-02, 2.3195154615832988e-02, 2.0852953345450616e-02, 1.8589025181495376e-02, 1.6390774708370040e-02, 1.4275234609281089e-02, 1.2285316785912903e-02, 1.0426978647754518e-02, 8.6970395661133300e-03, 7.0884822966341618e-03, 5.5780264192608576e-03, 4.1734380720791671e-03, 3.2847835715726047e-03, 2.5652054653978037e-03, 1.9380952597539758e-03, 1.3497765804841519e-03, 8.2866422021921375e-04, 4.4300369126191400e-04, 1.6353271044808207e-04, 3.3346354224448466e-06, -1.3587502219254507e-04, -2.5172497007826050e-04, -3.6827323306666315e-04, -4.7861845831624253e-04, -6.3264230885867821e-04, -7.7808199853561641e-04, -9.3684596407314657e-04, 9.3312636185269113e-03, 9.3894154822624452e-03, 9.4011770963422312e-03, 9.5665009217722197e-03, 9.9119766131001621e-03, 1.0817112699954815e-02, 1.2888324595128916e-02, 1.6822111261016966e-02, 2.2536969094840598e-02, 2.9348028738742243e-02, 3.6280881564612115e-02, 4.2711048858663898e-02, 4.8322595076403144e-02, 5.2900158835877092e-02, 5.6358046543325546e-02, 5.9048521200951082e-02, 6.1020684613493394e-02, 6.2138316930761710e-02, 6.1902887302070518e-02, 6.0688692672063213e-02, 5.8844914016685408e-02, 5.6502046489252986e-02, 5.3956946019785526e-02, 5.1314436000099717e-02, 4.8599641167655798e-02, 4.5957523717746564e-02, 4.3286253763432876e-02, 4.0649285236176169e-02, 3.7975978362319626e-02, 3.5287157672234934e-02, 3.2574979591190857e-02, 2.9844181573521658e-02, 2.7095271237153825e-02, 2.4358728312222987e-02, 2.1676626128343146e-02, 1.9013140457063312e-02, 1.6478178701253406e-02, 1.4007709031534143e-02, 1.1708182016574855e-02, 9.5670317473026782e-03, 7.6101501429622171e-03, 5.8316040278060116e-03, 4.2110789613207557e-03, 3.0250702652115063e-03, 2.1743186955726062e-03, 1.4413271930045562e-03, 7.9469265045104833e-04, 3.0261485063792646e-04, -8.1103912042370866e-05, -3.1119174867975778e-04, -4.8860840247542036e-04, -6.3776237404381388e-04, -7.5631857262186525e-04, -8.2877368781856175e-04, -8.2904083419546191e-04, -8.0075853701845644e-04, -7.5090475585309186e-04, -7.0575455748531828e-04, -6.6101254287708844e-04, -6.2339713275984211e-04, -5.8990406183052468e-04, -6.0789304829611914e-04, -4.8956161789640029e-04, 9.9085231026622613e-03, 9.9557569699817959e-03, 9.9406701422565524e-03, 1.0093616473671692e-02, 1.0481927050799688e-02, 1.1533459129626982e-02, 1.3941629175693684e-02, 1.8308871619366899e-02, 2.4423092737683463e-02, 3.1380480567754401e-02, 3.8234073881843224e-02, 4.4418019113462770e-02, 4.9573595019042377e-02, 5.3519412856633149e-02, 5.6369044604312371e-02, 5.8497580747458200e-02, 5.9716571842174986e-02, 5.9829056242959096e-02, 5.8699490892279077e-02, 5.6793484689719016e-02, 5.4351286196708211e-02, 5.1609608629532726e-02, 4.8683340311742922e-02, 4.5702316722273692e-02, 4.2698970346136282e-02, 3.9716341797615448e-02, 3.6708067414284437e-02, 3.3696245541218799e-02, 3.0622958246923154e-02, 2.7550405578815652e-02, 2.4466138724665836e-02, 2.1412611221057750e-02, 1.8396625078239252e-02, 1.5516373167701261e-02, 1.2743931671142343e-02, 1.0233962711444845e-02, 7.8775295338459669e-03, 5.8305346977341787e-03, 3.9608994170312502e-03, 2.6129400778556293e-03, 1.6524724646605677e-03, 8.5497263509809809e-04, 2.3901970610440326e-04, -2.2510949619401410e-04, -5.3680785369506336e-04, -7.4658034310607442e-04, -9.0222238553778035e-04, -1.0158245015269773e-03, -1.0426527101097200e-03, -1.0288882843776815e-03, -9.8794888622958841e-04, -9.4240749031576860e-04, -8.9318704774149537e-04, -8.3222520406907676e-04, -7.6446828611265378e-04, -6.8438965680471477e-04, -6.0692754681687254e-04, -5.3173021367773057e-04, -4.6447407823478837e-04, -4.0318378049717003e-04, -3.3316161773085443e-04, -2.6243912407714640e-04, -2.3548688584574927e-04, 1.0473493755996106e-02, 1.0511518166304582e-02, 1.0470088102051283e-02, 1.0610515488176981e-02, 1.1050012523854257e-02, 1.2273400572210947e-02, 1.5031492888219738e-02, 1.9835746908833829e-02, 2.6288818417845947e-02, 3.3310769155381899e-02, 4.0011055100717008e-02, 4.5842728945507429e-02, 5.0410831260179978e-02, 5.3685813041355682e-02, 5.5961323245446420e-02, 5.7390284231590608e-02, 5.7791552057556705e-02, 5.6873874123247500e-02, 5.4974656393679537e-02, 5.2453898234218373e-02, 4.9472107069328218e-02, 4.6285423411739225e-02, 4.3018884916586925e-02, 3.9658204476510084e-02, 3.6327150436431005e-02, 3.2927389071264079e-02, 2.9535189217017591e-02, 2.6099473220239162e-02, 2.2678942957809940e-02, 1.9280161904880716e-02, 1.5985678278543958e-02, 1.2854786216340923e-02, 9.9892538008558730e-03, 7.3555071235484135e-03, 5.0995570702424015e-03, 3.0616942435569574e-03, 1.8691321862191255e-03, 8.8246752331665775e-04, 1.7717576313024480e-04, -3.5498021902754195e-04, -6.9990369619540513e-04, -9.1488384539067220e-04, -1.0575945604251419e-03, -1.1139633161634255e-03, -1.1073442476804488e-03, -1.0690639651927409e-03, -1.0166297379830345e-03, -9.4822458089242651e-04, -8.7601841470937448e-04, -7.9056765284323796e-04, -7.0638673560201900e-04, -6.2740270526392213e-04, -5.5518270880500990e-04, -4.8865384952382252e-04, -4.2306377116875130e-04, -3.6267908653618580e-04, -3.0553046393228043e-04, -2.5456360865246320e-04, -2.0761167891457312e-04, -1.6498076214794196e-04, -1.0756246774267337e-04, -6.4470169402205572e-05, -1.0153256551679875e-05, 1.1029149929313352e-02, 1.1056944410022250e-02, 1.0986953832373072e-02, 1.1120217828001702e-02, 1.1621345567010197e-02, 1.3035883375397395e-02, 1.6179317039632626e-02, 2.1393264555053072e-02, 2.8105275818595281e-02, 3.5124498320406865e-02, 4.1584839088403061e-02, 4.6941267035659012e-02, 5.0852803854166378e-02, 5.3426078191430207e-02, 5.5141423332342739e-02, 5.5725776197819550e-02, 5.5177767728677628e-02, 5.3364705601687962e-02, 5.0805612973731297e-02, 4.7688540397215595e-02, 4.4224813262033473e-02, 4.0616456916373340e-02, 3.6928950532857559e-02, 3.3197775864725929e-02, 2.9404548730717864e-02, 2.5629297243012515e-02, 2.1855051689220643e-02, 1.8111470984990240e-02, 1.4519742097554016e-02, 1.1163030431621724e-02, 8.1429591682913530e-03, 5.4725423439174184e-03, 3.1733449032254443e-03, 1.7219233133881117e-03, 6.3337344081740494e-04, -7.7786166821504612e-05, -6.1159764892449451e-04, -8.8196194269066957e-04, -1.0583524710847129e-03, -1.1176623427815468e-03, -1.1072603421503231e-03, -1.0578203287978584e-03, -9.8287128431963008e-04, -8.9791177182842056e-04, -8.0480044053438213e-04, -7.1010657559539899e-04, -6.2048452566104088e-04, -5.3988580185098365e-04, -4.6195447396575324e-04, -3.9174502060002715e-04, -3.2776940803680427e-04, -2.7215943456698652e-04, -2.2442645428540748e-04, -1.8298803581563516e-04, -1.4787493031502742e-04, -1.1669397078573480e-04, -9.0233008212862995e-05, -6.6781793033644446e-05, -4.6253600542777229e-05, -2.6257617187407622e-05, 4.2196135611610910e-07, 3.2329312697531092e-05, 4.0475261096172428e-05, 1.1568157282114761e-02, 1.1590685887956760e-02, 1.1487920463676500e-02, 1.1623251501233632e-02, 1.2198234660419279e-02, 1.3829245571230856e-02, 1.7359867237535125e-02, 2.2977101534865471e-02, 2.9864844430665196e-02, 3.6808239949759243e-02, 4.2932901169968576e-02, 4.7695395779974892e-02, 5.0884480195757725e-02, 5.2861443150787009e-02, 5.3817085539460852e-02, 5.3622081027603803e-02, 5.1988958100060018e-02, 4.9484519849716399e-02, 4.6220362021452396e-02, 4.2565052150794917e-02, 3.8624945685439054e-02, 3.4546991042830183e-02, 3.0415664291734319e-02, 2.6259885438285353e-02, 2.2108301542577830e-02, 1.7987501319882877e-02, 1.4046532696093105e-02, 1.0437201070800555e-02, 7.2034077070558733e-03, 4.4021049809529712e-03, 2.2242737584349187e-03, 9.1569365917725117e-04, 1.3569666030990803e-05, -5.9208942924645898e-04, -9.0752885714610681e-04, -1.0843449879498169e-03, -1.0984456233797029e-03, -1.0620351861857372e-03, -9.7292140150814701e-04, -8.7420873014744751e-04, -7.6594849102251694e-04, -6.5785287219322346e-04, -5.5804883863294348e-04, -4.6561638141434317e-04, -3.8245766252035900e-04, -3.0954627095813251e-04, -2.4716511979294394e-04, -1.9355771730890180e-04, -1.4945657917896446e-04, -1.1161291230902359e-04, -8.0504289748636529e-05, -5.5094183126506734e-05, -3.4840192445403280e-05, -1.9122989636142929e-05, -6.6810098403914743e-06, 2.5113696652953199e-06, 9.6470400134594420e-06, 1.4932470757738681e-05, 1.9574908496177575e-05, 2.4154980791420725e-05, 3.3084528597282648e-05, 4.1332266355661719e-05, 4.8025382058044966e-05, 1.2092166667387036e-02, 1.2110097766931368e-02, 1.1975231978007442e-02, 1.2120889850667249e-02, 1.2783973669307103e-02, 1.4648781002464811e-02, 1.8573987664738254e-02, 2.4543078890725323e-02, 3.1538947173798251e-02, 3.8303022969740974e-02, 4.4001995120264016e-02, 4.8084220243211677e-02, 5.0589908450699952e-02, 5.1909107563189158e-02, 5.1987853987433150e-02, 5.0823323882580144e-02, 4.8425764950156616e-02, 4.5144817679547165e-02, 4.1275736098314239e-02, 3.7046021056320516e-02, 3.2634642042465807e-02, 2.8104494473607862e-02, 2.3541134190787835e-02, 1.9034267894425739e-02, 1.4645958019993575e-02, 1.0663107026630200e-02, 7.1299078741140793e-03, 4.0719933356543996e-03, 1.8708469374557203e-03, 5.6014534730233398e-04, -2.9009437770141807e-04, -7.9754583335546188e-04, -1.0265142434707970e-03, -1.0708442764404569e-03, -1.0276756780432756e-03, -9.2018406423339681e-04, -8.0601367825728428e-04, -6.7522534036802250e-04, -5.5691751330702089e-04, -4.4675954878926015e-04, -3.5124612424890196e-04, -2.6991714110220978e-04, -2.0153052925451663e-04, -1.4577111179901354e-04, -1.0041208197706960e-04, -6.3994975797335564e-05, -3.5285143047550684e-05, -1.3498820373764116e-05, 3.4202877163264723e-06, 1.5700435663206017e-05, 2.4661427468425359e-05, 3.0706862515238234e-05, 3.4418848322363909e-05, 3.6316073678194211e-05, 3.6585855187098047e-05, 3.5834456937008856e-05, 3.4156647245231494e-05, 3.2115627082864524e-05, 2.9935666693135154e-05, 2.8418124183841949e-05, 2.7303293669076750e-05, 2.9181226901390706e-05, 2.5497282816786171e-05, 1.2595036411511587e-02, 1.2613945978467381e-02, 1.2449792639032174e-02, 1.2614501594275095e-02, 1.3380187278901797e-02, 1.5505985216999861e-02, 1.9816995369949457e-02, 2.6116658606787281e-02, 3.3112945537213050e-02, 3.9625018011391185e-02, 4.4779610122460643e-02, 4.8156010822592618e-02, 4.9955244810596947e-02, 5.0522411688881899e-02, 4.9772218358731107e-02, 4.7604220005615434e-02, 4.4373627624327699e-02, 4.0422700274041864e-02, 3.5938856807340179e-02, 3.1177540363680870e-02, 2.6277628566907980e-02, 2.1349917002911060e-02, 1.6504668085985257e-02, 1.1939947168324168e-02, 7.9793900977975923e-03, 4.4703540851250513e-03, 1.9340574781339136e-03, 5.2249142115524494e-04, -3.7464712322558309e-04, -8.5474805607009454e-04, -1.0327598994020342e-03, -1.0235685016005912e-03, -9.2608618399465730e-04, -7.9499744546466492e-04, -6.4864403371895512e-04, -5.1519596857819983e-04, -3.9076429203293927e-04, -2.8935749754588992e-04, -2.0377411678432637e-04, -1.3692705313933978e-04, -8.4310483242781969e-05, -4.3985530377828990e-05, -1.3942587107394730e-05, 8.1826576975625211e-06, 2.3885667729405655e-05, 3.4574087212105543e-05, 4.1324019675815874e-05, 4.5220812069326596e-05, 4.6681110208730592e-05, 4.6645585160389522e-05, 4.5373089430161329e-05, 4.3317319436435581e-05, 4.0703928236170063e-05, 3.7681776196721982e-05, 3.4455110995885193e-05, 3.1015389918812204e-05, 2.7557987934084191e-05, 2.4101317477010645e-05, 2.0893240261647737e-05, 1.7990764509405356e-05, 1.5040598530040258e-05, 1.2502887503221322e-05, 1.0760911334806405e-05, 1.3081171120907210e-02, 1.3101848273866946e-02, 1.2914794444513331e-02, 1.3102569059275915e-02, 1.3990466057398959e-02, 1.6393983105111649e-02, 2.1097002741201121e-02, 2.7621372708570877e-02, 3.4589643486480713e-02, 4.0739495376084164e-02, 4.5256005297121669e-02, 4.7850276625014898e-02, 4.8958810860394143e-02, 4.8643118590369724e-02, 4.6996547886380517e-02, 4.3948883105380643e-02, 4.0012284078060005e-02, 3.5325366616708355e-02, 3.0264602294267459e-02, 2.4989483003327671e-02, 1.9704293342241608e-02, 1.4555995038712360e-02, 9.9089573100079389e-03, 5.8795102771153481e-03, 2.4646204501640730e-03, 7.8769303762528343e-04, -2.9509601884890893e-04, -8.3991163640825296e-04, -1.0122664273562682e-03, -9.7982810724085278e-04, -8.5586436255868014e-04, -7.0100218645584896e-04, -5.4257137866442593e-04, -3.9801499760011219e-04, -2.7916303459155686e-04, -1.8225282297866895e-04, -1.1011949724459555e-04, -5.4783500872030443e-05, -1.5863329106195316e-05, 1.1810175611049027e-05, 3.0105498030148545e-05, 4.1614245221480029e-05, 4.8189675566421878e-05, 5.1102367072455690e-05, 5.1513496468718634e-05, 5.0211240078111014e-05, 4.7801233777836436e-05, 4.4633032455796715e-05, 4.1154547995278413e-05, 3.7464138268231323e-05, 3.3818396622543734e-05, 3.0283993279688481e-05, 2.6936695366691214e-05, 2.3809388682520636e-05, 2.0863073205628594e-05, 1.8118795952528319e-05, 1.5510523726817471e-05, 1.3068970059842838e-05, 1.0778706577316775e-05, 8.7469316848642432e-06, 6.2436724238845443e-06, 4.5031506557927896e-06, 2.4849039209698417e-06, 1.3548365873336932e-02, 1.3576630758921680e-02, 1.3364462721666573e-02, 1.3593108862804598e-02, 1.4613713141122538e-02, 1.7320718064858069e-02, 2.2381510105284521e-02, 2.9099609531470592e-02, 3.5909873077193649e-02, 4.1622698418598586e-02, 4.5416361742657764e-02, 4.7265560811984873e-02, 4.7614529228548315e-02, 4.6434010911684864e-02, 4.3787568802010429e-02, 3.9961962722092764e-02, 3.5198556513121156e-02, 2.9917054113084710e-02, 2.4283278561726816e-02, 1.8644719728352029e-02, 1.3168515478932621e-02, 8.4338565420375312e-03, 4.2918236033281862e-03, 1.4911049132513498e-03, 8.3414166098570781e-05, -7.6085054408482275e-04, -9.9379104679921527e-04, -9.7587493448140822e-04, -8.3452320989596063e-04, -6.5911014225792188e-04, -4.8434755844208949e-04, -3.3243619836315693e-04, -2.1139000123359593e-04, -1.2067943370726092e-04, -5.4483302370814727e-05, -9.8032007016394653e-06, 2.0266573675048616e-05, 3.8000965434936418e-05, 4.8081360926607966e-05, 5.2236765448941589e-05, 5.2794943227692101e-05, 5.0977770049453906e-05, 4.7741940280122565e-05, 4.3785352894459506e-05, 3.9515503166396593e-05, 3.5230080194447274e-05, 3.1098639015273936e-05, 2.7259273231695669e-05, 2.3714878908408472e-05, 2.0545424476082207e-05, 1.7719847091476883e-05, 1.5249153084053527e-05, 1.3104363286046682e-05, 1.1244679467179924e-05, 9.6347779873290591e-06, 8.2023232651821572e-06, 6.9107762160073549e-06, 5.7125314347609128e-06, 4.6334004577543665e-06, 3.7299082033032927e-06, 2.8723992755867006e-06, 2.3879041896857679e-06, 1.7756886921182306e-06, 1.3991936880869481e-02, 1.4034465993839038e-02, 1.3801098234829395e-02, 1.4083544929217765e-02, 1.5254525686614808e-02, 1.8284329555318311e-02, 2.3681999969276335e-02, 3.0488861706289606e-02, 3.7079204882741391e-02, 4.2244666343029695e-02, 4.5293077340735129e-02, 4.6394803713658284e-02, 4.5858354048437709e-02, 4.3806880243611380e-02, 4.0235366956301942e-02, 3.5527462743363727e-02, 3.0090742987045269e-02, 2.4158232980219036e-02, 1.8198475832325180e-02, 1.2363550014583322e-02, 7.4490642457913474e-03, 3.1551265895741459e-03, 9.0250742340754610e-04, -3.6824072366740761e-04, -9.4318100088121466e-04, -9.9498325694755098e-04, -8.7831471420659485e-04, -6.8070527343948902e-04, -4.8375241623682772e-04, -3.1454097105136045e-04, -1.8541702873655028e-04, -9.2701288499319505e-05, -2.9855157694118127e-05, 1.0336755397579679e-05, 3.3453051377481940e-05, 4.5498912219030447e-05, 4.9552509651675662e-05, 4.9252344122154724e-05, 4.6012980472090703e-05, 4.1517099378362882e-05, 3.6423339593407099e-05, 3.1323143989213698e-05, 2.6504778648690815e-05, 2.2107689374829591e-05, 1.8208269852897944e-05, 1.4812575285552539e-05, 1.1905368438777492e-05, 9.4349415185178989e-06, 7.3774668108721481e-06, 5.6649510982558203e-06, 4.2695565048964306e-06, 3.1422267326480197e-06, 2.2462416769450348e-06, 1.5421366860036987e-06, 9.8052601628489287e-07, 5.2024673733636032e-07, 1.1575562136813882e-07, -2.4173977990747344e-07, -4.6866136453971784e-07, -3.9744789982415872e-07, 5.8888524502856273e-07, 2.2292063471985691e-06, 3.2279586513496733e-06, 1.4416376456814461e-02, 1.4476513066160390e-02, 1.4222685381144526e-02, 1.4577438526967471e-02, 1.5911713596045145e-02, 1.9275796173856899e-02, 2.4982302366140671e-02, 3.1803582422989127e-02, 3.8067019779437973e-02, 4.2612609810113042e-02, 4.4856741471227785e-02, 4.5192767901821626e-02, 4.3741098846943646e-02, 4.0724745446342511e-02, 3.6265782466819670e-02, 3.0803272442355423e-02, 2.4641125704487805e-02, 1.8356111882701611e-02, 1.2159836012538065e-02, 6.9619392345937250e-03, 2.4798724884147515e-03, 5.1483913373457420e-04, -6.7988778232188057e-04, -9.9801276983827424e-04, -9.5747951958949752e-04, -7.7715600358299597e-04, -5.5094785614825113e-04, -3.5386436524689741e-04, -2.0281136947775555e-04, -9.8386073747670544e-05, -3.0989669944129548e-05, 8.6552638602492112e-06, 2.9212237005129400e-05, 3.7332171298986037e-05, 3.8177333787643830e-05, 3.4706711604358565e-05, 2.9428585582511778e-05, 2.3344114387666872e-05, 1.7459332945498381e-05, 1.2020509708264452e-05, 7.2866162495760398e-06, 3.2633048871832986e-06, -7.5459510451377609e-08, -2.7942378737602603e-06, -4.9780640094571412e-06, -6.7053941231292311e-06, -8.0536409715954624e-06, -9.0836729906446383e-06, -9.8618230920120784e-06, -1.0427759351064255e-05, -1.0827871909505631e-05, -1.1091388496982701e-05, -1.1247522070872367e-05, -1.1323124246845029e-05, -1.1343533469134291e-05, -1.1337561383349995e-05, -1.1323127979482380e-05, -1.1256782613013297e-05, -1.1008841643713963e-05, -1.0089058435498839e-05, -7.3854359354565457e-06, -1.9640339721607183e-06, -6.2286728781083015e-08, 1.4813934503874268e-02, 1.4903184388899014e-02, 1.4637310694439506e-02, 1.5071289598095797e-02, 1.6589227477126565e-02, 2.0282415384705633e-02, 2.6266513104474681e-02, 3.3021450955301325e-02, 3.8900876224821211e-02, 4.2691405457198656e-02, 4.4145366197898647e-02, 4.3643708760368535e-02, 4.1324751656314142e-02, 3.7261305544589722e-02, 3.1930086862538093e-02, 2.5719538318496632e-02, 1.9130086977637389e-02, 1.2575524142001495e-02, 7.0025700268198428e-03, 2.2718684650216239e-03, 3.0386070895471403e-04, -8.8356885802760886e-04, -1.0384691726044834e-03, -9.4416477630355827e-04, -7.0308612166764038e-04, -4.6489579570359660e-04, -2.7618390022614536e-04, -1.4412864009241891e-04, -6.1043859238670847e-05, -1.4370407804483467e-05, 7.7266651434968877e-06, 1.4864719792670627e-05, 1.3659446334332287e-05, 8.4010232667043469e-06, 1.5311985724837458e-06, -5.3727115223870546e-06, -1.1735572512768325e-05, -1.7123561857472533e-05, -2.1577558556741085e-05, -2.5093711610733781e-05, -2.7826505686609246e-05, -2.9891798522871916e-05, -3.1420826779503253e-05, -3.2526309768396772e-05, -3.3300804622047033e-05, -3.3821753451036154e-05, -3.4149011359090922e-05, -3.4333160715061239e-05, -3.4408388595997482e-05, -3.4407219980816553e-05, -3.4349022594489531e-05, -3.4251418743664670e-05, -3.4126629350007260e-05, -3.3984442085773139e-05, -3.3836183111551515e-05, -3.3691365575517503e-05, -3.3541173919128505e-05, -3.3344257481033562e-05, -3.2826436717114458e-05, -3.1543044075322086e-05, -2.6949603821845591e-05, -1.9171901799102698e-05, -1.1854557900622292e-05, 1.5203744474096085e-02, 1.5311171155252327e-02, 1.5045653846172388e-02, 1.5571367346358153e-02, 1.7281864638519603e-02, 2.1313364031341354e-02, 2.7501671957073880e-02, 3.4133823983065519e-02, 3.9496856805895930e-02, 4.2522273299361056e-02, 4.3153532846510155e-02, 4.1741765611185332e-02, 3.8425834450294030e-02, 3.3443750839405942e-02, 2.7299033471988247e-02, 2.0511799612066457e-02, 1.3635221125868799e-02, 7.5935240746455692e-03, 2.5119886676749732e-03, 2.8663762172848869e-04, -9.7086666348230276e-04, -1.0800342572182507e-03, -9.5882745750848020e-04, -6.6996588044537591e-04, -4.2569597127862521e-04, -2.4145080896404510e-04, -1.2407224893587945e-04, -5.7708089737797424e-05, -2.6633199195371881e-05, -1.6648706054227603e-05, -1.8011972793863761e-05, -2.4513208160658541e-05, -3.2598284842590326e-05, -4.0435463408107631e-05, -4.7175710844219121e-05, -5.2642142559232040e-05, -5.6822204558300846e-05, -5.9940852220187546e-05, -6.2158834579060154e-05, -6.3699732242518086e-05, -6.4715713790595376e-05, -6.5351727726657138e-05, -6.5712775470375140e-05, -6.5880521343285125e-05, -6.5916009023376132e-05, -6.5863056779609676e-05, -6.5754011285106917e-05, -6.5610637845637734e-05, -6.5450269621540513e-05, -6.5282719111888908e-05, -6.5115937924725207e-05, -6.4954190760517979e-05, -6.4798313349469038e-05, -6.4650245652711347e-05, -6.4507028022880604e-05, -6.4369576113619436e-05, -6.4238217502413518e-05, -6.4045495035654329e-05, -6.3735079021137018e-05, -6.2492900479242113e-05, -5.9116969585797353e-05, -4.7675151822631690e-05, -4.2954962703044706e-05, 1.5561667045239588e-02, 1.5726924127878367e-02, 1.5441767087415570e-02, 1.6076796309887769e-02, 1.7990324023988997e-02, 2.2341313939943538e-02, 2.8687720551465113e-02, 3.5074335931406748e-02, 3.9865684406897209e-02, 4.2051006653534104e-02, 4.1881957090275881e-02, 3.9496055415785235e-02, 3.5204475027944777e-02, 2.9336486867010049e-02, 2.2490610598392188e-02, 1.5335982026911048e-02, 8.7693226360603168e-03, 3.2756048290712601e-03, 5.0579673046095028e-04, -9.0677719795089178e-04, -1.0881856512676951e-03, -9.6531923778421134e-04, -6.5198796292981101e-04, -4.0172652793674796e-04, -2.1612049533061909e-04, -1.0802909699607753e-04, -5.2953416290411837e-05, -3.2410017371404631e-05, -3.0221223951827759e-05, -3.6664609398173125e-05, -4.5829626290378402e-05, -5.4808633807067100e-05, -6.2360814163698664e-05, -6.8184342226687198e-05, -7.2421592975069522e-05, -7.5333522299131765e-05, -7.7251652751070016e-05, -7.8424616150709088e-05, -7.9089103968662402e-05, -7.9399262104895530e-05, -7.9483851644727001e-05, -7.9425368596133493e-05, -7.9284246003584997e-05, -7.9099894675078579e-05, -7.8897945709931631e-05, -7.8694691840815921e-05, -7.8499701323065277e-05, -7.8318776669098194e-05, -7.8154433978965568e-05, -7.8007840425929167e-05, -7.7879383772339622e-05, -7.7766236707181010e-05, -7.7668847159967748e-05, -7.7577478474120804e-05, -7.7496772251692598e-05, -7.7415707043903341e-05, -7.7366753465118887e-05, -7.7408055737329738e-05, -7.7574628412984816e-05, -7.8146832877079513e-05, -7.7932011644597706e-05, -7.7168726557288011e-05, -6.2967006510435334e-05, 1.5967308195176631e-02, 1.6113735595672807e-02, 1.5837946706800402e-02, 1.6579753880214668e-02, 1.8711093660408785e-02, 2.3351261115905110e-02, 2.9777308155591122e-02, 3.5880551505304836e-02, 3.9987827201758856e-02, 4.1338669061559481e-02, 4.0300590320674026e-02, 3.7002730388457736e-02, 3.1683547257528366e-02, 2.5014794133811458e-02, 1.7684091951124220e-02, 1.0568899345986841e-02, 4.5950776560390715e-03, 1.0208277352083501e-03, -6.2525252519312409e-04, -9.9253043691254123e-04, -8.8982847814423444e-04, -5.7570064576184532e-04, -3.1683812425958077e-04, -1.2704621490470318e-04, -2.3342896838437195e-05, 2.5238637499138065e-05, 3.9121937822504049e-05, 3.6442294559736284e-05, 2.7150134169271192e-05, 1.6933700478146162e-05, 8.0965232389676362e-06, 1.3717256325977181e-06, -3.3404855249389009e-06, -6.4153696652254293e-06, -8.2733500401048206e-06, -9.2944475157581301e-06, -9.7564262257284882e-06, -9.8770245398793454e-06, -9.7921248614891650e-06, -9.6017483598463482e-06, -9.3629202834041505e-06, -9.1137471031445021e-06, -8.8743900665308468e-06, -8.6557547728311045e-06, -8.4623556394882427e-06, -8.2950822947880472e-06, -8.1527745616365627e-06, -8.0335153468262677e-06, -7.9346518493718320e-06, -7.8549152550563954e-06, -7.7902611374027512e-06, -7.7427681802145695e-06, -7.7016761616051539e-06, -7.6773780747818964e-06, -7.6427561202918858e-06, -7.6490326411912085e-06, -7.7028242623921833e-06, -8.0533291813031136e-06, -9.1832178067581911e-06, -1.1767849607866828e-05, -2.0778643769109273e-05, -3.0962676501661323e-05, -4.9905316634940182e-05, 1.6292665363557023e-02, 1.6574225587836069e-02, 1.6215406642862449e-02, 1.7067661912527145e-02, 1.9392640391670164e-02, 2.4330049438601023e-02, 3.0754900486259569e-02, 3.6499672476968746e-02, 3.9889301079190843e-02, 4.0419799426603842e-02, 3.8431385365086543e-02, 3.4184309548175397e-02, 2.8000501231405728e-02, 2.0665242172223805e-02, 1.3053648885666543e-02, 6.4899645678329369e-03, 1.8780195766706996e-03, -8.4162506580778355e-05, -7.2602116988281634e-04, -6.4412304926536146e-04, -3.3340030698884361e-04, -5.1738340668563107e-05, 1.4837831606517667e-04, 2.5350209593583985e-04, 2.9839380991635592e-04, 3.0710401712464414e-04, 3.0042830351633413e-04, 2.8896755281769321e-04, 2.7821107882088206e-04, 2.6985625751603152e-04, 2.6411640467260950e-04, 2.6050726409740019e-04, 2.5844704681065662e-04, 2.5741607621337090e-04, 2.5702377525263086e-04, 2.5700431054473855e-04, 2.5717826525686638e-04, 2.5744102744316646e-04, 2.5772574773613466e-04, 2.5799987671821703e-04, 2.5824506863337935e-04, 2.5845572986242971e-04, 2.5863113361711921e-04, 2.5877406807998791e-04, 2.5888843154354111e-04, 2.5897864698987377e-04, 2.5904852255668060e-04, 2.5910213488454357e-04, 2.5914116186325826e-04, 2.5917002431930327e-04, 2.5918509552147245e-04, 2.5919709018495181e-04, 2.5918859783119800e-04, 2.5919846805164533e-04, 2.5916173425426150e-04, 2.5917926676198122e-04, 2.5897484882446360e-04, 2.5855880147635646e-04, 2.5692343074125115e-04, 2.5248733333703611e-04, 2.4069875426833463e-04, 2.0658110374501798e-04, 1.9764355923263986e-04, 1.7105835882631513e-02, 1.7085802405150948e-02, 1.6785889215980294e-02, 1.7635500479667481e-02, 2.0189705909502833e-02, 2.5451544718234704e-02, 3.1879098707584069e-02, 3.7122933044430019e-02, 3.9491396638651123e-02, 3.8958470569935753e-02, 3.5734038235218410e-02, 3.0272446805409699e-02, 2.3049329675254481e-02, 1.5000375515509467e-02, 7.6764796543428802e-03, 2.0125745102642272e-03, 1.9189215840326732e-04, -4.8358018852036469e-04, -1.4680556432690919e-04, 3.0727423132766846e-04, 6.8734924529248453e-04, 9.2033628597215492e-04, 1.0212767038286926e-03, 1.0488882510887863e-03, 1.0384541045861157e-03, 1.0182530957199706e-03, 9.9921245790128435e-04, 9.8579459142742018e-04, 9.7767957015083883e-04, 9.7357954459441755e-04, 9.7194277685872747e-04, 9.7166356408952834e-04, 9.7200888161162150e-04, 9.7257602749450315e-04, 9.7316139028983751e-04, 9.7367491481393457e-04, 9.7409324482802926e-04, 9.7441443343205018e-04, 9.7465415216827422e-04, 9.7482605063607013e-04, 9.7494640727540586e-04, 9.7502727894702558e-04, 9.7507937139239807e-04, 9.7511052760394540e-04, 9.7512708480818543e-04, 9.7513317882245249e-04, 9.7513296098753735e-04, 9.7512696570223041e-04, 9.7512027187175959e-04, 9.7510583044509310e-04, 9.7509923021739007e-04, 9.7506865671433140e-04, 9.7508000267919250e-04, 9.7501318179796909e-04, 9.7513152197554499e-04, 9.7497461488655387e-04, 9.7542303803072625e-04, 9.7475050314658682e-04, 9.7526711077007707e-04, 9.7190551004091305e-04, 9.6681779272076590e-04, 9.5666472599326884e-04, 8.9152261887259201e-04, 1.7271934441891588e-02, 1.7962187719497372e-02, 1.7287521984739745e-02, 1.7940068575058588e-02, 2.0456848425239007e-02, 2.5941203574587363e-02, 3.2524976331674921e-02, 3.7414964737016748e-02, 3.9125919594160889e-02, 3.7748069868449918e-02, 3.3824388104181986e-02, 2.7483665539353934e-02, 1.9694934708786135e-02, 1.1400390512911893e-02, 4.0251672511597584e-03, 6.9633461395867768e-04, -6.7801988431952882e-04, -1.9207000249856182e-04, 5.3428452989744233e-04, 1.2407619970597117e-03, 1.6855989366334710e-03, 1.9016951501485177e-03, 1.9713974724285400e-03, 1.9631764788563661e-03, 1.9308913516562511e-03, 1.8977811887791838e-03, 1.8741236235851010e-03, 1.8601553375468857e-03, 1.8536852027778226e-03, 1.8517164523145070e-03, 1.8520809679535347e-03, 1.8533413624202777e-03, 1.8547556382344462e-03, 1.8559843954255031e-03, 1.8569278922540265e-03, 1.8575967231303186e-03, 1.8580387651525832e-03, 1.8583135054934933e-03, 1.8584688535368643e-03, 1.8585454294668393e-03, 1.8585707289500153e-03, 1.8585652967308920e-03, 1.8585421858577221e-03, 1.8585104783128664e-03, 1.8584752364789153e-03, 1.8584407415933118e-03, 1.8584070048772213e-03, 1.8583790242014441e-03, 1.8583487265617798e-03, 1.8583336928274187e-03, 1.8582973000467727e-03, 1.8583176786508792e-03, 1.8582444705457781e-03, 1.8584247313933834e-03, 1.8582438285147606e-03, 1.8591668839462679e-03, 1.8586579955573311e-03, 1.8625574355738640e-03, 1.8608175413419622e-03, 1.8756832110015940e-03, 1.8712490441614505e-03, 1.9540334988721320e-03, 1.9990883996512535e-03, 1.8809819734946089e-02, 1.7991454125071547e-02, 1.7756663726581738e-02, 1.8198521720168222e-02, 2.0392628680205208e-02, 2.6406764091744247e-02, 3.3097886179240185e-02, 3.7936070543433405e-02, 3.8901741126235019e-02, 3.6996701585252756e-02, 3.2542483117814200e-02, 2.5613744487504544e-02, 1.7284874657559582e-02, 8.9046613532119383e-03, 1.1024184849965631e-03, -1.2588110630083480e-03, -1.3524698361755403e-03, -2.3591997172526545e-04, 9.2784570769837912e-04, 1.7877733052928373e-03, 2.2562522142700230e-03, 2.4461613924967778e-03, 2.4708271177235046e-03, 2.4294418980630996e-03, 2.3738128289986734e-03, 2.3292889737503916e-03, 2.3009153215523227e-03, 2.2866027199869060e-03, 2.2814993685179104e-03, 2.2814967941582557e-03, 2.2836666087713993e-03, 2.2863696365834477e-03, 2.2888052139333564e-03, 2.2907021418982934e-03, 2.2920431272682533e-03, 2.2929189958317752e-03, 2.2934456010076914e-03, 2.2937276579724991e-03, 2.2938488812069254e-03, 2.2938696036399948e-03, 2.2938321525165072e-03, 2.2937640838284522e-03, 2.2936832648758785e-03, 2.2936000896606463e-03, 2.2935212158823534e-03, 2.2934486773445160e-03, 2.2933862256868430e-03, 2.2933291023809052e-03, 2.2932876544359054e-03, 2.2932386816290982e-03, 2.2932299355810019e-03, 2.2931619406265551e-03, 2.2932592522379646e-03, 2.2930908861588705e-03, 2.2936942499726678e-03, 2.2931407369916729e-03, 2.2961171921770797e-03, 2.2938018051421680e-03, 2.3072198749646399e-03, 2.2967158684460654e-03, 2.3754605459204133e-03, 2.2958834172740416e-03, 2.6107840747550755e-03};
static const casadi_real casadi_c5[104] = {-2.5000000000000000e-01, -2.5000000000000000e-01, -2.5000000000000000e-01, -2.5000000000000000e-01, 2.5000000000000000e-01, 5.0000000000000000e-01, 7.5000000000000000e-01, 1., 1.2500000000000000e+00, 1.5000000000000000e+00, 1.7500000000000000e+00, 2., 2.2500000000000000e+00, 2.5000000000000000e+00, 2.7500000000000000e+00, 3., 3.2500000000000000e+00, 3.5000000000000000e+00, 3.7500000000000000e+00, 4., 4.2500000000000000e+00, 4.5000000000000000e+00, 4.7500000000000000e+00, 5., 5.2500000000000000e+00, 5.5000000000000000e+00, 5.7500000000000000e+00, 6., 6.2500000000000000e+00, 6.5000000000000000e+00, 6.7500000000000000e+00, 7., 7.2500000000000000e+00, 7.5000000000000000e+00, 7.7500000000000000e+00, 8., 8.2500000000000000e+00, 8.5000000000000000e+00, 8.7500000000000000e+00, 9., 9.2500000000000000e+00, 9.5000000000000000e+00, 9.7500000000000000e+00, 10., 1.0250000000000000e+01, 1.0500000000000000e+01, 1.0750000000000000e+01, 11., 1.1250000000000000e+01, 1.1500000000000000e+01, 1.1750000000000000e+01, 12., 1.2250000000000000e+01, 1.2500000000000000e+01, 1.2750000000000000e+01, 13., 1.3250000000000000e+01, 1.3500000000000000e+01, 1.3750000000000000e+01, 14., 1.4250000000000000e+01, 1.4500000000000000e+01, 1.4750000000000000e+01, 1.5250000000000000e+01, 1.5250000000000000e+01, 1.5250000000000000e+01, 1.5250000000000000e+01, -6., -6., -6., -6., -4., -3., -2., -1., 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12., 13., 14., 15., 16., 17., 18., 19., 20., 21., 22., 23., 24., 26., 26., 26., 26.};
void casadi_de_boor(casadi_real x, const casadi_real* knots, casadi_int n_knots, casadi_int degree, casadi_real* boor) {
casadi_int d, i;
for (d=1;d<degree+1;++d) {
for (i=0;i<n_knots-d-1;++i) {
casadi_real b, bottom;
b = 0;
bottom = knots[i + d] - knots[i];
if (bottom) b = (x - knots[i]) * boor[i] / bottom;
bottom = knots[i + d + 1] - knots[i + 1];
if (bottom) b += (knots[i + d + 1] - x) * boor[i + 1] / bottom;
boor[i] = b;
}
}
}
void casadi_fill(casadi_real* x, casadi_int n, casadi_real alpha) {
casadi_int i;
if (x) {
for (i=0; i<n; ++i) *x++ = alpha;
}
}
void casadi_fill_casadi_int(casadi_int* x, casadi_int n, casadi_int alpha) {
casadi_int i;
if (x) {
for (i=0; i<n; ++i) *x++ = alpha;
}
}
casadi_int casadi_low(casadi_real x, const double* grid, casadi_int ng, casadi_int lookup_mode) {
switch (lookup_mode) {
case 1:
{
double g0, dg;
casadi_int ret;
g0 = grid[0];
dg = grid[ng-1]-g0;
ret = (casadi_int) ((x-g0)*(ng-1)/dg);
if (ret<0) ret=0;
if (ret>ng-2) ret=ng-2;
return ret;
}
case 2:
{
casadi_int start, stop, pivot;
if (ng<2 || x<grid[1]) return 0;
if (x>grid[ng-1]) return ng-2;
start = 0;
stop = ng-1;
while (1) {
pivot = (stop+start)/2;
if (x < grid[pivot]) {
if (pivot==stop) return pivot;
stop = pivot;
} else {
if (pivot==start) return pivot;
start = pivot;
}
}
}
default:
{
casadi_int i;
for (i=0; i<ng-2; ++i) {
if (x < grid[i+1]) break;
}
return i;
}
}
}
void casadi_nd_boor_eval(casadi_real* ret, casadi_int n_dims, const casadi_real* all_knots, const casadi_int* offset, const casadi_int* all_degree, const casadi_int* strides, const casadi_real* c, casadi_int m, const casadi_real* all_x, const casadi_int* lookup_mode, casadi_int reverse, casadi_int* iw, casadi_real* w) {
casadi_int n_iter, k, i, pivot;
casadi_int *boor_offset, *starts, *index, *coeff_offset;
casadi_real *cumprod, *all_boor;
boor_offset = iw; iw+=n_dims+1;
starts = iw; iw+=n_dims;
index = iw; iw+=n_dims;
coeff_offset = iw;
cumprod = w; w+= n_dims+1;
all_boor = w;
boor_offset[0] = 0;
cumprod[n_dims] = 1;
coeff_offset[n_dims] = 0;
n_iter = 1;
for (k=0;k<n_dims;++k) {
casadi_real *boor;
const casadi_real* knots;
casadi_real x;
casadi_int degree, n_knots, n_b, L, start;
boor = all_boor+boor_offset[k];
degree = all_degree[k];
knots = all_knots + offset[k];
n_knots = offset[k+1]-offset[k];
n_b = n_knots-degree-1;
x = all_x[k];
L = casadi_low(x, knots+degree, n_knots-2*degree, lookup_mode[k]);
start = L;
if (start>n_b-degree-1) start = n_b-degree-1;
starts[k] = start;
casadi_fill(boor, 2*degree+1, 0.0);
if (x>=knots[0] && x<=knots[n_knots-1]) {
if (x==knots[1]) {
casadi_fill(boor, degree+1, 1.0);
} else if (x==knots[n_knots-1]) {
boor[degree] = 1;
} else if (knots[L+degree]==x) {
boor[degree-1] = 1;
} else {
boor[degree] = 1;
}
}
casadi_de_boor(x, knots+start, 2*degree+2, degree, boor);
boor+= degree+1;
n_iter*= degree+1;
boor_offset[k+1] = boor_offset[k] + degree+1;
}
casadi_fill_casadi_int(index, n_dims, 0);
for (pivot=n_dims-1;pivot>=0;--pivot) {
cumprod[pivot] = (*(all_boor+boor_offset[pivot]))*cumprod[pivot+1];
coeff_offset[pivot] = starts[pivot]*strides[pivot]+coeff_offset[pivot+1];
}
for (k=0;k<n_iter;++k) {
casadi_int pivot = 0;
for (i=0;i<m;++i) {
if (reverse) {
ret[coeff_offset[0]+i] += c[i]*cumprod[0];
} else {
ret[i] += c[coeff_offset[0]+i]*cumprod[0];
}
}
index[0]++;
{
while (index[pivot]==boor_offset[pivot+1]-boor_offset[pivot]) {
index[pivot] = 0;
if (pivot==n_dims-1) break;
index[++pivot]++;
}
while (pivot>0) {
cumprod[pivot] = (*(all_boor+boor_offset[pivot]+index[pivot]))*cumprod[pivot+1];
coeff_offset[pivot] = (starts[pivot]+index[pivot])*strides[pivot]+coeff_offset[pivot+1];
pivot--;
}
}
cumprod[0] = (*(all_boor+index[0]))*cumprod[1];
coeff_offset[0] = (starts[0]+index[0])*m+coeff_offset[1];
}
}
void casadi_copy(const casadi_real* x, casadi_int n, casadi_real* y) {
casadi_int i;
if (y) {
if (x) {
for (i=0; i<n; ++i) *y++ = *x++;
} else {
for (i=0; i<n; ++i) *y++ = 0.;
}
}
}
casadi_real casadi_sq(casadi_real x) { return x*x;}
void casadi_mtimes(const casadi_real* x, const casadi_int* sp_x, const casadi_real* y, const casadi_int* sp_y, casadi_real* z, const casadi_int* sp_z, casadi_real* w, casadi_int tr) {
casadi_int ncol_x, ncol_y, ncol_z, cc;
const casadi_int *colind_x, *row_x, *colind_y, *row_y, *colind_z, *row_z;
ncol_x = sp_x[1];
colind_x = sp_x+2; row_x = sp_x + 2 + ncol_x+1;
ncol_y = sp_y[1];
colind_y = sp_y+2; row_y = sp_y + 2 + ncol_y+1;
ncol_z = sp_z[1];
colind_z = sp_z+2; row_z = sp_z + 2 + ncol_z+1;
if (tr) {
for (cc=0; cc<ncol_z; ++cc) {
casadi_int kk;
for (kk=colind_y[cc]; kk<colind_y[cc+1]; ++kk) {
w[row_y[kk]] = y[kk];
}
for (kk=colind_z[cc]; kk<colind_z[cc+1]; ++kk) {
casadi_int kk1;
casadi_int rr = row_z[kk];
for (kk1=colind_x[rr]; kk1<colind_x[rr+1]; ++kk1) {
z[kk] += x[kk1] * w[row_x[kk1]];
}
}
}
} else {
for (cc=0; cc<ncol_y; ++cc) {
casadi_int kk;
for (kk=colind_z[cc]; kk<colind_z[cc+1]; ++kk) {
w[row_z[kk]] = z[kk];
}
for (kk=colind_y[cc]; kk<colind_y[cc+1]; ++kk) {
casadi_int kk1;
casadi_int rr = row_y[kk];
for (kk1=colind_x[rr]; kk1<colind_x[rr+1]; ++kk1) {
w[row_x[kk1]] += x[kk1]*y[kk];
}
}
for (kk=colind_z[cc]; kk<colind_z[cc+1]; ++kk) {
z[kk] = w[row_z[kk]];
}
}
}
}
/* jac_helper:(i0[2])->(o0) */
static int casadi_f2(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, void* mem) {
if (res[0]) casadi_fill(res[0], 1, 0.0);
if (res[0]) CASADI_PREFIX(nd_boor_eval)(res[0],2,casadi_c1,casadi_s3,casadi_s2,casadi_s1,casadi_c0,1,arg[0],casadi_s0, 0, iw, w);
return 0;
}
/* jac_helper:(i0[2])->(o0) */
static int casadi_f3(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, void* mem) {
if (res[0]) casadi_fill(res[0], 1, 0.0);
if (res[0]) CASADI_PREFIX(nd_boor_eval)(res[0],2,casadi_c3,casadi_s6,casadi_s5,casadi_s4,casadi_c2,1,arg[0],casadi_s0, 0, iw, w);
return 0;
}
/* jac_Spline:(i0[2],i1[1x1,0nz])->(o0[1x2]) */
static int casadi_f1(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, void* mem) {
casadi_real **res1=res+1;
const casadi_real **arg1=arg+2;
casadi_real *w0=w+13, w1;
/* #0: @0 = input[0][0] */
casadi_copy(arg[0], 2, w0);
/* #1: @1 = jac_helper(@0) */
arg1[0]=w0;
res1[0]=(&w1);
if (casadi_f2(arg1, res1, iw, w, 0)) return 1;
/* #2: output[0][0] = @1 */
if (res[0]) res[0][0] = w1;
/* #3: @1 = jac_helper(@0) */
arg1[0]=w0;
res1[0]=(&w1);
if (casadi_f3(arg1, res1, iw, w, 0)) return 1;
/* #4: output[0][1] = @1 */
if (res[0]) res[0][1] = w1;
return 0;
}
/* Spline:(x[2])->(f) */
static int casadi_f4(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, void* mem) {
if (res[0]) casadi_fill(res[0], 1, 0.0);
if (res[0]) CASADI_PREFIX(nd_boor_eval)(res[0],2,casadi_c5,casadi_s8,casadi_s7,casadi_s4,casadi_c4,1,arg[0],casadi_s0, 0, iw, w);
return 0;
}
/* casadi_phi_jac_y_uhat:(i0[3],i1[4])->(o0[1x3,2nz],o1[1x4]) */
static int casadi_f0(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, void* mem) {
casadi_int i;
casadi_real **res1=res+2, *rr, *ss;
const casadi_real **arg1=arg+2;
casadi_real *w0=w+16, w1, w2, w3, *w4=w+21, w5, w6, w7, *w8=w+28, w9, w10, w11, w12, w13, w14, w15, w16, *w17=w+39, w18, w19, w20, *w21=w+44, *w23=w+46, w24, w25, w26, w27, w28, *w30=w+53, w31, w32, w33, w34, w35, w36, w38, w39, w40, w41, w42, *w43=w+66, w44, w45, w46, w47, w48, *w49=w+73, *w50=w+75;
/* #0: @0 = zeros(3x1,2nz) */
casadi_fill(w0, 2, 0.);
/* #1: @1 = 2.45669e-08 */
w1 = 2.4566864411722775e-08;
/* #2: @2 = 31.5 */
w2 = 3.1500000000000000e+01;
/* #3: @3 = 0 */
w3 = 0.;
/* #4: @4 = input[1][0] */
casadi_copy(arg[1], 4, w4);
/* #5: @5 = @4[2] */
for (rr=(&w5), ss=w4+2; ss!=w4+3; ss+=1) *rr++ = *ss;
/* #6: @6 = 1 */
w6 = 1.;
/* #7: @7 = 0.35 */
w7 = 3.4999999999999998e-01;
/* #8: @8 = input[0][0] */
casadi_copy(arg[0], 3, w8);
/* #9: @9 = @8[1] */
for (rr=(&w9), ss=w8+1; ss!=w8+2; ss+=1) *rr++ = *ss;
/* #10: @10 = cos(@9) */
w10 = cos( w9 );
/* #11: @10 = (@7*@10) */
w10 = (w7*w10);
/* #12: @6 = (@6+@10) */
w6 += w10;
/* #13: @10 = 0.14 */
w10 = 1.4000000000000001e-01;
/* #14: @11 = pow(@6,@10) */
w11 = pow(w6,w10);
/* #15: @12 = @4[3] */
for (rr=(&w12), ss=w4+3; ss!=w4+4; ss+=1) *rr++ = *ss;
/* #16: @13 = sin(@9) */
w13 = sin( w9 );
/* #17: @14 = (@12*@13) */
w14 = (w12*w13);
/* #18: @11 = (@11+@14) */
w11 += w14;
/* #19: @14 = (@5*@11) */
w14 = (w5*w11);
/* #20: @3 = (@3<@14) */
w3 = (w3<w14);
/* #21: @14 = (@3?@14:0) */
w14 = (w3?w14:0);
/* #22: @15 = sq(@14) */
w15 = casadi_sq( w14 );
/* #23: @16 = 5091.5 */
w16 = 5.0915006738566381e+03;
/* #24: @17 = zeros(1x2) */
casadi_fill(w17, 2, 0.);
/* #25: @18 = 63 */
w18 = 63.;
/* #26: @19 = @8[0] */
for (rr=(&w19), ss=w8+0; ss!=w8+1; ss+=1) *rr++ = *ss;
/* #27: @18 = (@18*@19) */
w18 *= w19;
/* #28: @18 = (@18/@14) */
w18 /= w14;
/* #29: @20 = @4[0] */
for (rr=(&w20), ss=w4+0; ss!=w4+1; ss+=1) *rr++ = *ss;
/* #30: @21 = horzcat(@18, @20) */
rr=w21;
*rr++ = w18;
*rr++ = w20;
/* #31: @21 = @21' */
/* #32: @22 = 00 */
/* #33: @23 = jac_Spline(@21, @22) */
arg1[0]=w21;
arg1[1]=0;
res1[0]=w23;
if (casadi_f1(arg1, res1, iw, w, 0)) return 1;
/* #34: @24 = 63 */
w24 = 63.;
/* #35: @24 = (@24/@14) */
w24 /= w14;
/* #36: @22 = 00 */
/* #37: @25 = horzcat(@24, @22) */
rr=(&w25);
*rr++ = w24;
/* #38: @25 = @25' */
/* #39: @24 = (@18/@14) */
w24 = (w18/w14);
/* #40: @26 = 1 */
w26 = 1.;
/* #41: @26 = (@3?@26:0) */
w26 = (w3?w26:0);
/* #42: @27 = cos(@9) */
w27 = cos( w9 );
/* #43: @27 = (@12*@27) */
w27 = (w12*w27);
/* #44: @28 = -0.86 */
w28 = -8.5999999999999999e-01;
/* #45: @6 = pow(@6,@28) */
w6 = pow(w6,w28);
/* #46: @10 = (@10*@6) */
w10 *= w6;
/* #47: @6 = sin(@9) */
w6 = sin( w9 );
/* #48: @7 = (@7*@6) */
w7 *= w6;
/* #49: @10 = (@10*@7) */
w10 *= w7;
/* #50: @27 = (@27-@10) */
w27 -= w10;
/* #51: @27 = (@5*@27) */
w27 = (w5*w27);
/* #52: @26 = (@26*@27) */
w26 *= w27;
/* #53: @24 = (@24*@26) */
w24 *= w26;
/* #54: @24 = (-@24) */
w24 = (- w24 );
/* #55: @29 = 00 */
/* #56: @27 = horzcat(@24, @29) */
rr=(&w27);
*rr++ = w24;
/* #57: @27 = @27' */
/* #58: @30 = horzcat(@25, @27) */
rr=w30;
*rr++ = w25;
*rr++ = w27;
/* #59: @17 = mac(@23,@30,@17) */
casadi_mtimes(w23, casadi_s9, w30, casadi_s10, w17, casadi_s9, w, 0);
/* #60: {@25, @27} = horzsplit(@17) */
w25 = w17[0];
w27 = w17[1];
/* #61: @25 = (@16*@25) */
w25 = (w16*w25);
/* #62: @25 = (@15*@25) */
w25 = (w15*w25);
/* #63: @24 = 0 */
w24 = 0.;
/* #64: @10 = 1 */
w10 = 1.;
/* #65: @7 = 0.35 */
w7 = 3.4999999999999998e-01;
/* #66: @6 = 2.0944 */
w6 = 2.0943951023931953e+00;
/* #67: @6 = (@6+@9) */
w6 += w9;
/* #68: @28 = cos(@6) */
w28 = cos( w6 );
/* #69: @28 = (@7*@28) */
w28 = (w7*w28);
/* #70: @10 = (@10+@28) */
w10 += w28;
/* #71: @28 = 0.14 */
w28 = 1.4000000000000001e-01;
/* #72: @31 = pow(@10,@28) */
w31 = pow(w10,w28);
/* #73: @32 = sin(@6) */
w32 = sin( w6 );
/* #74: @33 = (@12*@32) */
w33 = (w12*w32);
/* #75: @31 = (@31+@33) */
w31 += w33;
/* #76: @33 = (@5*@31) */
w33 = (w5*w31);
/* #77: @24 = (@24<@33) */
w24 = (w24<w33);
/* #78: @33 = (@24?@33:0) */
w33 = (w24?w33:0);
/* #79: @34 = sq(@33) */
w34 = casadi_sq( w33 );
/* #80: @35 = 5091.5 */
w35 = 5.0915006738566381e+03;
/* #81: @17 = zeros(1x2) */
casadi_fill(w17, 2, 0.);
/* #82: @36 = 63 */
w36 = 63.;
/* #83: @36 = (@36*@19) */
w36 *= w19;
/* #84: @36 = (@36/@33) */
w36 /= w33;
/* #85: @23 = horzcat(@36, @20) */
rr=w23;
*rr++ = w36;
*rr++ = w20;
/* #86: @23 = @23' */
/* #87: @37 = 00 */
/* #88: @30 = jac_Spline(@23, @37) */
arg1[0]=w23;
arg1[1]=0;
res1[0]=w30;
if (casadi_f1(arg1, res1, iw, w, 0)) return 1;
/* #89: @38 = 63 */
w38 = 63.;
/* #90: @38 = (@38/@33) */
w38 /= w33;
/* #91: @39 = horzcat(@38, @22) */
rr=(&w39);
*rr++ = w38;
/* #92: @39 = @39' */
/* #93: @38 = (@36/@33) */
w38 = (w36/w33);
/* #94: @40 = 1 */
w40 = 1.;
/* #95: @40 = (@24?@40:0) */
w40 = (w24?w40:0);
/* #96: @41 = cos(@6) */
w41 = cos( w6 );
/* #97: @41 = (@12*@41) */
w41 = (w12*w41);
/* #98: @42 = -0.86 */
w42 = -8.5999999999999999e-01;
/* #99: @10 = pow(@10,@42) */
w10 = pow(w10,w42);
/* #100: @28 = (@28*@10) */
w28 *= w10;
/* #101: @6 = sin(@6) */
w6 = sin( w6 );
/* #102: @7 = (@7*@6) */
w7 *= w6;
/* #103: @28 = (@28*@7) */
w28 *= w7;
/* #104: @41 = (@41-@28) */
w41 -= w28;
/* #105: @41 = (@5*@41) */
w41 = (w5*w41);
/* #106: @40 = (@40*@41) */
w40 *= w41;
/* #107: @38 = (@38*@40) */
w38 *= w40;
/* #108: @38 = (-@38) */
w38 = (- w38 );
/* #109: @41 = horzcat(@38, @29) */
rr=(&w41);
*rr++ = w38;
/* #110: @41 = @41' */
/* #111: @43 = horzcat(@39, @41) */
rr=w43;
*rr++ = w39;
*rr++ = w41;
/* #112: @17 = mac(@30,@43,@17) */
casadi_mtimes(w30, casadi_s9, w43, casadi_s10, w17, casadi_s9, w, 0);
/* #113: {@39, @41} = horzsplit(@17) */
w39 = w17[0];
w41 = w17[1];
/* #114: @39 = (@35*@39) */
w39 = (w35*w39);
/* #115: @39 = (@34*@39) */
w39 = (w34*w39);
/* #116: @25 = (@25+@39) */
w25 += w39;
/* #117: @39 = 0 */
w39 = 0.;
/* #118: @38 = 1 */
w38 = 1.;
/* #119: @28 = 0.35 */
w28 = 3.4999999999999998e-01;
/* #120: @7 = 4.18879 */
w7 = 4.1887902047863905e+00;
/* #121: @7 = (@7+@9) */
w7 += w9;
/* #122: @9 = cos(@7) */
w9 = cos( w7 );
/* #123: @9 = (@28*@9) */
w9 = (w28*w9);
/* #124: @38 = (@38+@9) */
w38 += w9;
/* #125: @9 = 0.14 */
w9 = 1.4000000000000001e-01;
/* #126: @6 = pow(@38,@9) */
w6 = pow(w38,w9);
/* #127: @10 = sin(@7) */
w10 = sin( w7 );
/* #128: @42 = (@12*@10) */
w42 = (w12*w10);
/* #129: @6 = (@6+@42) */
w6 += w42;
/* #130: @42 = (@5*@6) */
w42 = (w5*w6);
/* #131: @39 = (@39<@42) */
w39 = (w39<w42);
/* #132: @42 = (@39?@42:0) */
w42 = (w39?w42:0);
/* #133: @44 = sq(@42) */
w44 = casadi_sq( w42 );
/* #134: @45 = 5091.5 */
w45 = 5.0915006738566381e+03;
/* #135: @17 = zeros(1x2) */
casadi_fill(w17, 2, 0.);
/* #136: @46 = 63 */
w46 = 63.;
/* #137: @46 = (@46*@19) */
w46 *= w19;
/* #138: @46 = (@46/@42) */
w46 /= w42;
/* #139: @30 = horzcat(@46, @20) */
rr=w30;
*rr++ = w46;
*rr++ = w20;
/* #140: @30 = @30' */
/* #141: @37 = 00 */
/* #142: @43 = jac_Spline(@30, @37) */
arg1[0]=w30;
arg1[1]=0;
res1[0]=w43;
if (casadi_f1(arg1, res1, iw, w, 0)) return 1;
/* #143: @20 = 63 */
w20 = 63.;
/* #144: @20 = (@20/@42) */
w20 /= w42;
/* #145: @19 = horzcat(@20, @22) */
rr=(&w19);
*rr++ = w20;
/* #146: @19 = @19' */
/* #147: @20 = (@46/@42) */
w20 = (w46/w42);
/* #148: @47 = 1 */
w47 = 1.;
/* #149: @47 = (@39?@47:0) */
w47 = (w39?w47:0);
/* #150: @48 = cos(@7) */
w48 = cos( w7 );
/* #151: @12 = (@12*@48) */
w12 *= w48;
/* #152: @48 = -0.86 */
w48 = -8.5999999999999999e-01;
/* #153: @38 = pow(@38,@48) */
w38 = pow(w38,w48);
/* #154: @9 = (@9*@38) */
w9 *= w38;
/* #155: @7 = sin(@7) */
w7 = sin( w7 );
/* #156: @28 = (@28*@7) */
w28 *= w7;
/* #157: @9 = (@9*@28) */
w9 *= w28;
/* #158: @12 = (@12-@9) */
w12 -= w9;
/* #159: @12 = (@5*@12) */
w12 = (w5*w12);
/* #160: @47 = (@47*@12) */
w47 *= w12;
/* #161: @20 = (@20*@47) */
w20 *= w47;
/* #162: @20 = (-@20) */
w20 = (- w20 );
/* #163: @12 = horzcat(@20, @29) */
rr=(&w12);
*rr++ = w20;
/* #164: @12 = @12' */
/* #165: @49 = horzcat(@19, @12) */
rr=w49;
*rr++ = w19;
*rr++ = w12;
/* #166: @17 = mac(@43,@49,@17) */
casadi_mtimes(w43, casadi_s9, w49, casadi_s10, w17, casadi_s9, w, 0);
/* #167: {@19, @12} = horzsplit(@17) */
w19 = w17[0];
w12 = w17[1];
/* #168: @19 = (@45*@19) */
w19 = (w45*w19);
/* #169: @19 = (@44*@19) */
w19 = (w44*w19);
/* #170: @25 = (@25+@19) */
w25 += w19;
/* #171: @25 = (@2*@25) */
w25 = (w2*w25);
/* #172: @25 = (@1*@25) */
w25 = (w1*w25);
/* #173: (@0[0] = @25) */
for (rr=w0+0, ss=(&w25); rr!=w0+1; rr+=1) *rr = *ss++;
/* #174: @27 = (@16*@27) */
w27 = (w16*w27);
/* #175: @27 = (@15*@27) */
w27 = (w15*w27);
/* #176: @25 = Spline(@21) */
arg1[0]=w21;
res1[0]=(&w25);
if (casadi_f4(arg1, res1, iw, w, 0)) return 1;
/* #177: @25 = (@16*@25) */
w25 = (w16*w25);
/* #178: @19 = (2.*@14) */
w19 = (2.* w14 );
/* #179: @19 = (@19*@26) */
w19 *= w26;
/* #180: @19 = (@25*@19) */
w19 = (w25*w19);
/* #181: @27 = (@27+@19) */
w27 += w19;
/* #182: @41 = (@35*@41) */
w41 = (w35*w41);
/* #183: @41 = (@34*@41) */
w41 = (w34*w41);
/* #184: @19 = Spline(@23) */
arg1[0]=w23;
res1[0]=(&w19);
if (casadi_f4(arg1, res1, iw, w, 0)) return 1;
/* #185: @19 = (@35*@19) */
w19 = (w35*w19);
/* #186: @26 = (2.*@33) */
w26 = (2.* w33 );
/* #187: @26 = (@26*@40) */
w26 *= w40;
/* #188: @26 = (@19*@26) */
w26 = (w19*w26);
/* #189: @41 = (@41+@26) */
w41 += w26;
/* #190: @27 = (@27+@41) */
w27 += w41;
/* #191: @12 = (@45*@12) */
w12 = (w45*w12);
/* #192: @12 = (@44*@12) */
w12 = (w44*w12);
/* #193: @41 = Spline(@30) */
arg1[0]=w30;
res1[0]=(&w41);
if (casadi_f4(arg1, res1, iw, w, 0)) return 1;
/* #194: @41 = (@45*@41) */
w41 = (w45*w41);
/* #195: @26 = (2.*@42) */
w26 = (2.* w42 );
/* #196: @26 = (@26*@47) */
w26 *= w47;
/* #197: @26 = (@41*@26) */
w26 = (w41*w26);
/* #198: @12 = (@12+@26) */
w12 += w26;
/* #199: @27 = (@27+@12) */
w27 += w12;
/* #200: @2 = (@2*@27) */
w2 *= w27;
/* #201: @1 = (@1*@2) */
w1 *= w2;
/* #202: (@0[1] = @1) */
for (rr=w0+1, ss=(&w1); rr!=w0+2; rr+=1) *rr = *ss++;
/* #203: output[0][0] = @0 */
casadi_copy(w0, 2, res[0]);
/* #204: @4 = zeros(4x1) */
casadi_fill(w4, 4, 0.);
/* #205: @50 = zeros(4x1) */
casadi_fill(w50, 4, 0.);
/* #206: @1 = -0.0238299 */
w1 = -2.3829858479371090e-02;
/* #207: (@50[1] += @1) */
for (rr=w50+1, ss=(&w1); rr!=w50+2; rr+=1) *rr += *ss++;
/* #208: @29 = 00 */
/* #209: @0 = jac_Spline(@30, @29) */
arg1[0]=w30;
arg1[1]=0;
res1[0]=w0;
if (casadi_f1(arg1, res1, iw, w, 0)) return 1;
/* #210: @0 = @0' */
/* #211: @1 = 7.73856e-07 */
w1 = 7.7385622896926737e-07;
/* #212: @44 = (@1*@44) */
w44 = (w1*w44);
/* #213: @45 = (@45*@44) */
w45 *= w44;
/* #214: @0 = (@0*@45) */
for (i=0, rr=w0; i<2; ++i) (*rr++) *= w45;
/* #215: @0 = @0' */
/* #216: {@45, @44} = horzsplit(@0) */
w45 = w0[0];
w44 = w0[1];
/* #217: @29 = 00 */
/* #218: @0 = jac_Spline(@23, @29) */
arg1[0]=w23;
arg1[1]=0;
res1[0]=w0;
if (casadi_f1(arg1, res1, iw, w, 0)) return 1;
/* #219: @0 = @0' */
/* #220: @34 = (@1*@34) */
w34 = (w1*w34);
/* #221: @35 = (@35*@34) */
w35 *= w34;
/* #222: @0 = (@0*@35) */
for (i=0, rr=w0; i<2; ++i) (*rr++) *= w35;
/* #223: @0 = @0' */
/* #224: {@35, @34} = horzsplit(@0) */
w35 = w0[0];
w34 = w0[1];
/* #225: @44 = (@44+@34) */
w44 += w34;
/* #226: @29 = 00 */
/* #227: @0 = jac_Spline(@21, @29) */
arg1[0]=w21;
arg1[1]=0;
res1[0]=w0;
if (casadi_f1(arg1, res1, iw, w, 0)) return 1;
/* #228: @0 = @0' */
/* #229: @15 = (@1*@15) */
w15 = (w1*w15);
/* #230: @16 = (@16*@15) */
w16 *= w15;
/* #231: @0 = (@0*@16) */
for (i=0, rr=w0; i<2; ++i) (*rr++) *= w16;
/* #232: @0 = @0' */
/* #233: {@16, @15} = horzsplit(@0) */
w16 = w0[0];
w15 = w0[1];
/* #234: @44 = (@44+@15) */
w44 += w15;
/* #235: (@50[0] += @44) */
for (rr=w50+0, ss=(&w44); rr!=w50+1; rr+=1) *rr += *ss++;
/* #236: @44 = 1 */
w44 = 1.;
/* #237: @39 = (@39?@44:0) */
w39 = (w39?w44:0);
/* #238: @44 = (2.*@42) */
w44 = (2.* w42 );
/* #239: @41 = (@1*@41) */
w41 = (w1*w41);
/* #240: @44 = (@44*@41) */
w44 *= w41;
/* #241: @46 = (@46/@42) */
w46 /= w42;
/* #242: @46 = (@46*@45) */
w46 *= w45;
/* #243: @44 = (@44-@46) */
w44 -= w46;
/* #244: @39 = (@39*@44) */
w39 *= w44;
/* #245: @44 = (@5*@39) */
w44 = (w5*w39);
/* #246: @10 = (@10*@44) */
w10 *= w44;
/* #247: @44 = 1 */
w44 = 1.;
/* #248: @24 = (@24?@44:0) */
w24 = (w24?w44:0);
/* #249: @44 = (2.*@33) */
w44 = (2.* w33 );
/* #250: @19 = (@1*@19) */
w19 = (w1*w19);
/* #251: @44 = (@44*@19) */
w44 *= w19;
/* #252: @36 = (@36/@33) */
w36 /= w33;
/* #253: @36 = (@36*@35) */
w36 *= w35;
/* #254: @44 = (@44-@36) */
w44 -= w36;
/* #255: @24 = (@24*@44) */
w24 *= w44;
/* #256: @44 = (@5*@24) */
w44 = (w5*w24);
/* #257: @32 = (@32*@44) */
w32 *= w44;
/* #258: @10 = (@10+@32) */
w10 += w32;
/* #259: @32 = 1 */
w32 = 1.;
/* #260: @3 = (@3?@32:0) */
w3 = (w3?w32:0);
/* #261: @32 = (2.*@14) */
w32 = (2.* w14 );
/* #262: @1 = (@1*@25) */
w1 *= w25;
/* #263: @32 = (@32*@1) */
w32 *= w1;
/* #264: @18 = (@18/@14) */
w18 /= w14;
/* #265: @18 = (@18*@16) */
w18 *= w16;
/* #266: @32 = (@32-@18) */
w32 -= w18;
/* #267: @3 = (@3*@32) */
w3 *= w32;
/* #268: @5 = (@5*@3) */
w5 *= w3;
/* #269: @13 = (@13*@5) */
w13 *= w5;
/* #270: @10 = (@10+@13) */
w10 += w13;
/* #271: (@50[3] += @10) */
for (rr=w50+3, ss=(&w10); rr!=w50+4; rr+=1) *rr += *ss++;
/* #272: @6 = (@6*@39) */
w6 *= w39;
/* #273: @31 = (@31*@24) */
w31 *= w24;
/* #274: @6 = (@6+@31) */
w6 += w31;
/* #275: @11 = (@11*@3) */
w11 *= w3;
/* #276: @6 = (@6+@11) */
w6 += w11;
/* #277: (@50[2] += @6) */
for (rr=w50+2, ss=(&w6); rr!=w50+3; rr+=1) *rr += *ss++;
/* #278: @6 = @50[0] */
for (rr=(&w6), ss=w50+0; ss!=w50+1; ss+=1) *rr++ = *ss;
/* #279: (@4[0] = @6) */
for (rr=w4+0, ss=(&w6); rr!=w4+1; rr+=1) *rr = *ss++;
/* #280: @6 = @50[1] */
for (rr=(&w6), ss=w50+1; ss!=w50+2; ss+=1) *rr++ = *ss;
/* #281: (@4[1] = @6) */
for (rr=w4+1, ss=(&w6); rr!=w4+2; rr+=1) *rr = *ss++;
/* #282: @6 = @50[2] */
for (rr=(&w6), ss=w50+2; ss!=w50+3; ss+=1) *rr++ = *ss;
/* #283: (@4[2] = @6) */
for (rr=w4+2, ss=(&w6); rr!=w4+3; rr+=1) *rr = *ss++;
/* #284: @6 = @50[3] */
for (rr=(&w6), ss=w50+3; ss!=w50+4; ss+=1) *rr++ = *ss;
/* #285: (@4[3] = @6) */
for (rr=w4+3, ss=(&w6); rr!=w4+4; rr+=1) *rr = *ss++;
/* #286: output[1][0] = @4 */
casadi_copy(w4, 4, res[1]);
return 0;
}
CASADI_SYMBOL_EXPORT int casadi_phi_jac_y_uhat(const casadi_real** arg, casadi_real** res, casadi_int* iw, casadi_real* w, void* mem){
return casadi_f0(arg, res, iw, w, mem);
}
CASADI_SYMBOL_EXPORT void casadi_phi_jac_y_uhat_incref(void) {
}
CASADI_SYMBOL_EXPORT void casadi_phi_jac_y_uhat_decref(void) {
}
CASADI_SYMBOL_EXPORT casadi_int casadi_phi_jac_y_uhat_n_in(void) { return 2;}
CASADI_SYMBOL_EXPORT casadi_int casadi_phi_jac_y_uhat_n_out(void) { return 2;}
CASADI_SYMBOL_EXPORT const char* casadi_phi_jac_y_uhat_name_in(casadi_int i){
switch (i) {
case 0: return "i0";
case 1: return "i1";
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const char* casadi_phi_jac_y_uhat_name_out(casadi_int i){
switch (i) {
case 0: return "o0";
case 1: return "o1";
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const casadi_int* casadi_phi_jac_y_uhat_sparsity_in(casadi_int i) {
switch (i) {
case 0: return casadi_s11;
case 1: return casadi_s12;
default: return 0;
}
}
CASADI_SYMBOL_EXPORT const casadi_int* casadi_phi_jac_y_uhat_sparsity_out(casadi_int i) {
switch (i) {
case 0: return casadi_s13;
case 1: return casadi_s14;
default: return 0;
}
}
CASADI_SYMBOL_EXPORT int casadi_phi_jac_y_uhat_work(casadi_int *sz_arg, casadi_int* sz_res, casadi_int *sz_iw, casadi_int *sz_w) {
if (sz_arg) *sz_arg = 5;
if (sz_res) *sz_res = 4;
if (sz_iw) *sz_iw = 14;
if (sz_w) *sz_w = 79;
return 0;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
|
the_stack_data/1156436.c | #include<stdio.h>
#include<stdlib.h>
struct node
{
int data;
struct node* next;
}node;
struct node* head;
void insert(int x,int n)
{
struct node* temp1 = (struct node*)malloc(sizeof(struct node));
temp1->data=x;
temp1->next=NULL;
if(n==1)
{
temp1->next=head;
head=temp1;
return;
}
struct node* temp2=head;
int i=0;
for(i=0;i<n-2;i++)
{
temp2=temp2->next;
}
temp1->next=temp2->next;
temp2->next=temp1;
}
void print(){
struct node *temp=head;
while (temp!=NULL)
{
printf("%d ",temp->data);
temp=temp->next;
}
printf("\n");
}
int main()
{
head=NULL;
insert(2,1);
insert(3,2);
insert(4,1);
insert(5,2);
insert(6,1);
print();
}
|
the_stack_data/7950523.c | // program to generate all permutation of the given string
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
//declare permutation and swap functions
void permutation(char *,int,int);
void swap(char *,char *);
int main()
{
char *s;
// dynamically creating string length
s=(char*)malloc(sizeof(char)*1000);
// getting string
fgets(s,1000,stdin);
// changing size to the length of string+1 to store null at end
s=realloc(s,strlen(s)+1);
//calling permutation
permutation(s,0,strlen(s)-1);
return 0;
}
void permutation(char *str,int s,int e)
{ //declare variables
static int count;
int i;
//base condition
if(s==e)
{
count++;
//Printing the string permutation's
printf("%d(%s)\n",count,str);
}
else
{
for(i=s;i<=e;i++)
{ //swapping variables value
swap(str+s,str+i);
//calling permutation function
permutation(str,s+1,e);
//now swap the variables value and make it before one
swap(str+s,str+i);
}
}
}
//swap function
void swap(char *a,char *b)
{
char temp;
//putting value in temp
temp=*a;
// putting value in a pointer
*a=*b;
//now putting value of temp in b pointer
*b=temp;
//swapping done
}
// Example:
//Input: abc
//Output: 1(abc)
// 2(acb)
// 3(bac)
// 4(bca)
// 5(cba)
// 6(cab)
|
the_stack_data/260648.c |
int
main(int argc, const char* argv[])
{
print_num(getgid());
return (0);
}
|
the_stack_data/506889.c | #include<stdio.h>
int main(void)
{
int number;
int count = 0;
int total;
printf("Enter your number(Positive integer):");
if (scanf("%d",&number) == 1)
{
for (int i = number -1; i > 1; i--)
{
if (number % i == 0&&number !=1)
{
count++;
}
total = 0;
for (int j = i-1; j > 1; j--)
{
if (i % j == 0&&i != 1)
{
total++;
}
}
if (total == 0)
{
printf("This is a prime number %d\n",i);
}
}
if (count == 0)
{
printf("This is a prime number %d",number);
}
}
else printf("Input error,please enter again");
return 0;
} |
the_stack_data/20256.c | /*
* Copyright (C) 2009-2021 Intel Corporation.
* SPDX-License-Identifier: MIT
*/
/***********************************************************************************/
/* This is a small application that calls a recursive function that have uses the */
/* the stack. It expose a problem in the way the stack was setup on FreeBSD. */
/***********************************************************************************/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pthread.h>
#include <memory.h>
#include <string.h>
// Stack size taken from the Linux default stack size.
#define STACK_SIZE (8 * 1024 * 1024)
#define ARRAY_SIZE 10000
#define BUCKET 100000
static int total_compares = 0;
// compare function for qsort and merge sort
int compare_int(const void* p, const void* q)
{
const int* pi = (const int*)p;
const int* qi = (const int*)q;
total_compares++;
return ((*pi) - (*qi));
}
// a naive version of merge sort that uses the stack a lot
void stacksort(int* array, size_t nelem, int (*compar)(const void*, const void*))
{
int left[ARRAY_SIZE];
int right[ARRAY_SIZE];
int i, nleft, nright, il, ir;
// stop condition
if (nelem == 1) return;
if (nelem == 2)
{
if (compar(&array[0], &array[1]) > 0)
{
int t = array[0];
array[0] = array[1];
array[1] = t;
}
return;
}
// split the array to the left and right arrays
for (i = 0; i < nelem / 2; i++)
{
left[i] = array[2 * i];
right[i] = array[2 * i + 1];
}
nleft = nright = nelem / 2;
if (nelem % 2)
{
left[nleft++] = array[nelem - 1];
}
stacksort(left, nleft, compar);
stacksort(right, nright, compar);
// merge the sorted arrays
for (il = ir = i = 0; i < nelem; i++)
{
if (il == nleft)
{
array[i] = right[ir++];
continue;
}
if (ir == nright)
{
array[i] = left[il++];
continue;
}
if (compar(&left[il], &right[ir]) > 0)
array[i] = right[ir++];
else
array[i] = left[il++];
}
}
void use_array(int* arr)
{
int i = 0, b[ARRAY_SIZE];
for (i = 0; i < ARRAY_SIZE; i++)
{
b[i] = arr[i] = random() % BUCKET;
}
qsort(b, ARRAY_SIZE, sizeof(int), compare_int);
printf("Total number of compares for qsort = %d\n", total_compares);
total_compares = 0;
stacksort(arr, ARRAY_SIZE, compare_int);
printf("Total number of compares for mergesort = %d\n", total_compares);
total_compares = 0;
}
void* thread(void* dummy)
{
int a[ARRAY_SIZE];
use_array(a);
return 0;
}
int main(int argc, char* argv[])
{
pthread_t l;
// Make sure the stack size is large enough.
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, STACK_SIZE);
fprintf(stderr, "Start\n");
pthread_create(&l, &attr, thread, 0);
pthread_join(l, 0);
return 0;
}
|
the_stack_data/1119932.c | int func(void) {
int class = 0;
return class;
}
|
the_stack_data/234518430.c | #include <stdio.h>
/*
main - it verifies if a number is multiple by three or five, and sum in "soma"
*/
#define NUMERO 1000
int main(){
int soma = 0;
for (int i = 1; i < NUMERO; i++){
if(i % 3 == 0 || i%5 == 0){
soma+= i;
}
}
printf("%d\n", soma);
}
|
the_stack_data/747953.c | /*
============================================================================
Author : Ztiany
Description : C语言的数据类型
============================================================================
*/
//声明头文件,即应用程序接口,类似Java的导包
#include <stdio.h>
#include <stdlib.h>
//支持布尔类型的头文件
#include <stdbool.h>
//定义常量
#define A 1.3
//const定义常量更灵活,可以定义数组
const int days[3] = {1, 2, 3};
//如果函数写在main后面,需要在main函数前面先声明这个函数
void dataType();
void memoryAddress();
//C程序一定是从主函数开始执行的,main函数的返回值为int类型.
int main() {
//数据类型与数据类下大小
dataType();
//获取内存地址
memoryAddress();
return EXIT_SUCCESS;
}
void dataType() {
//C语言中的数据类型
char c = 'c';
short hd = 1233;
int d = 12312312;
long sld = 432432;
long long ld = 232423423;
unsigned int ud = 323;
unsigned long uld = 3333;
float f = 1212.132121F;
double lf = 232.222222222;
bool flag = false;//布尔类型,c99添加
_Bool b1 = 1;//c99添加
_Bool b2 = 0;//c99添加
//打印变量
printf("%c\n", c);
printf("%ld\n", sld);
printf("%ld\n", uld);
printf("%hd\n", hd);
printf("%d\n", d);
printf("%d\n", ud);
printf("%lld\n", ld);
printf("%d\n", flag);
printf("%d\n", b1);
printf("%d\n", b2);
printf("%f\n", f);
printf("%lf\n", lf);
//打印数据类型的长度
printf("字符的长度是:%zd\n", sizeof(char));
printf("short的长度是:%zd\n", sizeof(short));
printf("int的长度是:%zd\n", sizeof(int));
printf("long的长度是:%zd\n", sizeof(long));
printf("long long的长度是:%zd\n", sizeof(long long));
printf("float的长度是:%zd\n", sizeof(float));
printf("double的长度是:%zd\n", sizeof(double));
printf("常量A=%f", A);
}
//获取与打印内存地址
void memoryAddress() {
int cc = 3;
printf("%p\n", &cc);
} |
the_stack_data/22011607.c | #include <stdio.h>
/*
Algorithm
1. Start
2. Declare variables for counter and to store the formula of triangular number - i and triangularNumber
3. Print "Triangular Number: "
4. Start for loop with counter i = 5
5. If i <= 50, go to next step. Else, go to step 10
6. Calculate triangularNumber = i * (i + 1) / 2
7. Print the value of triangularNumber
8. Calculate counter i + 5
9. Go back to step 5
10. End
*/
int main ()
{
int i, triangularNumber;
printf("Triangular Number: ");
for (i = 5; i <= 50; i+=5)
{
triangularNumber = i * (i + 1) / 2;
printf("%d ", triangularNumber);
}
return 0;
} |
the_stack_data/182952939.c | /*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Copyright 2009 Jan Pechanec, Vladimir Kotal. All rights reserved.
* Use is subject to license terms.
*/
/*
* The program opens the stdin and what is read in is just printed out on
* stdout. This example is to present that the user can edit the line before
* the Enter key is pressed and the app just gets the final result (because of
* the terminal canonical mode).
*
* However, if you redirect the input from a file, for example:
*
* ./a.out </etc/motd
*
* ...you will see that "LINE READ" is not printed for ever line of that file
* but for every filled-up buffer; '\n' has no special function here.
*/
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int
main(void)
{
int n;
char buf[1024];
while (1) {
printf("YOUR INPUT: ");
/*
* printf() above didn't use '\n' so we must tell stdio to flush
* the output.
*/
fflush(stdout);
if ((n = read(STDIN_FILENO, buf, sizeof(buf) - 1)) == -1)
exit(1);
if (n == 0) {
(void) printf("END-OF-FILE\n");
break;
}
/* Replace '\n' with '\0' */
buf[n - 1] = '\0';
printf("LINE READ: '%s'\n", buf);
}
return (0);
}
|
the_stack_data/15762225.c | /*
* trx2usr - Convert a TRX firmware image to a U.S. Robotics firmware
* image by prepending a 28-byte header.
*
* This program was modeled after the usr-hdr.c program from the GPL'ed
* firmware for the U.S. Robotics Wireless MAXg Router (USR5461). The
* output file of this program can be uploaded via the web interface
* of the original U.S. Robotics firmware. Note that this program only
* works on a little-endian host platform.
*
* Copyright (C) 2006 Dick Streefland
*
* This is free software, licensed under the terms of the GNU General
* Public License as published by the Free Software Foundation.
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define TRX_MAGIC "HDR0"
#define USR_MAGIC 0x30525355 // "USR0"
#define EPI_VERSION 0x06235d03
#define COMPAT_ID 1 // USR5461
#define HARDWARE_REV 1
#define CRC32_INIT 0xffffffff
#define CHUNK (64*1024)
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
struct usr_header
{
uint32 magic; // "USR0"
uint32 len; // file length without this header
uint32 crc32; // CRC32 of the file without header
uint32 version; // EPI_VERSION
uint16 compatibility_id; // COMPAT_ID
uint16 hardware_revision; // HARDWARE_REV
uint32 reserved[2];
};
static const uint32 crc_32_tab [] = // CRC polynomial 0xedb88320
{
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
};
static char buf[CHUNK];
static uint32 crc32(uint32 crc, uint8* p, size_t n)
{
while (n--)
{
crc = crc_32_tab[(crc ^ *p++) & 0xff] ^ (crc >> 8);
}
return crc;
}
static int trx2usr(FILE* trx, FILE* usr)
{
struct usr_header hdr;
size_t n;
hdr.magic = USR_MAGIC;
hdr.len = 0;
hdr.crc32 = CRC32_INIT;
hdr.version = EPI_VERSION;
hdr.compatibility_id = COMPAT_ID;
hdr.hardware_revision = HARDWARE_REV;
hdr.reserved[0] = 0;
hdr.reserved[1] = 0;
fwrite(& hdr, sizeof(hdr), 1, usr);
while ((n = fread(buf, 1, CHUNK, trx)))
{
if (hdr.len == 0 && strncmp(buf, TRX_MAGIC, strlen(TRX_MAGIC)) != 0)
{
break;
}
fwrite(& buf, 1, n, usr);
hdr.len += n;
hdr.crc32 = crc32( hdr.crc32, (uint8 *) & buf, n);
}
fseek(usr, 0L, SEEK_SET);
fwrite(& hdr, sizeof(hdr), 1, usr);
if (n != 0)
{
fprintf(stderr, "Input is not a TRX file\n");
return 1;
}
if (hdr.len == 0)
{
fprintf(stderr, "Empty input\n");
return 1;
}
if (ferror(trx))
{
fprintf(stderr, "Read error\n");
return 1;
}
if (ferror(usr))
{
fprintf(stderr, "Write error\n");
return 1;
}
return 0;
}
extern int main(int argc, char *argv[])
{
FILE* in;
FILE* out;
int ret;
if (argc != 3)
{
fprintf(stderr, "Usage: trx2usr <trx input> <usr output>\n");
exit(2);
}
in = fopen(argv[1], "rb");
if (!in)
{
fprintf(stderr, "Cannot open \"%s\": %s\n", argv[1], strerror(errno));
exit(1);
}
out = fopen(argv[2], "wb");
if (!out)
{
fprintf(stderr, "Cannot create \"%s\": %s\n", argv[2], strerror(errno));
exit(1);
}
ret = trx2usr(in, out);
fclose(in);
fclose(out);
if (ret)
{
unlink(argv[2]);
}
return ret;
}
|
the_stack_data/179829344.c | /* Count blanks, tabs and newlines */
#include <stdio.h>
int main(){
int char_value_holder;
int tab_counter = 0, blank_counter = 0, new_line_counter = 0;
while((char_value_holder = getchar()) != EOF){
if(char_value_holder == '\t') ++tab_counter;
if(char_value_holder == ' ') ++blank_counter;
if(char_value_holder == '\n') ++new_line_counter;
}
printf("Tab count: %d\n", tab_counter);
printf("Blank count: %d\n", blank_counter);
printf("New Line count: %d\n", new_line_counter);
return 0;
}
|
the_stack_data/225142448.c | // Test this without pch.
// RUN: %clang_cc1 %s -include %s -verify -fsyntax-only
// Test with pch.
// RUN: %clang_cc1 %s -emit-pch -o %t
// RUN: %clang_cc1 %s -emit-llvm -include-pch %t -o - | FileCheck %s
// expected-no-diagnostics
#ifndef HEADER
#define HEADER
#pragma clang optimize off
#else
int a;
void f() {
a = 12345;
}
// Check that the function is decorated with optnone
// CHECK-DAG: @f() [[ATTRF:#[0-9]+]]
// CHECK-DAG: attributes [[ATTRF]] = { {{.*}}noinline{{.*}}optnone{{.*}} }
#endif
|
the_stack_data/1035352.c | #pragma once
//{{BLOCK(shared)
//======================================================================
//
// shared, 16x16@8,
// + palette 174 entries, not compressed
// Total size: 348 = 348
//
// Time-stamp: 2022-01-25, 15:03:45
// Exported by Cearn's GBA Image Transmogrifier, v0.8.17
// ( http://www.coranac.com/projects/#grit )
//
//======================================================================
const unsigned short sharedPal[174] __attribute__((aligned(4))) __attribute__((visibility("hidden")))=
{
0x0000,0x1842,0x1443,0x1044,0x1065,0x0C4A,0x0C67,0x042E,
0x0887,0x0888,0x04A9,0x04AA,0x04CB,0x04EE,0x190C,0x150C,
0x1D0B,0x010F,0x252B,0x112F,0x0151,0x316C,0x2170,0x2D6E,
0x256F,0x31B0,0x3DEF,0x21B5,0x4232,0x3E34,0x4A75,0x0842,
0x05A4,0x05AB,0x0CA6,0x14A5,0x08CA,0x14C8,0x0CCB,0x1CE6,
0x08CA,0x0CEB,0x2108,0x0D0C,0x2528,0x112E,0x2D4A,0x294A,
0x1150,0x156F,0x318B,0x35AC,0x39CD,0x1DB1,0x39CD,0x39ED,
0x3E0E,0x2614,0x4A50,0x3277,0x3800,0x0401,0x0C23,0x0C42,
0x0045,0x1044,0x1445,0x0466,0x1484,0x1C88,0x0489,0x28AA,
0x2CAC,0x0CCC,0x20E8,0x20CD,0x2D08,0x30EC,0x20EE,0x1D0F,
0x310D,0x1910,0x414D,0x1152,0x39AB,0x2572,0x2D92,0x51AF,
0x45B0,0x39B2,0x45D1,0x4DF1,0x31F5,0x4E2F,0x3E31,0x5E11,
0x6630,0x5270,0x4636,0x5E55,0x5E90,0x6674,0x5ACF,0x5677,
0x6AB6,0x6EF9,0x6B19,0x779C,0x7BFE,0x3C00,0x0001,0x0003,
0x0004,0x0022,0x0406,0x0008,0x0441,0x040C,0x0845,0x0C63,
0x0864,0x0865,0x0C2A,0x1012,0x0C86,0x10A5,0x1489,0x10C8,
0x18C6,0x1CCC,0x18EA,0x20EA,0x2108,0x2507,0x24F1,0x2D48,
0x254A,0x292C,0x2D6E,0x2D8C,0x358B,0x296F,0x3171,0x35CE,
0x3DCC,0x41F3,0x460E,0x4210,0x4A52,0x5250,0x5294,0x5EB3,
0x5AD5,0x6318,0x7357,0x6B5A,0x739C,0x7BDE,0x7FFF,0x18C6,
0x56B5,0x35AD,0x2D6B,0x4631,0x7FFF,0x2529,0x294A,0x4210,
0x318C,0x4E73,0x4A52,0x2108,0x39CE,0x5294,
};
//}}BLOCK(shared)
|
the_stack_data/181393809.c | #include <stdio.h>
void rev_str(char *str) {
char *last;
char tmp;
for (last = str; *last; last++);
last--;
while (str < last) {
tmp = *last;
*last-- = *str;
*str++ = tmp;
}
}
int main(int argc, char **argv) {
while (*++argv) {
rev_str(*argv);
printf("%s\n", *argv);
}
return 0;
}
|
the_stack_data/978491.c | // n/OOB/aS+aA/a(v,c)/lc/ln
int main(void) {
int a[1];
a[1] = 0;
return 0;
}
|
the_stack_data/176705075.c | #include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
struct node {
int data;
struct node *left;
struct node *right;
};
struct node* insert( struct node* root, int data ) {
if(root == NULL) {
struct node* node = (struct node*)malloc(sizeof(struct node));
node->data = data;
node->left = NULL;
node->right = NULL;
return node;
} else {
struct node* cur;
if(data <= root->data) {
cur = insert(root->left, data);
root->left = cur;
} else {
cur = insert(root->right, data);
root->right = cur;
}
return root;
}
}
/* you only have to complete the function given below.
node is defined as
struct node {
int data;
struct node *left;
struct node *right;
};
*/
struct node *lca( struct node *root, int v1, int v2 ) {
if(root == NULL)return NULL;
if(root->data > v1 && root->data > v2)
return lca(root->left, v1, v2);
if(root->data < v1 && root->data < v2)
return lca(root->right, v1, v2);
return root;
}
int main() {
struct node* root = NULL;
int t;
int data;
scanf("%d", &t);
while(t-- > 0) {
scanf("%d", &data);
root = insert(root, data);
}
int v1;
int v2;
scanf("%d%d", &v1, &v2);
struct node *ans = lca(root, v1, v2);
printf("%d", ans->data);
return 0;
}
|
the_stack_data/218893159.c | typedef int make_iso_gcc_happy;
|
the_stack_data/93583.c |
#include <stdio.h>
void scilab_rt_champ_i2i2d2i2d0d2s0_(int in00, int in01, int matrixin0[in00][in01],
int in10, int in11, int matrixin1[in10][in11],
int in20, int in21, double matrixin2[in20][in21],
int in30, int in31, int matrixin3[in30][in31],
double scalarin0,
int in40, int in41, double matrixin4[in40][in41],
char* scalarin1)
{
int i;
int j;
int val0 = 0;
int val1 = 0;
double val2 = 0;
int val3 = 0;
double val4 = 0;
for (i = 0; i < in00; ++i) {
for (j = 0; j < in01; ++j) {
val0 += matrixin0[i][j];
}
}
printf("%d", val0);
for (i = 0; i < in10; ++i) {
for (j = 0; j < in11; ++j) {
val1 += matrixin1[i][j];
}
}
printf("%d", val1);
for (i = 0; i < in20; ++i) {
for (j = 0; j < in21; ++j) {
val2 += matrixin2[i][j];
}
}
printf("%f", val2);
for (i = 0; i < in30; ++i) {
for (j = 0; j < in31; ++j) {
val3 += matrixin3[i][j];
}
}
printf("%d", val3);
printf("%f", scalarin0);
for (i = 0; i < in40; ++i) {
for (j = 0; j < in41; ++j) {
val4 += matrixin4[i][j];
}
}
printf("%f", val4);
printf("%s", scalarin1);
}
|
the_stack_data/134870.c | /**
******************************************************************************
* @file data_struct_tlv.c
* @author MCD Application Team
* @brief data_struct_tlv provides function to manipulate TLV structures
* and/or strings.
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2018 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
#if defined(_GUI_INTERFACE)
#include <stdint.h>
#include <stdlib.h>
#include "data_struct_tlv.h"
/**
* @brief TLV_init_encode initializes a TLV_ToSend_Data_t structure, to have it ready to be used with TLV_add.
* @note TLV_add and TLV_deinit_encode must not be called without calling this function first.
* SOF and EOF are created too.
* @param ToSendTLV The TLV_ToSend_Data_t structure that will be used.
* @param Tag The Tag to put as the master Tag in this instruction.
* @param SizeMax The maximal size of the instruction. Will be used to protect writing against overflow.
* @param Ptr A pointer to the value. This function does not allocate memory,
* it is the user's responsibility to allocate this.
* @return 0 if everything went fine, 0xFF otherwise.
*/
uint8_t TLV_init_encode(TLV_ToSend_Data_t *ToSendTLV, uint8_t Tag, uint16_t SizeMax, uint8_t *Ptr)
{
if (Ptr == NULL)
{
return 0xFF; /* Buffer is NULL*/
}
if (SizeMax < 11U)
{
return 0xFF; /* Because of his small max size, the buffer can't even receive one empty TLV*/
}
ToSendTLV->data = Ptr;
ToSendTLV->maxSize = SizeMax;
ToSendTLV->data[0] = TLV_SOF;
ToSendTLV->data[1] = TLV_SOF;
ToSendTLV->data[2] = TLV_SOF;
ToSendTLV->data[3] = TLV_SOF; /* SOF*/
ToSendTLV->data[4] = Tag; /* Tag*/
ToSendTLV->data[5] = 0;
ToSendTLV->data[6] = 0; /* Size*/
ToSendTLV->data[7] = TLV_EOF;
ToSendTLV->data[8] = TLV_EOF;
ToSendTLV->data[9] = TLV_EOF;
ToSendTLV->data[10] = TLV_EOF; /* EOF*/
ToSendTLV->EOFposition = 7;
return 0;
}
/**
* @brief TLV_add inserts data in the TLV format inside the value of a host TLV instruction.
* @note Refer to the USB-PD GUI INTERFACE SPECIFICATION DOCUMENT for more info about this practice (part 5.3.1)
* TLV_init_encode must be called with the same TLV_ToSend_Data_t structure before calling this function.
* This function can add data to the same TLV_ToSend_Data_t structure indefinitely as long
* as the maximal size defined during initialization of the structure isn't reached.
* SOF and EOF keeps being handled as data is added.
* @param ToSendTLV The TLV_ToSend_Data_t structure in which we add data.
* @param Tag The byte to put as Tag of the data we add
* @param Size The Size of the data, in bytes.
* @param Value A pointer to the Value to add.
* @return The number of bytes written if everything went fine, 0xFFFF otherwise.
*
*/
uint16_t TLV_add(TLV_ToSend_Data_t *ToSendTLV, uint8_t Tag, uint16_t Size, const uint8_t *Value)
{
if (ToSendTLV->data[ToSendTLV->EOFposition] != TLV_EOF)
{
return 0xFFFF; /* EOF has been lost. Has any TLV operation failed, or went interrupted ?*/
}
if ((ToSendTLV->EOFposition + 4U + 3U + Size) > ToSendTLV->maxSize)
{
return 0xFFFF; /* Can't add this TLV, because it will overflow the provided buffer.*/
}
if (ToSendTLV->data == NULL)
{
return 0xFFFF; /* Data points to NULL. Has the encoding been initialized with TLV_init_encode ?*/
}
if (ToSendTLV->EOFposition == 0xFFFFU)
{
return 0xFFFF; /* EOF at -1. Has the decoding been initialized with TLV_init_decode ?*/
}
ToSendTLV->data[ToSendTLV->EOFposition] = Tag; /* Tag*/
ToSendTLV->EOFposition++;
ToSendTLV->SizePosition = ToSendTLV->EOFposition;
ToSendTLV->data[ToSendTLV->EOFposition] = (uint8_t)((Size >> 8) & 0x00FFU); /* Size*/
ToSendTLV->data[ToSendTLV->EOFposition + 1U] = (uint8_t)((Size) & 0x00FFU);
ToSendTLV->EOFposition += 2U;
for (uint32_t index = 0U; index < Size; index++) /* Value*/
{
ToSendTLV->data[ToSendTLV->EOFposition] = Value[index];
ToSendTLV->EOFposition++;
}
ToSendTLV->data[ToSendTLV->EOFposition] = TLV_EOF;
ToSendTLV->data[ToSendTLV->EOFposition + 1U] = TLV_EOF;
ToSendTLV->data[ToSendTLV->EOFposition + 2U] = TLV_EOF;
ToSendTLV->data[ToSendTLV->EOFposition + 3U] = TLV_EOF; /* EOF*/
/* Update of the top level Size marker*/
uint16_t total_lgth = ((uint16_t)(ToSendTLV->data[5]) << 8) + (uint16_t)(ToSendTLV->data[6]) + 3U + Size;
ToSendTLV->data[5] = (uint8_t)(total_lgth >> 8);
ToSendTLV->data[6] = (uint8_t)total_lgth;
return (3U + Size);
}
/**
* @brief Inserts value inside the TLV packet
* @param ToSendTLV The TLV_ToSend_Data_t structure in which we add data.
* @param Size The Size of the data, in bytes.
* @param Value A pointer to the Value to add.
* @return The number of bytes written if everything went fine, 0xFFFF otherwise.
*
*/
uint16_t TLV_addValue(TLV_ToSend_Data_t *ToSendTLV, const uint8_t *Value, uint16_t Size)
{
if (ToSendTLV->data[ToSendTLV->EOFposition] != TLV_EOF)
{
return 0xFFFF; /* EOF has been lost. Has any TLV operation failed, or went interrupted ?*/
}
if ((ToSendTLV->EOFposition + 4U + 3U + Size) > ToSendTLV->maxSize)
{
return 0xFFFF; /* Can't add this TLV, because it will overflow the provided buffer.*/
}
if (ToSendTLV->data == NULL)
{
return 0xFFFF; /* Data points to NULL. Has the encoding been initialized with TLV_init_encode ?*/
}
if (ToSendTLV->EOFposition == 0xFFFFU)
{
return 0xFFFF; /* EOF at -1. Has the decoding been initialized with TLV_init_decode ?*/
}
for (uint32_t index = 0; index < Size; index++) /* Value*/
{
ToSendTLV->data[ToSendTLV->EOFposition] = Value[index];
ToSendTLV->EOFposition++;
}
ToSendTLV->data[ToSendTLV->EOFposition] = TLV_EOF;
ToSendTLV->data[ToSendTLV->EOFposition + 1U] = TLV_EOF;
ToSendTLV->data[ToSendTLV->EOFposition + 2U] = TLV_EOF;
ToSendTLV->data[ToSendTLV->EOFposition + 3U] = TLV_EOF; /* EOF*/
/* Update of the top level Size marker*/
uint16_t total_lgth = ((uint16_t)(ToSendTLV->data[5]) << 8) + (uint16_t)(ToSendTLV->data[6]) + Size;
ToSendTLV->data[5] = (uint8_t)(total_lgth >> 8);
ToSendTLV->data[6] = (uint8_t)(total_lgth);
return 3U + Size;
}
/**
* @brief Update size of previous inserted TAG inside the TLV packet
* @param ToSendTLV The TLV_ToSend_Data_t structure in which we add data.
* @param Size The Size of the data, in bytes.
* @return None
*
*/
void TLV_UpdateSizeTag(TLV_ToSend_Data_t *ToSendTLV, uint16_t Size)
{
ToSendTLV->data[ToSendTLV->SizePosition] = (uint8_t)(Size >> 8); /* Size*/
ToSendTLV->data[ToSendTLV->SizePosition + 1U] = (uint8_t)(Size & 0x00FFU);
}
/**
* @brief TLV_deinit_encode deinitialize a TLV_ToSend_Data_t structure.
* @note After this, TLV_add can no longer be used with this structure
* (unless if it is reinitialized with TLV_init_encode).
* If a TLV_ToSend_Data_t structure is used without deinitialization, the associated string can be altered.
* Once deinitialization is done, the string used can directly be send.
* @param ToSendTLV The TLV_ToSend_Data_t structure to deinitialize.
* @return None
*/
void TLV_deinit_encode(TLV_ToSend_Data_t *ToSendTLV)
{
ToSendTLV->data = NULL;
ToSendTLV->EOFposition = 0xFFFF;
ToSendTLV->maxSize = 0;
}
/**
* @brief TLV_init_decode initializes a TLV_Received_Data_t structure, to have it ready to be used with TLV_get.
* TLV_get and TLV_deinit_decode must not be called without calling this function first.
* @note This function places a cursor on the first parameter.
* @param ToProcessTLV The TLV_Received_Data_t that will be used.
* @param pReceivedString The string which will be decoded.
* @return The position of the cursor if everything went fine, 0xFF otherwise.
*/
uint8_t TLV_init_decode(TLV_Received_Data_t *ToProcessTLV, uint8_t *pReceivedString)
{
if (pReceivedString == NULL)
{
return 0xFF; /* Received string is NULL*/
}
if ((pReceivedString[0] != TLV_SOF)
|| (pReceivedString[1] != TLV_SOF)
|| (pReceivedString[2] != TLV_SOF)
|| (pReceivedString[3] != TLV_SOF))
{
return 0xFF; /* Incorrect SOF*/
}
ToProcessTLV->data = pReceivedString;
ToProcessTLV->cursor = 7; /* Cursor at start of value*/
return ((uint8_t)(ToProcessTLV->cursor));
}
/**
* @brief TLV_get gets data in TLV format from inside the value of a host TLV instruction.
* @note Refer to the USB-PD GUI INTERFACE SPECIFICATION DOCUMENT for more info about this practice (part 5.3.1)
* TLV_init_decode must be called with the same TLV_Received_Data_t structure before calling this function.
* Once this function has read its parameter, it places the cursor at the beginning of the next one.
* Refer to the returned value to see if there is one or not.
* @param ToProcessTLV The TLV_Received_Data_t structure contining the TLV data structure.
* @param Tag A pointer to where the decoded Tag should be stocked.
* @param Length A pointer to where the decoded size should be stocked.
* @param Value A double pointer, which will contain a pointer directly to the data in the reception buffer.
* @return 0 if the reading was fine and there is another parameter after,
* 1 if the reading was fine and it was the last parameter, 0xFF otherwise.
*/
uint8_t TLV_get(TLV_Received_Data_t *ToProcessTLV, uint8_t *Tag, uint16_t *Length, uint8_t **Value)
{
if (ToProcessTLV->data == NULL)
{
return 0xFF; /* Data points to NULL. Has the decoding been initialized with TLV_init_decode ?*/
}
if (ToProcessTLV->cursor == 0U)
{
return 0xFF; /* The cursor is not positioned. Has the decoding been initialized with TLV_init_decode ?*/
}
if (ToProcessTLV->data[ToProcessTLV->cursor] == TLV_EOF)
{
return 0xFF; /* EOF reached. There is not any parameter left to read.*/
}
/* Tag*/
*Tag = ToProcessTLV->data[ToProcessTLV->cursor];
ToProcessTLV->cursor++;
/* Length*/
*Length = ((uint16_t)(ToProcessTLV->data[ToProcessTLV->cursor]) << 8)
+ (uint16_t)(ToProcessTLV->data[ToProcessTLV->cursor + 1U]);
ToProcessTLV->cursor += 2U;
/* Value*/
*Value = &ToProcessTLV->data[ToProcessTLV->cursor];
ToProcessTLV->cursor += *Length;
return 0;
}
/**
* @brief TLV_deinit_decode deinitialize a TLV_Received_Data_t structure.
* @note After this, TLV_get can no longer be used with this structure
* (unless if it is reinitialized with TLV_init_decode).
* Once the cursor reach the EOF, there isn't anything to do except deinitializing
* the TLV_Received_Data_t structure with this function (eventually to reinitialize it after,
* to restart decoding from the beginning). This function do not handle any deallocation.
* @param ToProcessTLV The TLV_Received_Data_t structure to deinitialize.
* @return None
*/
void TLV_deinit_decode(TLV_Received_Data_t *ToProcessTLV)
{
ToProcessTLV->data = NULL;
ToProcessTLV->cursor = 0;
}
/**
* @brief TLV_getStringLength returns the length of a 8 bit TLV string, in bytes.
* @note This function relies on the length marker in the string. Whether there is or not the SOF and/or the EOF,
* it will return the size of the string without them.
* @param pString A uint8_t pString, under TLV format, with or without SOF or EOF.
* @return The size of the pString in bytes; including tag, length, and value; excluding SOF and EOF, if applicable.
*/
uint16_t TLV_get_string_length(const uint8_t *pString)
{
uint16_t length; /* Variable to be return.*/
uint8_t start = 0; /* To indicate the start of the real pString, in case there is a EOF. */
while (pString[start] == TLV_SOF)
{
start++;
} /* start variable is now after the SOF if there is one.*/
length = ((uint16_t)pString[start + 1U] << 8) | (uint16_t)pString[start + 2U];
length += 3U;
return length;
}
#endif /* _GUI_INTERFACE */
|
the_stack_data/54783.c | #include <math.h>
#define min2(a,b) (a<b? a : b)
#define min3(a,b,c) (min2(a,min2(b,c)))
#define max2(a,b) (a>b? a : b)
#define max3(a,b,c) (max2(a, max2(b, c)))
// from http://www.cs.rit.edu/~ncs/color/t_convert.html
// r,g,b values are from 0 to 1
// h = [0,360], s = [0,1], v = [0,1]
// if s == 0, then h = -1 (undefined)
void RGBtoHSV( float r, float g, float b, float *h, float *s, float *v )
{
float min, max, delta;
min = min3( r, g, b );
max = max3( r, g, b );
*v = max; // v
delta = max - min;
if( max != 0 )
*s = delta / max; // s
else {
// r = g = b = 0 // s = 0, v is undefined
*s = 0;
*h = -1;
return;
}
if( r == max )
*h = ( g - b ) / delta; // between yellow & magenta
else if( g == max )
*h = 2 + ( b - r ) / delta; // between cyan & yellow
else
*h = 4 + ( r - g ) / delta; // between magenta & cyan
*h *= 60; // degrees
if( *h < 0 )
*h += 360;
}
void HSVtoRGB( float *r, float *g, float *b, float h, float s, float v )
{
if (h==360) h = 0;
int i;
float f, p, q, t;
if( s == 0 ) {
// achromatic (grey)
*r = *g = *b = v;
return;
}
h /= 60; // sector 0 to 5
i = floorf( h );
f = h - i; // factorial part of h
p = v * ( 1 - s );
q = v * ( 1 - s * f );
t = v * ( 1 - s * ( 1 - f ) );
switch( i ) {
case 0:
*r = v;
*g = t;
*b = p;
break;
case 1:
*r = q;
*g = v;
*b = p;
break;
case 2:
*r = p;
*g = v;
*b = t;
break;
case 3:
*r = p;
*g = q;
*b = v;
break;
case 4:
*r = t;
*g = p;
*b = v;
break;
default: // case 5:
*r = v;
*g = p;
*b = q;
break;
}
} |
the_stack_data/54825145.c | #include <stdio.h>
int main( int argc, const char * argv [] )
{
const char * varname = argv[1];
int i = 0;
int c;
printf( "/* automatically generated by bin2hex */\n" );
printf( "static unsigned char %s [] =\n{\n", varname );
while ( ( c = getchar( ) ) != EOF ) {
if ( i != 0 && i % 10 == 0 )
printf( "\n" );
printf( "0x%02lx,", c & 0xFFl );
i++;
}
printf( "};\n#define %s_len %d\n", varname, i );
return 0;
}
|
the_stack_data/193892211.c | #include <stdio.h>
int main()
{
int money;
printf("enter amount of money :- ");
scanf("%d", &money);
int denomination[] = {100, 50, 10, 1};
int bills[] = {0, 0, 0, 0};
for (int i = 0; i < 4; i++)
{
bills[i] = money / denomination[i];
money = money % denomination[i];
}
printf("\nThe change is:- \n");
for (int i = 0; i < 3; i++)
{
printf("%d bills of rupees %d \n", bills[i], denomination[i]);
}
printf("remaining amount is:-%d",bills[3], denomination[3]);
}
|
the_stack_data/153224.c | #include <stdio.h>
#include <time.h>
#include <stdlib.h>
#define swap(x,y) ((x)^=(y),(y)^=(x),(x)^=(y))
#define LEN 1024
struct timespec timestart = {0,0};
struct timespec timeend = {0,0};
void sort(int *, int);
int main()
{
int *source = (int *)malloc(LEN*sizeof(int));
for(int i=0;i<LEN;i++)
source[i] = rand();
int i = 0;
clock_gettime(CLOCK_REALTIME,×tart);
sort(source, LEN);
clock_gettime(CLOCK_REALTIME,&timeend);
while(i<LEN)
{
printf("%d\t", source[i]);
i++;
}
printf("\n%lf ms",(double)(timeend.tv_sec-timestart.tv_sec)*1000+(double)(timeend.tv_nsec-timestart.tv_nsec)/1000000);
return 0;
}
//冒泡排序 O(n^2)
void sort(int *s, int l)
{
int count;
while(1)
{
count = 0;
for(int i=0;i<l-1;i++)
if(s[i]>s[i+1])
swap(s[i],s[i+1]),count++;
if(!count)
break;
}
} |
the_stack_data/3692.c | /**
*
* File Name: libkern/ctype/isspace.c
* Title : Kernel Library
* Project : PINE64 ROCK64 Bare-Metal
* Author : Copyright (C) 2021 Johannes Krottmayer <[email protected]>
* Created : 2021-01-25
* Modified :
* Revised :
* Version : 0.1.0.0
* License : ISC (see LICENSE.txt)
*
* NOTE: This code is currently below version 1.0, and therefore is considered
* to be lacking in some functionality or documentation, or may not be fully
* tested. Nonetheless, you can expect most functions to work.
*
*/
int isspace(const int c)
{
if (((c >= 0x0A) && (c <= 0x0D)) || (c == ' '))
return 1;
return 0;
}
|
the_stack_data/15919.c | #include <string.h>
#include <stdlib.h>
#include <stdio.h>
char *g_str1 = "hello";
char *g_str2 = " world!\n";
int main(int argc, char **argv) {
char *progname = argv[0];
char *arg1 = argv[1];
if (strcmp(argv[0], argv[1])) {
printf("You didn't input the argname");
}
return EXIT_SUCCESS;
}
|
the_stack_data/193893199.c | #include <stdio.h>
int bottles[3][3];
char *ans;
//0B 1G 2C
int main() {
int i,j;
int sum,now,max;
while(1) {
sum=0;
for (i=0;i<3;i++) {
for (j=0;j<3;j++) {
if (scanf("%d",&bottles[i][j])==EOF)
return 0;
sum += bottles[i][j];
}
}
now = max = bottles[0][0] + bottles[1][2] + bottles[2][1];
ans = "BCG";
now = bottles[0][0] + bottles[1][1] + bottles[2][2];
if (max < now) {
max = now;
ans = "BGC";
}
now = bottles[0][2] + bottles[1][0] + bottles[2][1];
if (max < now) {
max = now;
ans = "CBG";
}
now = bottles[0][2] + bottles[1][1] + bottles[2][0];
if (max < now) {
max = now;
ans = "CGB";
}
now = bottles[0][1] + bottles[1][0] + bottles[2][2];
if (max < now) {
max = now;
ans = "GBC";
}
now = bottles[0][1] + bottles[1][2] + bottles[2][0];
if (max < now) {
max = now;
ans = "GCB";
}
printf("%s %d\n",ans,sum-max);
}
return 0;
}
|
the_stack_data/57950435.c | #include <stdio.h>
#include <stdlib.h>
void CombSort(int n, int m[])
{
int i, j, s = n, tmp;
while (n>1) {
s /= 1.2473309;
if (s<1)
s = 1;
j = 0;
for (i = 0; i + s<n; i++) {
if ((m[i] / 10)>(m[i + s] / 10)) {
tmp = m[i];
m[i] = m[i + s];
m[i + s] = tmp;
j = i;
}
}
if (s == 1)
n = j + 1;
}
}
int main()
{
int N;
scanf("%d", &N);
int* m;
m = (int *)malloc(N * sizeof(int));
for (int i = 0; i < N; i++)
scanf("%d", &m[i]);
CombSort(N, m);
for (int i = 0; i < N; i++)
printf("%d ", m[i]);
printf("\n");
return 0;
}
|
the_stack_data/847170.c | #include <stdio.h>
void main () {
int i, num, sum = 0;
for (i = 0; i < 10; i++) {
scanf("%i", &num);
sum += num;
}
printf("Soma: %i\n", sum);
} |
the_stack_data/192331946.c | /*
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
/*
FUNCTION
<<getchar>>---read a character (macro)
INDEX
getchar
INDEX
_getchar_r
ANSI_SYNOPSIS
#include <stdio.h>
int getchar(void);
int _getchar_r(struct _reent *<[reent]>);
TRAD_SYNOPSIS
#include <stdio.h>
int getchar();
int _getchar_r(<[reent]>)
char * <[reent]>;
DESCRIPTION
<<getchar>> is a macro, defined in <<stdio.h>>. You can use <<getchar>>
to get the next single character from the standard input stream.
As a side effect, <<getchar>> advances the standard input's
current position indicator.
The alternate function <<_getchar_r>> is a reentrant version. The
extra argument <[reent]> is a pointer to a reentrancy structure.
RETURNS
The next character (read as an <<unsigned char>>, and cast to
<<int>>), unless there is no more data, or the host system reports a
read error; in either of these situations, <<getchar>> returns <<EOF>>.
You can distinguish the two situations that cause an <<EOF>> result by
using `<<ferror(stdin)>>' and `<<feof(stdin)>>'.
PORTABILITY
ANSI C requires <<getchar>>; it suggests, but does not require, that
<<getchar>> be implemented as a macro.
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
/*
* A subroutine version of the macro getchar.
*/
#include "stdio.h"
#undef getchar
int getchar(void)
{
#ifdef __GNUC__
return fgetc (stdin);
#else
return fgetc (&__stdin);
#endif /*__GNUC__ */
}
|
the_stack_data/70450132.c | //program to print the area and perimeter of the circle
#include<stdio.h>
void main()
{
float radius,area,peri;
printf("Enter the radius of the circle\n");
scanf("%f",&radius);
area =(float)22/7*radius*radius;
peri=(float)2*22/7*radius;
printf("The area of the circle is %.2f and the perimeter is %.2f ",area,peri);
}
|
the_stack_data/222609.c | #include <math.h>
#include <stdio.h>
/* This program calculates the component reliability p required to yield
the same K-out-of-N system reliability p. */
/* C1: The following variables and functions are used in newtonp */
long k, /* = minimum number of components required for system operation */
n; /* = total number of components in the system */
double t; /* = individual binomial term */
main()
{
extern long k, n;
extern double t;
double cumbin(), /* = function to calculate the cumulative binomial */
absol(); /* = function to calculate absolute value */
double p, /* = binomial parameter (component reliability) estimate */
pnew, /* = next estimate of binomial parameter */
s, /* = system reliability based on p, s is the estimate for v */
deriv, /* = derivative of the reliability curve at p */
eps; /* = input allowable error in the answer or the system rel. */
long count; /* = number of iterations to calculate p */
char yorn; /* = y to continue the program */
printf("This program calculates the common component reliability P\n");
printf("required to yield the same system reliability P of a k-out-of-n\n");
printf("system within a given error Epsilon.\n");
yorn = 'y';
while (yorn == 'y')
{
printf("Enter N = "); /* C2: Get input values to use within */
scanf("%ld", &n); /* the program. */
printf("Enter K = ");
scanf("%ld", &k);
printf("Enter Epsilon = ");
scanf("%lf", &eps);
count = 1;
pnew = (k - 1.0) / (n - 1.0); /* C3: Start with inflection point. */
do /* C4: Iterate by Newton's method using */
{ /* pnew and cumbin() to get s and a */
p = pnew; /* new value of pnew. Repeat until */
s = cumbin(p); /* the error is acceptable. */
if (p >= 0.5)
deriv = k * t / p;
else
deriv = (n - k + 1.0) * t / (1.0 - p);
pnew = p - (s - p) / deriv; /* C5: The Newton step. */
count++;
}
while (absol(p - pnew) > eps || absol(s - p) > eps);
/* C6: Print the results. */
printf("\nThe component and system reliability is %16.14lf\n", pnew);
printf("%ld iterations were required for the calculation.\n\n", count);
printf("Would you like to run another case (y or n)?");
scanf("%s", &yorn);
}
}
double cumbin(p) /* CU1: cumbin calculates the reliability of a k-out-of-n */
double p; /* system with common component reliability p. */
{
extern long k, n;
extern double t;
/* CU1: Following are the variables used in this program */
double b, /* = the binomial parameter used by the calculations */
a, /* = b / (1 - b) */
C, /* = constant multiple for the binomial terms & sum */
s, /* = sum of binomial terms */
underflow; /* = near underflow limit to halt the calculations at */
long j, /* = indexing variable for loops */
i, /* = lower bound of the sum used in the algorithm */
m; /* = number of times the sum has been divided by C */
underflow = exp(1000. * log(0.5));
if (p >= .5) /* CU2: Use the input values in the */
{ /* algorithm if p >= .5, or */
i = k;
b = p;
}
else /* transpose the input values to do */
{ /* inverse calculation if p < .5. */
i = n - k + 1;
b = 1 - p;
}
a = (1 - b)/b; /* CU3: Perform the initial calculations for */
C = exp(1000 * log(b)); /* a, C, m, s, and t. */
m = n / 1000;
t = exp((n % 1000) * log(b));
s = t;
for (j = n - 1; j >= i; j--) /* CU4: Calculate & sum the binomial terms. */
{
if (t < underflow * (n - j) / (a * (j + 1)) /* CU5: Check if term is so */
&& m < 1) /* small that sum is 1.*/
break;
if (s > .5 / C - t) /* CU6: Adjust sum and terms if */
{ /* nearing overflow. */
m = m - 1;
s = s * C;
t = t * C;
}
t = t * a * (j + 1) / (n - j);
s = s + t;
}
for (j = -1; j >= m; j--) /* CU7: Make sure the final answer has not had */
{ /* C divided out or multiplied in too */
s = s / C; /* many times. */
t = t / C;
}
for (j = 1; j <= m; j++)
{
s = s * C;
t = t * C;
}
if (p < .5) /* CU8: Invert the answer if p < 0.5. */
s = 1 - s;
return(s);
}
double absol(value) /* A1: Function to return the absolute value */
double value; /* of the number passed to it. */
{
if (value < 0.0)
return(-1.0 * value);
else
return(value);
}
|
the_stack_data/122016753.c |
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
// excecute: gcc -g create_pthread.c -pthread -o create_pthread
/* result
Thread 1
Thread 2
Thread 1 returns: 0
Thread 2 returns: 0
*/
void *print_message_function( void *ptr );
main()
{
pthread_t thread1, thread2;
char *message1 = "Thread 1";
char *message2 = "Thread 2";
int iret1, iret2;
/* Create independent threads each of which will execute function */
iret1 = pthread_create( &thread1, NULL, print_message_function, (void*) message1);
iret2 = pthread_create( &thread2, NULL, print_message_function, (void*) message2);
/* Wait till threads are complete before main continues. Unless we */
/* wait we run the risk of executing an exit which will terminate */
/* the process and all threads before the threads have completed. */
pthread_join( thread1, NULL);
pthread_join( thread2, NULL);
printf("Thread 1 returns: %d\n",iret1);
printf("Thread 2 returns: %d\n",iret2);
exit(0);
}
void *print_message_function( void *ptr )
{
char *message;
message = (char *) ptr;
printf("%s \n", message);
}
|
the_stack_data/115765371.c | #include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
/* K&R C (Dennis M. Ritchie & Brian W. Kernighan)
Exercise 1-10. Write a program to copy its input to its output,
replacing each tab by \t, each backspace by \b, and each backslash by \\.
This makes tabs and backspaces visible in an unambiguous way.
*/
int main(int argc, const char** argv) {
char c;
while (1)
{
printf(">>> ");
while ( (c = getchar()) != '\n') {
switch (c) {
case '\t':
printf("\\t");
break;
case '\b':
printf("\\b");
break;
case '\\':
printf("\\\\");
break;
default:
putchar(c);
break;
}
}
putchar('\n');
}
return 0;
}
|
the_stack_data/82751.c | #include <stdio.h>
#define LEFT(i) (i << 1) + 1
#define RIGHT(i) (i << 1) + 2
#define PARENT(i) (i-1) >> 1
int a[14] = {27, 17, 3, 16, 13, 10, 1, 5, 7, 12, 4, 8, 9, 0};
int heapsize = 14;
int heaplength = 14;
void print(void)
{
int i;
for (i = 0; i < 14; i++)
printf("%d ", a[i]);
printf("\n");
}
void max_heapify(int a[], int i)
{
int l = LEFT(i);
int r = RIGHT(i);
int largest = 0;
if (l < heapsize && a[l] > a[i])
largest = l;
else
largest = i;
if (r < heapsize && a[r] > a[largest])
largest = r;
if (largest != i) {
int tmp = a[i];
a[i] = a[largest];
a[largest] = tmp;
max_heapify(a, largest);
}
}
void build_maxheap(int a[])
{
int i;
for (i = heapsize/2; i >= 0; i--)
max_heapify(a, i);
}
void heapsort(int a[])
{
build_maxheap(a);
int i;
for (i = heaplength - 1; i > 0; i--) {
int tmp = a[i];
a[i] = a[0];
a[0] = tmp;
heapsize--;
max_heapify(a, 0);
}
}
int main(void)
{
print();
heapsort(a);
print();
return 0;
}
|
the_stack_data/92326948.c | // PARAM: --set ana.activated "['base','threadid','threadflag','escape','mallocWrapper']"
#include<pthread.h>
#include<assert.h>
pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
int glob1 = 5;
int glob2 = 7;
int glob3 = 9;
void *t_fun(void *arg) {
glob3 = 8;
assert(glob3 == 8); // UNKNOWN
return NULL;
}
int main() {
pthread_t id;
glob3 = 9;
assert(glob3 == 9);
pthread_create(&id, NULL, t_fun, NULL);
glob1 = 5;
assert(glob1 == 5);
glob2 = 5;
assert(glob2 == 5); // UNKNOWN
glob3 = 9;
assert(glob3 == 9); // UNKNOWN
return 0;
}
|
the_stack_data/107953728.c | #include <stdio.h>
int main()
{
FILE *file = fopen("lusiadas-utf8.txt", "r");
if(!file)
{
fprintf(stderr, "Erro a abrir ficheiro\n");
return -1;
}
int count[3] = {0};
for(;;)
{
int byte1 = getc(file);
if(byte1 == EOF)
{
break;
}
if((byte1 & 0x80) == 0)
{
continue;
}
else if((byte1 & 0xe0) == 0xc0)
{
int byte2 = getc(file);
if(byte1 == 0xC3 && (byte2 == 0x83 || byte2 == 0xa3))
{
++count[0];
}
else if(byte1 == 0xC3 && (byte2 == 0x95 || byte2 == 0xb5))
{
++count[1];
}
else if(byte1 == 0xC3 && (byte2 == 0x87 || byte2 == 0xa7))
{
++count[2];
}
}
else if((byte1 & 0xf0) == 0xe0)
{
getc(file); getc(file);
}
else if((byte1 & 0xf8) == 0xf0)
{
getc(file); getc(file); getc(file);
}
}
printf("ã: %d\n", count[0]);
printf("õ: %d\n", count[1]);
printf("ç: %d\n", count[2]);
return 0;
}
|
the_stack_data/62217.c | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
static int open_dev(const char *devname)
{
int fd = -1;
fd = open(devname, O_RDWR);
if(fd < 0)
{
perror("open_dev");
_exit(-1);
}
return fd;
}
int main()
{
int gpio_fd = 0;
int key = 0x00;
gpio_fd = open_dev("/dev/key_eint");
if(gpio_fd < 0){
perror("open device key_eint");
return gpio_fd;
}
while(1){
read(gpio_fd, &key, sizeof(key));
}
close(gpio_fd);
} |
the_stack_data/45551.c | // FIXME: Figure out how to use %clang_analyze_cc1 with our lit.local.cfg.
// RUN: %clang_cc1 -analyze -triple x86_64-unknown-linux-gnu \
// RUN: -analyzer-checker=core \
// RUN: -analyzer-dump-egraph=%t.dot %s
// RUN: %exploded_graph_rewriter %t.dot | FileCheck %s
// REQUIRES: asserts
// FIXME: Substitution doesn't seem to work on Windows.
// UNSUPPORTED: system-windows
// CHECK: macros.c:<b>17</b>:<b>10</b>
// CHECK-SAME: <font color="royalblue1">
// CHECK-SAME: (<i>spelling at </i> macros.c:<b>15</b>:<b>14</b>)
// CHECK-SAME: </font>
#define NULL 0
void *foo() {
return NULL;
}
|
the_stack_data/148579326.c | #include <unistd.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
if (argc != 3) {
fprintf(stderr,"Use: hlink <src_dir> <target_dir>\n");
return 1;
}
int ret = link(argv[1],argv[2]);
if (ret != 0)
perror("link");
return ret;
} |
the_stack_data/190769025.c | #include <string.h>
#undef strcat
char *
strcat(char * restrict dst, const char * restrict src)
{
char *ret = dst;
while (*dst)
++dst;
while (*dst++ = *src++)
;
return ret;
}
|
the_stack_data/100140479.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_NAME 30
typedef struct
{
// Name of the athlete. Maximum size known a priori.
char name[MAX_NAME + 1];
// ID of the athlete and number of laps.
int id;
int laps;
// Times for each lap. Size not known a priori.
float *times;
float average;
}
CYCLIST;
int readData(FILE *input, CYCLIST **resultPointer);
int getIndex(char *name, CYCLIST *data, int dataSize);
int getBest(CYCLIST *data, int dataSize);
int main(void)
{
CYCLIST *cyclists;
FILE *input = fopen("input.txt", "r");
if(input == NULL)
{
fprintf(stderr, "ERROR: Failed to open file.\n");
return -1;
}
int cyclistsCount = readData(input, &cyclists);
fclose(input);
// Read-Eval-Execute loop
int cont = 1;
while(cont)
{
char line[6 + 1];
scanf(" %6s", line);
// I do not include the strlen check since none of the available commands share any subsequence of strings
// Cool side effect is that the program also works if the user specifies a substring (even only one letter) of the command.
if(!strcmp(line, "list"))
{
printf("There are %d athletes:", cyclistsCount);
for(int i = 0; i < cyclistsCount; ++i)
printf("\n\t'%s' (ID: %d, %d LAPS)", cyclists[i].name, cyclists[i].id, cyclists[i].laps);
printf("\n");
}
if(!strcmp(line, "detail"))
{
char name[MAX_NAME + 1];
scanf(" %30s", name);
int i = getIndex(name, cyclists, cyclistsCount);
if(i != -1)
{
printf("Printing details for athlete '%s' (ID %d)", cyclists[i].name, cyclists[i].id);
for(int j = 0; j < cyclists[i].laps; ++j)
printf("\nLAP %d: %f", (j + 1), cyclists[i].times[j]);
printf("\n");
}
else
{
printf("Athlete '%s' not found.\n", name);
}
}
if(!strcmp(line, "best"))
{
int i = getBest(cyclists, cyclistsCount);
printf("Printing details for athlete '%s' (ID %d)", cyclists[i].name, cyclists[i].id);
for(int j = 0; j < cyclists[i].laps; ++j)
printf("\nLAP %d: %f", (j + 1), cyclists[i].times[j]);
printf("\n\nAVERAGE: %f\n", cyclists[i].average);
}
if(!strcmp(line, "stop"))
{
cont = 0;
}
}
for(int i = 0; i < cyclistsCount; ++i)
free(cyclists[i].times);
free(cyclists);
return 0;
}
// Read all cyclist data from file and returns the number of elements
int readData(FILE *input, CYCLIST **resultPointer)
{
int count;
fscanf(input, "%d", &count);
CYCLIST *result = (CYCLIST *) malloc(count * sizeof(CYCLIST));
for(int i = 0; i < count; ++i)
{
fscanf(input, " %s %d %d", result[i].name, &result[i].id, &result[i].laps);
result[i].times = (float *) calloc(result[i].laps, sizeof(float));
float sum = 0;
for(int j = 0; j < result[i].laps; ++j)
{
float value;
fscanf(input, " %f", &value);
sum += value;
result[i].times[j] = value;
}
result[i].average = (sum / result[i].laps);
}
*resultPointer = result;
return count;
}
int getIndex(char *name, CYCLIST *data, int dataSize)
{
for(int i = 0; i < dataSize; ++i)
if(strlen(name) == strlen(data[i].name) && strcmp(name, data[i].name) == 0)
return i;
return -1;
}
int getBest(CYCLIST *data, int dataSize)
{
float best = data[0].average;
int index = 0;
for(int i = 1; i < dataSize; ++i)
if(data[i].average < best)
{
best = data[i].average;
index = i;
}
return index;
} |
the_stack_data/641930.c | /* This testcase is part of GDB, the GNU debugger.
Copyright 2014-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
struct dynamic_struct;
typedef struct dynamic_struct dynamic_struct_t;
struct static_struct
{
int field;
};
typedef struct static_struct static_struct_t;
struct local_struct
{
static_struct_t here;
dynamic_struct_t *ptr;
} local_struct;
int
main (void)
{
return 0;
}
|
the_stack_data/234517426.c | #include <stdio.h>
#include <math.h>
int main(){
printf("Programm zur Floorfunktion | jbachma2\n\n");
printf("Bitte geben Sie den Wert ein: ");
double read_value;
scanf("%lf", &read_value);
printf("Der Floorwert von %lf ist: %lf\n", read_value, floor(read_value));
}
|
the_stack_data/145452554.c | /* Program name: serial_matrix_multiplication_benchmark.c
* benchmark serial matrix multiplication with timer
*
*/
/* Compiler command:
* icc -O3 serial_matrix_multiplication_benchmark.c -o serial_matrix_multiplication_benchmark
*
* Run command:
* ./serial_matrix_multiplication_benchmark
*/
/* Head files */
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <sys/time.h>
// define problem scale, matrix row/col size
#define PROBLEM_SCALE 128
// define float precision, 4 byte single-precision float or 8 byte double-precision float
#define FLOAT double
// define macro for array access
#define Entry(A,i,j) (*(A + (n*(i) + (j)))) // defination with parameters, Array dereference
// dtime
//
// utility routine to return
// the current wall clock time
//
double dtime()
{
double tseconds = 0.0;
struct timeval mytime;
gettimeofday(&mytime, (struct timezone*)0);
tseconds = (double)(mytime.tv_sec + mytime.tv_usec*1.0e-6);
return( tseconds );
}
/*********************************************************/
int main(int argc, char* argv[]) {
FILE *fp;
int i;
int j;
int k;
int n;
int content;
FLOAT *matrix_A;
FLOAT *matrix_B;
FLOAT *matrix_C;
double tstart;
double tend;
// Matrix Generator
printf("Generate and write matrix A\n");
fp = fopen("A.dat", "w"); // Generate and print matrix A into a file
for (i = 0; i < PROBLEM_SCALE; i++) {
for (j = 0; j < PROBLEM_SCALE; j++)
if(i == j){
fprintf(fp,"%d ",1);
}
else {
fprintf(fp,"%d ",0);
}
fprintf(fp,"\n");
}
fclose(fp);
printf("Generate and write matrix B\n");
fp = fopen("B.dat", "w"); // Generate and print matrix B into a file
for (i = 0; i < PROBLEM_SCALE; i++){
for (j = 0; j < PROBLEM_SCALE; j++)
fprintf(fp,"%d ", (i*PROBLEM_SCALE)+j);
fprintf(fp, "\n");
}
fclose(fp);
// Allocate memory and Read Matrices from files
fp = fopen("A.dat","r");
n = 0;
while((content = fgetc(fp)) != EOF)
{
//printf("fgetc = %c\n", (char)content);
if(content != 0x20 && content != 0x0A) n++;
}
fclose(fp);
// printf("We read the order of the matrices from A.dat is\n %d\n", n);
n = (int) sqrt((double) n);
printf("We read the order of the matrices from A.dat is\n %d\n", n);
matrix_A = (FLOAT*) malloc((n*n) * sizeof(FLOAT)); // Allocate memory for matrix A
matrix_B = (FLOAT*) malloc((n*n) * sizeof(FLOAT)); // Allocate memory for matrix B
matrix_C = (FLOAT*) malloc((n*n) * sizeof(FLOAT)); // Allocate memory for matrix C
printf("Read matrix A\n");
fp = fopen("A.dat", "r"); // Read Matrix A from a file
for (i = 0; i < n; i++) {
for (j = 0; j < n; j++)
fscanf(fp, "%lf", (matrix_A + (i*n) + j));
}
fclose(fp);
printf("Read matrix B\n");
fp = fopen("B.dat", "r"); // Read matrix B from a file
for (i = 0; i < n; i++){
for (j = 0; j < n; j++)
fscanf(fp, "%lf", (matrix_B + (i*n) + j));
}
fclose(fp);
/******************************************************/
// Serial Matrix Multiply with timer
/******************************************************/
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
Entry(matrix_C,i,j) = 0.0;
printf("Start C = A*B\n");
tstart = dtime();
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
for (k = 0; k < n; k++)
Entry(matrix_C,i,j) = Entry(matrix_C,i,j)
+ Entry(matrix_A,i,k)*Entry(matrix_B,k,j);
tend = dtime();
printf("C = A*B finished\n");
// print timer result in the command line
printf("Serial Matrix Multiplication Elapsed time:\n %30.20E seconds\n", tend-tstart);
// Writing result to a file
printf("Write result C = A*B to a file C.dat\n");
fp = fopen("C.dat", "w"); // Read matrix B from a file
for (i = 0; i < PROBLEM_SCALE; i++){
for (j = 0; j < PROBLEM_SCALE; j++)
fprintf(fp,"%lf ", Entry(matrix_C,i,j));
fprintf(fp, "\n");
}
fclose(fp);
return 0;
}
|
the_stack_data/47802.c | /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-fopenmp -w" } */
/* ?? The -w above is to inhibit the following warning for now:
a.c:2:6: warning: AVX vector argument without AVX enabled changes
the ABI. */
#pragma omp declare simd notinbranch simdlen(4)
void foo (int *a)
{
*a = 555;
}
|
the_stack_data/126479.c | /*
*******************************************************************************
* Copyright (c) 2020-2021, STMicroelectronics
* All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
*******************************************************************************
*/
#if defined(ARDUINO_GENERIC_F302C6TX) || defined(ARDUINO_GENERIC_F302C8TX) ||\
defined(ARDUINO_GENERIC_F302C8YX)
#include "pins_arduino.h"
/**
* @brief System Clock Configuration
* @param None
* @retval None
*/
WEAK void SystemClock_Config(void)
{
/* SystemClock_Config can be generated by STM32CubeMX */
#warning "SystemClock_Config() is empty. Default clock at reset is used."
}
#endif /* ARDUINO_GENERIC_* */
|
the_stack_data/92325793.c | /* { dg-options "-Os" } */
/* { dg-do compile } */
int bar(int* p)
{
int x = p[0] + p[1];
return x;
}
/* { dg-final { scan-assembler "ldrd|ldm" } } */
|
the_stack_data/232956397.c | #include <stdio.h>
int main(int argc, char *argv[]) {
printf("called with %d arguments:\n", argc - 1);
for (int i = 1; i < argc; i++)
printf("\t'%s'\n", argv[i]);
return 0;
}
|
the_stack_data/122015988.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
/////////////попытка 73/////////////
int prefix(char *s)
{
int i,l=strlen(s),pi=1;
for(i=0;i<l/2;i++) if(s[i]!=s[i+l/2]) pi=0;
return pi;
}
int main()
{
char s[10][1024], t[10240];
int n,i,j[9],g,k,a[10][10]={0},l=0,li,lj,pi,vongola=0,min;
scanf("%d",&n);
for(i=0;i<n;i++) scanf("%s",s[i]);
for(i=n;i<10;i++) strcpy(s[i],"");
for(i=0;i<n;i++)
{
li=strlen(s[i]);
l+=li;
for(g=0;g<n;g++)
{
if(i==g) continue;
lj=strlen(s[g]);
(lj>=li) ? (k=li) : (k=lj);
for(k; k>0; k--)
{
strcpy(t,(s[i]+li-k));
strncat(t,s[g],k);
pi=prefix(t);
if(pi) {a[i][g]=k; break;}
}
}
}
for(j[0]=0;j[0]<10;j[0]++)
{
for(j[1]=0;j[1]<10;j[1]++)
{
if(j[1]==j[0]) continue;
for(j[2]=0;j[2]<10;j[2]++)
{
k=0;
for(i=0;i<2;i++) if(j[2]==j[i]) k=1;
if(k) continue;
for(j[3]=0;j[3]<10;j[3]++)
{
k=0;
for(i=0;i<3;i++) if(j[3]==j[i]) k=1;
if(k) continue;
for(j[4]=0;j[4]<10;j[4]++)
{
k=0;
for(i=0;i<4;i++) if(j[4]==j[i]) k=1;
if(k) continue;
for(j[5]=0;j[5]<10;j[5]++)
{
k=0;
for(i=0;i<5;i++) if(j[5]==j[i]) k=1;
if(k) continue;
for(j[6]=0;j[6]<10;j[6]++)
{
k=0;
for(i=0;i<6;i++) if(j[6]==j[i]) k=1;
if(k) continue;
for(j[7]=0;j[7]<10;j[7]++)
{
k=0;
for(i=0;i<7;i++) if(j[7]==j[i]) k=1;
if(k) continue;
for(j[8]=0;j[8]<10;j[8]++)
{
k=0;
for(i=0;i<8;i++) if(j[8]==j[i]) k=1;
if(k) continue;
min=0;
for(g=1;g<9;g++)
{
min+=a[j[g-1]][j[g]];
}
if(min>vongola) vongola=min;
}
}
}
}
}
}
}
}
}
printf("%d",l-vongola);
return 0;
} |
the_stack_data/34511777.c | /*
* Copyright (C) 2019 Indeed Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*
* Author: "Dave Chiluk"
*
* Description: This application runs the fibonacci sequence on multiple
* threads each pinned to a * CPU for a requested amount of time. It then prints
* out the total number of iterations it was able to complete.
*/
// This is needed for CPU* functions
#define _GNU_SOURCE
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <signal.h>
#include <pthread.h>
#include <sys/sysinfo.h>
#include <errno.h>
#include <sched.h>
#include <time.h>
// Returns number of iterations completed.
static void *fast( void *arg );
static void *slow( void *arg );
// Handle alarm and print number of iterations.
void handle_sigalrm();
struct thread_info {
pthread_t thread_id;
unsigned long iterations;
unsigned long fib_res;
};
struct timespec endtime;
void usage ()
{
fprintf (stdout,
"Usage: $0 -t <threads> \n"
"This application runs the fibonacci sequence on multiple\n"
"threads each pinned to a CPU for a requested amount of time.\n"
"It then prints out the total number of iterations it was able to complete.\n"
"\n"
"It divides execution into fast and slow threads. Fast threads run as fast\n"
"as possible and slow threads run 100 iterations and the sleep for 10ms.\n"
"\n"
"Options\n"
"-v, Verbose prints total number of iterations per thread\n"
"-f <NUM>, number of fast threads (Default=1).\n"
"-t <NUM>, total number of threads (Default=Number of CPUs)\n"
"-s <NUM>, Sets the duration of the test (Default=5 seconds)\n"
);
}
int main(int argc, char *argv[])
{
unsigned long total=0;
int c, num_threads=2, procs, fast_threads=1;
struct thread_info *tinfo;
bool verbose=false;
cpu_set_t cpuset;
int seconds=5; // Default test duration
// Get the number of processors
// CHILUK: this should handle the case where the task group is pinned to a subset
// of cores.
procs = get_nprocs_conf();
num_threads = procs;
// Argument processing.
while ((c = getopt (argc, argv, "vf:t:s:")) != -1)
{
// CHILUK: fix arguements and usage.
switch (c)
{
case 'v':
verbose = true;
break;
case 'f':
fast_threads = (int) strtol(optarg, NULL, 0);
break;
case 't':
num_threads = (int) strtol(optarg, NULL, 0);
break;
case 's':
seconds = (int) strtol(optarg, NULL, 0);
break;
case '?':
default:
usage();
exit(0);
}
if( num_threads < fast_threads)
num_threads = fast_threads;
}
tinfo = calloc(num_threads, sizeof(struct thread_info));
// Set the end time
if (clock_gettime(CLOCK_REALTIME_COARSE, &endtime )) {
fprintf(stderr, "Unable to get endtime");
exit(1);
}
endtime.tv_sec += seconds;
// Spawn requested number of threads
for( int tnum=0; tnum < num_threads; tnum++) {
// CHILUK: check return values
// Balance threads accross cores.
if( tnum % procs < fast_threads )
pthread_create(&tinfo[tnum].thread_id, NULL, fast, &tinfo[tnum]);
else
pthread_create(&tinfo[tnum].thread_id, NULL, slow, &tinfo[tnum]);
// Set the cpu affinity to tnum%(number of cpus)
CPU_ZERO(&cpuset);
CPU_SET(tnum % procs, &cpuset);
pthread_setaffinity_np(tinfo[tnum].thread_id, sizeof(cpu_set_t), &cpuset );
}
// Wait for thread completion.
for( int tnum=0; tnum < num_threads; tnum++)
// CHILUK: check return values
pthread_join(tinfo[tnum].thread_id, NULL);
// Add up the total number of iterations per thread.
for( int tnum=0; tnum < num_threads; tnum++)
{
if (verbose)
printf("fib[%lu] = %lu \n", tinfo[tnum].iterations, tinfo[tnum].fib_res);
total += tinfo[tnum].iterations;
}
printf("Iterations Completed(M): %lu \n", total/1000000 );
free(tinfo);
exit(0);
}
// Checks to see if we have reached the end of our test time.
bool done()
{
struct timespec cur;
if (clock_gettime( CLOCK_REALTIME_COARSE , &cur)) {
fprintf(stderr, "Unable to get curtime");
exit(1);
}
if (cur.tv_sec == endtime.tv_sec)
return cur.tv_nsec > endtime.tv_nsec;
else
return cur.tv_sec > endtime.tv_sec;
}
// Runs the fibonacci sequence 100 iterations at a time then sleeps for 10ms.
static void *slow( void *arg)
{
struct thread_info *tinfo = arg;
long int a=0;
long int b=1;
long int c=0;
long int i=0;
while( ! done() )
{
for(int j=0; j< 100; j++)
{
i++;
c=a+b;
a=b;
b=c;
}
usleep ( 10000 );
}
// We've timed out.
tinfo->iterations=i;
tinfo->fib_res=a;
return (void *)tinfo;
}
// Runs the fibonacci sequence 1 million iterations before checking if we've timed out.
static void *fast( void *arg)
{
struct thread_info *tinfo = arg;
long int a=0;
long int b=1;
long int c=0;
long int i=0;
while( ! done() )
{
for(int j=0; j< 1000000; j++)
{
i++;
c=a+b;
a=b;
b=c;
}
}
// We've timed out.
tinfo->iterations=i;
tinfo->fib_res=a;
return (void *)tinfo;
}
|
the_stack_data/125140896.c | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
printf("stdin: %d\n", isatty(0));
printf("stdout: %d\n", isatty(1));
printf("stderr: %d\n", isatty(2));
exit(0);
}
|
the_stack_data/176831.c | #include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <assert.h>
void die(const char *message)
{
if (errno) {
perror(message);
} else {
printf("ERROR: %s\n", message);
}
exit(1);
}
typedef int (*compare_cb)(const void *a, const void *b);
typedef int* (*algorithm_cb)(int *numbers, int count, compare_cb cb);
int *bubblesort(int *numbers, int count, compare_cb cmp)
{
assert(numbers != NULL);
assert(cmp != NULL);
int tmp = 0;
int *target = malloc(count * sizeof(int));
assert(target != NULL);
memcpy(target, numbers, count * sizeof(int));
for (int i = 0; i < count; i++) {
for (int j = 0; j < count - 1; j++) {
if (cmp(&target[j], &target[j + 1]) > 0) {
tmp = target[j + 1];
target[j + 1] = target[j];
target[j] = tmp;
}
}
}
return target;
}
int* quicksort(int *numbers, int count, compare_cb cmp)
{
assert(numbers != NULL);
assert(cmp != NULL);
int *numbers_sorted = malloc(sizeof(int) * count);
assert(numbers_sorted != NULL);
memcpy(numbers_sorted, numbers, sizeof(int) * count);
qsort(numbers_sorted, count, sizeof(int), cmp);
return numbers_sorted;
}
int sorted_order(const void *a, const void *b)
{
return *((int *) a) - *((int *) b);
}
int reverse_order(const void *a, const void *b)
{
return *((int *) b) - *((int *) a);
}
void test_sorting(int *numbers, int count, algorithm_cb algo, compare_cb cmp)
{
assert(numbers != NULL);
assert(algo != NULL);
assert(cmp != NULL);
int *sorted = algo(numbers, count, cmp);
for (int i = 0; i < count; i++) {
printf("%d ", sorted[i]);
}
printf("\n");
free(sorted);
}
int main(int argc, char *argv[])
{
if (argc < 2) {
die("USAGE: ex18 4 3 1 5 6");
}
int count = argc - 1;
char **inputs = argv + 1;
int *numbers = malloc(count * sizeof(int));
assert(numbers != NULL);
for (int i = 0; i < count; i++) {
numbers[i] = atoi(inputs[i]);
}
test_sorting(numbers, count, quicksort, sorted_order);
test_sorting(numbers, count, quicksort, reverse_order);
test_sorting(numbers, count, bubblesort, sorted_order);
test_sorting(numbers, count, bubblesort, reverse_order);
free(numbers);
return 0;
}
|
the_stack_data/139535.c | #include <stdio.h>
#include <stdlib.h>
#define INT_COUNT 100000
int
main(int argc, char** argv)
{
int i = 0;
int access_cycles = atoi(argv[1]);
int* memory = calloc(INT_COUNT, sizeof(*memory));
if (memory == NULL) {
fprintf(stderr, "Failed to allocate buffer.");
return EXIT_FAILURE;
}
for (i = 0; i < access_cycles; i++)
{
int index = rand() % INT_COUNT;
memory[index]++;
}
return EXIT_SUCCESS;
}
|
the_stack_data/31084.c | #include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/wait.h>
#define FILE_READ_CHUNK 1024
#define SHM_SIZE 65536
#define SOCKET_READ_CHUNK 1024 // SHM_SIZE should be divisable by this
#define SHM_ENV_VAR "__AFL_SHM_ID"
#define LOGFILE "/tmp/afl-wrapper.log"
#define VERBOSE
#define STATUS_SUCCESS 0
#define STATUS_TIMEOUT 1
#define STATUS_CRASH 2
#define STATUS_QUEUE_FULL 3
#define STATUS_COMM_ERROR 4
#define STATUS_DONE 5
#define MAX_TRIES 40
#define DEFAULT_SERVER "localhost"
#define DEFAULT_PORT "7007"
#define DEFAULT_NUMBER_OF_TARGETS 0
/* YN: +24 for resource results +8 for user defined cost +19 for regression metrics (patch distances not included) = +51 */
static int TOTAL_TRACE_BITS_SIZE = SHM_SIZE+51;
#define DEFAULT_MODE 0
#define LOCAL_MODE 1
uint8_t* trace_bits;
int prev_location = 0;
/* Stdout is piped to null when running inside AFL, so we have an option to write output to a file */
FILE* logfile;
/* Running inside AFL or standalone */
uint8_t in_afl = 0;
#define OUTPUT_STDOUT
#define OUTPUT_FILE
void LOG(const char* format, ...) {
va_list args;
#ifdef OUTPUT_STDOUT
va_start(args, format);
vprintf(format, args);
#endif
#ifdef OUTPUT_FILE
char message[150], *ptr = message;
ptr += sprintf(message, "[%d] ", getpid());
va_start(args, format);
vsprintf(ptr, format, args);
fprintf(logfile, "%s", message);
// vfprintf(logfile, format, args);
#endif
va_end(args);
}
#define DIE(...) { LOG(__VA_ARGS__); if(!in_afl) shmdt(trace_bits); if(logfile != NULL) fclose(logfile); exit(1); }
#define LOG_AND_CLOSE(...) { LOG(__VA_ARGS__); if(logfile != NULL) fclose(logfile); }
#ifdef VERBOSE
#define LOGIFVERBOSE(...) LOG(__VA_ARGS__);
#else
#define LOGIFVERBOSE(...)
#endif
// YN: costs
#define SEPARATOR ';' // file names contain commas...
FILE* costs_file;
// Init file
static void init_costs_file(const char* costfName) {
char path[strlen(costfName)+2];
snprintf(path, sizeof path, "%s", costfName);
costs_file = fopen(path, "a");
if (!costs_file)
DIE("Failed to open costs file: %s\n", path);
//fprintf(costs_file, "Input file%c Time%c Memory%c Instr.%c User-Defined%c Patch-Touch%c Patch-Dist.%c Output Diff.%c Decision Dist.\n", SEPARATOR, SEPARATOR, SEPARATOR, SEPARATOR, SEPARATOR, SEPARATOR, SEPARATOR, SEPARATOR);
}
// Append resource usage to output file.
static void append_resource_use_to_file(const char* fname, long time, long memory, long instr_cost, long user_defined_cost, char patch_touched, int patch_distances[], int patch_distances_len, char output_diff, int dec_hist_distance) {
/* YN: transform int array to string */
char* converted_patch_distances = "";
char* distance = malloc(17);
for (int i=0; i<patch_distances_len; i++) {
if (i < patch_distances_len-1) {
snprintf(distance, 17, "%d,", patch_distances[i]);
} else {
snprintf(distance, 17, "%d", patch_distances[i]);
}
char* tmp = (char *) malloc(1 + strlen(converted_patch_distances) + strlen(distance));
strcpy(tmp, converted_patch_distances);
strcat(tmp, distance);
converted_patch_distances = (char *) malloc(1 + strlen(tmp));
strcpy(converted_patch_distances, tmp);
free(tmp);
}
free(distance);
fprintf(costs_file, "%s%c %ld%c %ld%c %ld%c %ld%c %u%c [%s]%c %u%c %d\n", fname, SEPARATOR, time, SEPARATOR, memory, SEPARATOR, instr_cost, SEPARATOR, user_defined_cost, SEPARATOR, patch_touched, SEPARATOR, converted_patch_distances, SEPARATOR, output_diff, SEPARATOR, dec_hist_distance);
if (patch_distances_len > 0) {
free(converted_patch_distances);
}
}
int tcp_socket;
/* Set up the TCP connection */
void setup_tcp_connection(const char* hostname, const char* port) {
LOG("Trying to connect to server %s at port %s...\n", hostname, port);
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_protocol = 0;
hints.ai_flags = AI_ADDRCONFIG;
struct addrinfo* res = 0;
int err = getaddrinfo(hostname, port, &hints, &res);
if (err!=0) {
DIE("failed to resolve remote socket address (err=%d)\n", err);
}
tcp_socket = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
if (tcp_socket == -1) {
DIE("%s\n", strerror(errno));
}
if (connect(tcp_socket, res->ai_addr, res->ai_addrlen) == -1) {
DIE("%s\n", strerror(errno));
}
freeaddrinfo(res);
}
void printUsageAndDie() {
DIE("Usage: interface [-s <server>] [-p <port>] [-t <number_of_targets>] <filename> <log_file_name>\n");
}
int main(int argc, char** argv) {
/* Stdout is piped to null, so write output to a file */
#ifdef OUTPUT_FILE
logfile = fopen(LOGFILE, "wb");
if (logfile == NULL) {
DIE("Error opening log file for writing\n");
}
#endif
/* Parameters */
const char* filename;
char* server = DEFAULT_SERVER;
char* port = DEFAULT_PORT;
int number_of_targets = DEFAULT_NUMBER_OF_TARGETS;
/* Check num of parameters */
if (argc < 3) {
LOG("1");
printUsageAndDie();
}
/* Parse parameters */
int curArg = 1;
while (curArg < argc) {
if (argv[curArg][0] == '-') { //flag
if (argv[curArg][1] == 's') {
// set server
server = argv[curArg+1];
curArg += 2;
} else if (argv[curArg][1] == 'p') {
// set port
port = argv[curArg+1];
curArg += 2;
} else if (argv[curArg][1] == 't') { // YN: targets
sscanf (argv[curArg+1], "%d", &number_of_targets);
TOTAL_TRACE_BITS_SIZE = TOTAL_TRACE_BITS_SIZE + number_of_targets * 4;
curArg += 2;
} else {
LOG("Unkown flag: %s\n", argv[curArg]);
printUsageAndDie();
}
} else {
break; // expect filename now
}
}
if (curArg != argc-2) {
LOG("3");
printUsageAndDie();
}
filename = argv[curArg];
LOG("input file = %s\n", filename);
const char* cost_file_name;
cost_file_name = argv[curArg+1];
init_costs_file(cost_file_name);
/* Local mode? */
uint8_t mode = DEFAULT_MODE;
if (strcmp(server, "localhost") == 0) {
LOG("Running in LOCAL MODE.\n");
mode = LOCAL_MODE;
}
/* Preamble instrumentation */
char* shmname = getenv(SHM_ENV_VAR);
int status = 0;
uint8_t kelinci_status = STATUS_SUCCESS;
if (shmname) {
/* Running in AFL */
in_afl = 1;
/* Set up shared memory region */
LOG("SHM_ID: %s\n", shmname);
key_t key = atoi(shmname);
if ((trace_bits = shmat(key, 0, 0)) == (uint8_t*) -1) {
DIE("Failed to access shared memory 2\n");
}
LOGIFVERBOSE("Pointer: %p\n", trace_bits);
LOG("Shared memory attached. Value at loc 3 = %d\n", trace_bits[3]);
/* Set up the fork server */
LOG("Starting fork server...\n");
if (write(199, &status, 4) != 4) {
LOG("Write failed\n");
goto resume;
}
while(1) {
if(read(198, &status, 4) != 4) {
DIE("Read failed\n");
}
int child_pid = fork();
if (child_pid < 0) {
DIE("Fork failed\n");
} else if (child_pid == 0) {
LOGIFVERBOSE("Child process, continue after pork server loop\n");
break;
}
LOGIFVERBOSE("Child PID: %d\n", child_pid);
write(199, &child_pid, 4);
LOGIFVERBOSE("Status %d \n", status);
if(waitpid(child_pid, &status, 0) <= 0) {
DIE("Fork crash");
}
LOGIFVERBOSE("Status %d \n", status);
write(199, &status, 4);
}
resume:
LOGIFVERBOSE("AFTER LOOP\n\n");
close(198);
close(199);
/* Mark a location to show we are instrumented */
trace_bits[0]++;
} else {
LOG("Not running within AFL. Shared memory and fork server not set up.\n");
trace_bits = (uint8_t*) malloc(TOTAL_TRACE_BITS_SIZE);
}
/* Done with initialization, now let's start the wrapper! */
int try = 0;
size_t nread;
char buf[FILE_READ_CHUNK];
FILE *file;
uint8_t conf = STATUS_DONE;
// try up to MAX_TRIES time to communicate with the server
do {
// if this is not the first try, sleep for 0.1 seconds first
if(try > 0)
usleep(100000);
setup_tcp_connection(server, port);
/* Send mode */
write(tcp_socket, &mode, 1);
/* LOCAL MODE */
if (mode == LOCAL_MODE) {
// get absolute path
char path[10000];
realpath(filename, path);
// send path length
int pathlen = strlen(path);
if (write(tcp_socket, &pathlen, 4) != 4) {
DIE("Error sending path length");
}
LOG("Sent path length: %d\n", pathlen);
// send path
if (write(tcp_socket, path, pathlen) != pathlen) {
DIE("Error sending path");
}
LOG("Sent path: %s\n", path);
/* DEFAULT MODE */
} else {
/* Send file contents */
file = fopen(filename, "r");
if (file) {
// get file size and send
fseek(file, 0L, SEEK_END);
int filesize = ftell(file);
rewind(file);
LOG("Sending file size %d\n", filesize);
if (write(tcp_socket, &filesize, 4) != 4) {
DIE("Error sending filesize");
}
// send file bytes
size_t total_sent = 0;
while ((nread = fread(buf, 1, sizeof buf, file)) > 0) {
if (ferror(file)) {
DIE("Error reading from file\n");
}
ssize_t sent = write(tcp_socket, buf, nread);
total_sent += sent;
LOG("Sent %lu bytes of %lu\n", total_sent, filesize);
}
fclose(file);
} else {
DIE("Error reading file %s\n", filename);
}
}
/* YN: Define array for patch distances. */
int patch_distances[number_of_targets];
/* Read kelinci_status over TCP */
nread = read(tcp_socket, &kelinci_status, 1);
if (nread != 1) {
LOG("Failure reading exit status over socket.\n");
kelinci_status = STATUS_COMM_ERROR;
goto cont;
}
LOG("Return kelinci_status = %d\n", status);
/* Read "shared memory" over TCP */
uint8_t *shared_mem = malloc(SHM_SIZE);
// for (int offset = 0; offset < SHM_SIZE; offset += SOCKET_READ_CHUNK) {
// nread = read(tcp_socket, shared_mem+offset, SOCKET_READ_CHUNK);
// if (nread != SOCKET_READ_CHUNK) {
// LOG("Error reading from socket\n");
// kelinci_status = STATUS_COMM_ERROR;
// goto cont;
// }
// }
int offset = 0;
while (offset < SHM_SIZE) {
nread = read(tcp_socket, shared_mem+offset, SHM_SIZE - offset);
if (nread <= 0) {
LOG("Error reading from socket. bytes read: %d\n", nread);
kelinci_status = STATUS_COMM_ERROR;
goto cont;
}
offset += nread;
LOG("Block read: %d bytes read\n", nread);
}
/* If successful, copy over to actual shared memory */
for (int i = 0; i < SHM_SIZE; i++) {
if (shared_mem[i] != 0) {
LOG("%d -> %d\n", i, shared_mem[i]);
trace_bits[i] += shared_mem[i];
}
}
/* Receive runtime */
long runtime;
nread = read(tcp_socket, &runtime, 8);
if (nread != 8) {
LOG("Failed to read runtime\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("Runtime: %ld\n", runtime);
/* Receive max heap */
long max_heap;
nread = read(tcp_socket, &max_heap, 8);
if (nread != 8) {
LOG("Failed to read max_heap\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("Max heap: %ld\n", max_heap);
/* Receive cost measured via instrumentation. */
long instr_cost;
nread = read(tcp_socket, &instr_cost, 8);
if (nread != 8) {
LOG("Failed to read instr_cost\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("Instr. cost: %ld\n", instr_cost);
/* YN: Receive user-defined cost */
long user_defined_cost;
nread = read(tcp_socket, &user_defined_cost, 8);
if (nread != 8) {
LOG("Failed to read user_defined_cost\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("User-defined cost: %ld\n", user_defined_cost);
/* YN: receive regression metrics */
signed char output_diff;
nread = read(tcp_socket, &output_diff, 1);
if (nread != 1) {
LOG("Failed to read output_diff\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("Output Diff: %u\n", output_diff);
signed char new_crash;
nread = read(tcp_socket, &new_crash, 1);
if (nread != 1) {
LOG("Failed to read output_diff\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("New crash: %u\n", new_crash);
int output_v1_encoding;
nread = read(tcp_socket, &output_v1_encoding, 4);
if (nread != 4) {
LOG("Failed to read output_v1_encoding\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("Encoded output v1: %d\n", output_v1_encoding);
int output_v2_encoding;
nread = read(tcp_socket, &output_v2_encoding, 4);
if (nread != 4) {
LOG("Failed to read output_v2_encoding\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("Encoded output v2: %d\n", output_v2_encoding);
int dec_hist_distance;
nread = read(tcp_socket, &dec_hist_distance, 4);
if (nread != 4) {
LOG("Failed to read dec_hist_distance\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("Decision Hist. Dist.: %d\n", dec_hist_distance);
int dec_hist_diff_encoding;
nread = read(tcp_socket, &dec_hist_diff_encoding, 4);
if (nread != 4) {
LOG("Failed to read dec_hist_diff_encoding\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("Encoded Decision Hist. Diff.: %d\n", dec_hist_diff_encoding);
char patch_touched;
nread = read(tcp_socket, &patch_touched, 1);
if (nread != 1) {
LOG("Failed to read patch_touched\n");
status = STATUS_COMM_ERROR;
goto cont;
}
LOG("Touched Patch: %u\n", patch_touched);
for (int i=0; i<number_of_targets; i++) {
int patch_distance;
nread = read(tcp_socket, &patch_distance, 4);
if (nread != 4) {
LOG("Failed to read patch_distance\n");
status = STATUS_COMM_ERROR;
goto cont;
}
patch_distances[i] = patch_distance;
LOG("Patch distance: %d\n", patch_distances[i]);
}
// YN: log cost
append_resource_use_to_file(filename, runtime, max_heap, instr_cost, user_defined_cost, patch_touched, patch_distances, number_of_targets, output_diff, dec_hist_distance);
/* Copy resource results to shared memory */
memcpy(&trace_bits[SHM_SIZE], &runtime, 8);
memcpy(&trace_bits[SHM_SIZE+8], &max_heap, 8);
memcpy(&trace_bits[SHM_SIZE+16], &instr_cost, 8);
/* YN: copy user-defined cost as well to shared memory */
memcpy(&trace_bits[SHM_SIZE+24], &user_defined_cost, 8);
/* YN: regression metrics */
memcpy(&trace_bits[SHM_SIZE+32], &output_diff, 1);
memcpy(&trace_bits[SHM_SIZE+33], &new_crash, 1);
memcpy(&trace_bits[SHM_SIZE+34], &output_v1_encoding, 4);
memcpy(&trace_bits[SHM_SIZE+38], &output_v2_encoding, 4);
memcpy(&trace_bits[SHM_SIZE+42], &dec_hist_distance, 4);
memcpy(&trace_bits[SHM_SIZE+46], &dec_hist_diff_encoding, 4);
memcpy(&trace_bits[SHM_SIZE+50], &patch_touched, 1);
for (int i=0; i<number_of_targets; i++) {
memcpy(&trace_bits[SHM_SIZE+59+(i*4)], &patch_distances[i], 4);
}
/* Close socket */
cont: close(tcp_socket);
/* Only try communicating MAX_TRIES times */
if (try++ > MAX_TRIES) {
// fail silently...
DIE("Stopped trying to communicate with server.\n");
}
} while (kelinci_status == STATUS_QUEUE_FULL || kelinci_status == STATUS_COMM_ERROR);
LOG("Received results. Terminating.\n\n");
/* Disconnect shared memory */
if (in_afl) {
shmdt(trace_bits);
}
/* Terminate with CRASH signal if Java program terminated abnormally */
if (kelinci_status == STATUS_CRASH) {
LOG("Crashing...\n");
abort();
}
/**
* If JAVA side timed out, keep looping here till AFL hits its time-out.
* In a good set-up, the time-out on the JAVA process is slightly longer
* than AFLs time-out to prevent hitting this.
**/
if (kelinci_status == STATUS_TIMEOUT) {
LOG("Starting infinite loop...\n");
while (1) {
sleep(10);
}
}
LOG_AND_CLOSE("Terminating normally.\n");
return 0;
}
|
the_stack_data/257054.c | #include <stdio.h> /* for printf() and fprintf() */
#include <sys/socket.h> /* for omnirob_socket(), connect(), send(), and recv() */
#include <arpa/inet.h> /* for omnirob_sockaddr_in and inet_addr() */
#include <stdlib.h> /* for atoi() and exit() */
#include <string.h> /* for memset() */
#include <unistd.h> /* for close() */
#define RCVBUFSIZE 128 /* Size of receive buffer */
#define OMNIROB_IP "192.168.201.50"
#define OMNIROB_PORT 56000
int omnirob_sock; /* omnirob_socket descriptor */
struct sockaddr_in omnirob_sock_addr; /* Echo server address */
char *cmd_string; /* String to send to echo server */
char recv_buff[RCVBUFSIZE]; /* Buffer for echo string */
int recv_bytes ; /* Bytes read in single recv() */
int connect_to_omnirob(char* ip, int port)
{
/* Create a reliable, stream omnirob_socket using TCP */
if ((omnirob_sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0){
printf("CORE: OMNIROB_IFACE: omnirob_socket creation failed\n");
return -1;
}
/* Construct the server address structure */
memset(&omnirob_sock_addr, 0, sizeof(omnirob_sock_addr)); /* Zero out structure */
omnirob_sock_addr.sin_family = AF_INET; /* Internet address family */
omnirob_sock_addr.sin_addr.s_addr = inet_addr(ip); /* Server IP address */
omnirob_sock_addr.sin_port = htons(port); /* Server port */
/* Establish the connection to the echo server */
if (connect(omnirob_sock, (struct sockaddr *) &omnirob_sock_addr, sizeof(omnirob_sock_addr)) < 0){
printf("CORE: OMNIROB_IFACE: connection to robot failed\n");
return -2;
}
return 0;
}
int read_omnirob_gyro()
{
const char* cmd = "?Ig\n";
/* Send the interogation command string to the robot */
if (send(omnirob_sock, cmd, strlen(cmd), 0) != strlen(cmd)){
printf("CORE: OMNIROB_IFACE: send failed sent a different number of bytes than expected\n");
return -1;
}
/* Get the reply */
if ((recv_bytes = recv(omnirob_sock, recv_buff, RCVBUFSIZE - 1, 0)) <= 0){
printf("CORE: OMNIROB_IFACE: receive failed or connection closed prematurely\n");
return -2;
}
recv_buff[recv_bytes] = '\0'; /* Terminate the string! */
printf("%s", recv_buff); /* Print the echo buffer */
return recv_bytes;
}
int read_omnirob_compass()
{
const char* cmd = "?Ic\n";
/* Send the interogation command string to the robot */
if (send(omnirob_sock, cmd, strlen(cmd), 0) != strlen(cmd)){
printf("CORE: OMNIROB_IFACE: send failed sent a different number of bytes than expected\n");
return -1;
}
/* Get the reply */
if ((recv_bytes = recv(omnirob_sock, recv_buff, RCVBUFSIZE - 1, 0)) <= 0){
printf("CORE: OMNIROB_IFACE: receive failed or connection closed prematurely\n");
return -2;
}
recv_buff[recv_bytes] = '\0'; /* Terminate the string! */
printf("%s", recv_buff); /* Print the echo buffer */
return recv_bytes;
}
int read_omnirob_wheels()
{
const char* cmd = "?Wi\n"; // TODO check what do we need from here
/* Send the interogation command string to the robot */
if (send(omnirob_sock, cmd, strlen(cmd), 0) != strlen(cmd)){
printf("CORE: OMNIROB_IFACE: send failed sent a different number of bytes than expected\n");
return -1;
}
/* Get the reply */
if ((recv_bytes = recv(omnirob_sock, recv_buff, RCVBUFSIZE - 1, 0)) <= 0){
printf("CORE: OMNIROB_IFACE: receive failed or connection closed prematurely\n");
return -2;
}
recv_buff[recv_bytes] = '\0'; /* Terminate the string! */
printf("%s", recv_buff); /* Print the echo buffer */
return recv_bytes;
}
int disconnect_from_omnirob()
{
if(omnirob_sock!=0) close(omnirob_sock);
}
int main(int argc, char *argv[])
{
connect_to_omnirob(OMNIROB_IP, OMNIROB_PORT);
read_omnirob_compass();
read_omnirob_gyro();
read_omnirob_wheels();
disconnect_from_omnirob();
return 0;
}
|
the_stack_data/270712.c | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
struct Node {
int data;
struct Node *subLeft;
struct Node *subRight;
};
typedef struct Node * Tree;
Tree init() {
return NULL;
}
bool isEmpty(Tree root) {
return root == NULL;
}
Tree createNewNode(int value) {
struct Node *n = malloc(sizeof(struct Node));
n->subLeft = NULL;
n->subRight = NULL;
n->data = value;
return n;
}
Tree find(Tree root, int value) {
if (isEmpty(root) || root->data == value)
return root;
if (value > root->data)
return find(root->subRight, value);
return find(root->subLeft, value);
}
Tree insert(Tree root, int value) {
if (isEmpty(root))
return createNewNode(value);
if (value > root->data)
root->subRight = insert(root->subRight, value);
else
root->subLeft = insert(root->subLeft, value);
return root;
}
void inOrder(Tree root) {
if (! isEmpty(root)) {
inOrder(root->subLeft);
printf("[%2i] ", root->data);
inOrder(root->subRight);
}
}
void preOrder(Tree root) {
if (! isEmpty(root)) {
printf("[%2i] ", root->data);
preOrder(root->subLeft);
preOrder(root->subRight);
}
}
void postOrder(Tree root) {
if (! isEmpty(root)) {
postOrder(root->subLeft);
postOrder(root->subRight);
printf("[%2i] ", root->data);
}
}
Tree findSmallest(Tree temp) {
while (temp->subLeft != NULL)
temp = temp->subLeft;
return temp;
}
Tree findGreater(Tree temp) {
while (temp->subRight != NULL)
temp = temp->subRight;
return temp;
}
int main() {
Tree root = init();
root = insert(root, 10);
root = insert(root, 7);
root = insert(root, 14);
root = insert(root, 2);
root = insert(root, 8);
root = insert(root, 13);
root = insert(root, 25);
root = insert(root, 4);
root = insert(root, 6);
root = insert(root, 9);
root = insert(root, 12);
root = insert(root, 20);
root = insert(root, 31);
printf("\n\nEm ordem:");
inOrder(root);
printf("\n\nPre ordem:");
preOrder(root);
printf("\n\nPos ordem:");
postOrder(root);
printf("\n");
// while (true) {
// Tree temp = NULL;
// int value = 0;
// printf("\nInforme o valor: ");
// scanf("%i", &value);
// if (value == 0)
// break;
// temp = find(root, value);
// if (temp)
// printf("\nValor %i encontrado!!\n", temp->data);
// else
// printf("\nValor %i NAO encontrado!!\n", value);
// }
// if (! isEmpty(root)) {
// Tree temp = NULL;
// temp = findSmallest(root);
// printf("\nMenor valor %i encontrado!!\n", temp->data);
// temp = findGreater(root);
// printf("\nMaior valor %i encontrado!!\n", temp->data);
// }
return 0;
}
|
the_stack_data/2451.c | /*
* @@name: declare_variant.2c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_5.0
*/
#include <omp.h>
void base_saxpy(int, float, float *, float *);
void avx512_saxpy(int, float, float *, float *);
#pragma omp declare variant( avx512_saxpy ) \
match( device={isa("core-avx512")} )
void base_saxpy(int n, float s, float *x, float *y) // base function
{
#pragma omp parallel for
for(int i=0; i<n; i++) y[i] = s*x[i] + y[i];
}
void avx512_saxpy(int n, float s, float *x, float *y) //function variant
{
//assume 64-byte alignment for AVX-512
#pragma omp parallel for simd simdlen(16) aligned(x,y:64)
for(int i=0; i<n; i++) y[i] = s*x[i] + y[i];
}
// Above may be in another file scope.
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#define N 1000
int main()
{
static float x[N],y[N] __attribute__ ((aligned(64)));
float s=2.0;
// Check for 64-byte aligned
if( ((intptr_t)y)%64 != 0 || ((intptr_t)x)%64 != 0 )
{ printf("ERROR: x|y not 64-Byte aligned\n"); exit(1); }
for(int i=0; i<N; i++){ x[i]=i+1; y[i]=i+1; } // initialize
base_saxpy(N,s,x,y);
printf("y[0],y[N-1]: %5.0f %5.0f\n",y[0],y[N-1]); //output: y... 3 3000
return 0;
}
|
the_stack_data/70450079.c | // Adapted from interp.cpp from Caffe util by Pauline Luc
// Originally developed by George Papandreou
#ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialUpSamplingBilinear.c"
#else
#include "linear_upsampling.h"
static inline void THNN_(SpatialUpSamplingBilinear_shapeCheck)
(THTensor *input, THTensor *gradOutput,
int nBatch, int nChannels,
int inputHeight, int inputWidth,
int outputHeight, int outputWidth) {
THArgCheck(inputHeight > 0 && inputWidth > 0
&& outputHeight > 0 && outputWidth > 0, 2,
"input and output sizes should be greater than 0,"
" but got input (H: %d, W: %d) output (H: %d, W: %d)",
inputHeight, inputWidth, outputHeight, outputWidth);
if (input != NULL) {
THNN_ARGCHECK(!input->is_empty() && input->dim() == 4, 2, input,
"non-empty 4D input tensor expected but got: %s");
}
if (gradOutput != NULL) {
THNN_CHECK_DIM_SIZE(gradOutput, 4, 0, nBatch);
THNN_CHECK_DIM_SIZE(gradOutput, 4, 1, nChannels);
THNN_CHECK_DIM_SIZE(gradOutput, 4, 2, outputHeight);
THNN_CHECK_DIM_SIZE(gradOutput, 4, 3, outputWidth);
}
}
void THNN_(SpatialUpSamplingBilinear_updateOutput)(
THNNState *state,
THTensor *input,
THTensor *output,
int outputHeight,
int outputWidth,
bool align_corners){
int nbatch = THTensor_(size)(input, 0);
int channels = THTensor_(size)(input, 1);
int inputHeight = THTensor_(size)(input, 2);
int inputWidth = THTensor_(size)(input, 3);
THNN_(SpatialUpSamplingBilinear_shapeCheck)
(input, NULL,
nbatch, channels,
inputHeight, inputWidth,
outputHeight, outputWidth);
input = THTensor_(newContiguous)(input);
THTensor_(resize4d)(output,
THTensor_(size)(input, 0),
THTensor_(size)(input, 1),
outputHeight, outputWidth);
THTensor_(zero)(output);
real *idata = THTensor_(data)(input);
real *odata = THTensor_(data)(output);
channels = nbatch * channels;
THAssert(inputHeight > 0 && inputWidth > 0 && outputHeight > 0 && outputWidth > 0);
// special case: just copy
if (inputHeight == outputHeight && inputWidth == outputWidth) {
for (int h2 = 0; h2 < outputHeight; ++h2) {
const int h1 = h2;
for (int w2 = 0; w2 < outputWidth; ++w2) {
const int w1 = w2;
const real* pos1 = &idata[h1 * inputWidth + w1];
real* pos2 = &odata[h2 * outputWidth + w2];
for (int c = 0; c < channels; ++c) {
pos2[0] = pos1[0];
pos1 += inputWidth * inputHeight;
pos2 += outputWidth * outputHeight;
}
}
}
THTensor_(free)(input);
return;
}
const accreal rheight = linear_upsampling_compute_scale<accreal>(inputHeight, outputHeight, align_corners);
const accreal rwidth = linear_upsampling_compute_scale<accreal>(inputWidth, outputWidth, align_corners);
for (int h2 = 0; h2 < outputHeight; ++h2) {
const accreal h1r = linear_upsampling_compute_source_index<accreal>(rheight, h2, align_corners);
const int h1 = h1r;
const int h1p = (h1 < inputHeight - 1) ? 1 : 0;
const real h1lambda = h1r - h1;
const real h0lambda = (real)1. - h1lambda;
for (int w2 = 0; w2 < outputWidth; ++w2) {
const accreal w1r = linear_upsampling_compute_source_index<accreal>(rwidth, w2, align_corners);
const int w1 = w1r;
const int w1p = (w1 < inputWidth - 1) ? 1 : 0;
const real w1lambda = w1r - w1;
const real w0lambda = (real)1. - w1lambda;
const real* pos1 = &idata[h1 * inputWidth + w1];
real* pos2 = &odata[h2 * outputWidth + w2];
for (int c = 0; c < channels; ++c) {
pos2[0] = h0lambda * (w0lambda * pos1[0]+ w1lambda * pos1[w1p])
+ h1lambda * (w0lambda * pos1[h1p * inputWidth]
+ w1lambda * pos1[h1p * inputWidth + w1p]);
pos1 += inputWidth * inputHeight;
pos2 += outputWidth * outputHeight;
}
}
}
THTensor_(free)(input);
}
void THNN_(SpatialUpSamplingBilinear_updateGradInput)(
THNNState *state,
THTensor *gradOutput,
THTensor *gradInput,
int nbatch,
int channels,
int inputHeight,
int inputWidth,
int outputHeight,
int outputWidth,
bool align_corners){
THNN_(SpatialUpSamplingBilinear_shapeCheck)
(NULL, gradOutput,
nbatch, channels,
inputHeight, inputWidth,
outputHeight, outputWidth);
THTensor_(resize4d)(gradInput, nbatch, channels, inputHeight, inputWidth);
THTensor_(zero)(gradInput);
gradOutput = THTensor_(newContiguous)(gradOutput);
real *data1 = THTensor_(data)(gradInput);
real *data2 = THTensor_(data)(gradOutput);
channels = nbatch * channels;
// special case: same-size matching grids
if (inputHeight == outputHeight && inputWidth == outputWidth) {
for (int h2 = 0; h2 < outputHeight; ++h2) {
const int h1 = h2;
for (int w2 = 0; w2 < outputWidth; ++w2) {
const int w1 = w2;
real* pos1 = &data1[h1 * inputWidth + w1];
const real* pos2 = &data2[h2 * outputWidth + w2];
for (int c = 0; c < channels; ++c) {
pos1[0] += pos2[0];
pos1 += inputWidth * inputHeight;
pos2 += outputWidth * outputHeight;
}
}
}
THTensor_(free)(gradOutput);
return;
}
const accreal rheight = linear_upsampling_compute_scale<accreal>(inputHeight, outputHeight, align_corners);
const accreal rwidth = linear_upsampling_compute_scale<accreal>(inputWidth, outputWidth, align_corners);
for (int h2 = 0; h2 < outputHeight; ++h2) {
const accreal h1r = linear_upsampling_compute_source_index<accreal>(rheight, h2, align_corners);
const int h1 = h1r;
const int h1p = (h1 < inputHeight - 1) ? 1 : 0;
const real h1lambda = h1r - h1;
const real h0lambda = (real)1. - h1lambda;
for (int w2 = 0; w2 < outputWidth; ++w2) {
const accreal w1r = linear_upsampling_compute_source_index<accreal>(rwidth, w2, align_corners);
const int w1 = w1r;
const int w1p = (w1 < inputWidth - 1) ? 1 : 0;
const real w1lambda = w1r - w1;
const real w0lambda = (real)1. - w1lambda;
real* pos1 = &data1[h1 * inputWidth + w1];
const real* pos2 = &data2[h2 * outputWidth + w2];
for (int c = 0; c < channels; ++c) {
pos1[0] += h0lambda * w0lambda * pos2[0];
pos1[w1p] += h0lambda * w1lambda * pos2[0];
pos1[h1p * inputWidth] += h1lambda * w0lambda * pos2[0];
pos1[h1p * inputWidth + w1p] += h1lambda * w1lambda * pos2[0];
pos1 += inputWidth * inputHeight;
pos2 += outputWidth * outputHeight;
}
}
}
THTensor_(free)(gradOutput);
}
#endif
|
the_stack_data/54824386.c | const char rfkill_version[] = "0.4";
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.