blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
905 values
visit_date
timestamp[us]date
2015-08-09 11:21:18
2023-09-06 10:45:07
revision_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-17 19:19:19
committer_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-06 06:22:19
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]date
2012-06-07 00:51:45
2023-09-14 21:58:39
gha_created_at
timestamp[us]date
2008-03-27 23:40:48
2023-08-21 23:17:38
gha_language
stringclasses
141 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
115 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
20e7d7c5623d17526b6a8eb0d500ce46a5adeb50
0601003cd1ef4ece56db78967c38689a7714e05f
/Talisman_Game/Forest.h
155e1fd8c7302ade155de672a20b5e4cbf1ba285
[]
no_license
Maromarius/talisman_game
e2ed85fbf2135f856b1d6266c4a3b5057c97091f
622093f22f442396c20526bc1a1f41db9653d272
refs/heads/master
2020-06-07T07:04:10.221993
2012-12-09T03:47:19
2012-12-09T03:47:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
244
h
#ifndef FOREST_H #define FOREST_H #include <string> #include "Area.h" using namespace std; class Forest: public Area { public: static const string NAME ; static const string DESCRIPTION; Forest(int); ~Forest(); }; #endif
[ "xmike.natale@gmail.com" ]
xmike.natale@gmail.com
2d90e6e41e4899461cc88f0eefd4ccbbad56abc6
85635724b2fca00487089b316516cc1ade4eff6b
/docs/Milestone3/milestone3v1.1.ino
a196583d85eaca827681e1ad7b6fc72f35a30547
[]
no_license
bjeong99/MazeTraversalRobot
0d6aa1a8cb6b75cfda22e6fa390b43a808e3c1df
386a0de5d08e31a639950e09701693dc13c8fb8f
refs/heads/master
2020-12-03T23:55:55.391398
2020-01-03T06:44:35
2020-01-03T06:44:35
231,529,392
0
0
null
null
null
null
UTF-8
C++
false
false
15,720
ino
#include <StackArray.h> #include <Servo.h> //#define lightR A2 //#define lightL A1 //#define lightC A0 #define onButton 7 Servo servoR; Servo servoL; volatile int R; volatile int L; volatile int C; volatile int distR; volatile int distL; volatile int distC; int k = 1; unsigned long threshold; float thresholdPT; int totalChannels = 6; int addressX = 5; int addressY = 6; int addressZ = 7; int X = 0; int Y = 0; int Z = 0; int distanceThreshold = 18; int intersectPin = 2; int leftPin = 4; int forPin = 3; int rightPin = 8; int current_dir; // dir // north: 0 // east: 1 // south: 2 // west: 3 typedef struct { int x; int y; } node; const int columns = 2; const int rows = 2; bool visited_nodes[columns][rows]; node current_node; StackArray<node> stack; int node_counter = 0; bool back_track; void setup() { // set back track to false back_track = false; // set all values of visited_nodes as false for (int i = 0; i < columns; i++) { for (int j = 0; j < rows; j++) { visited_nodes[i][j] = false; } } // set current_dir as north current_dir = 0; // set current_node as (0,1) current_node.x = 0; current_node.y = 0; stack.push(current_node); current_node.x = 0; current_node.y = 1; visited_nodes[0][0] = true; // LED pin pinMode(intersectPin, OUTPUT); pinMode(leftPin, OUTPUT); pinMode(forPin, OUTPUT); pinMode(rightPin, OUTPUT); // Prepare address pins for output pinMode(addressX, OUTPUT); pinMode(addressY, OUTPUT); pinMode(addressZ, OUTPUT); // Prepare read pin pinMode(A0, INPUT); // put your setup code here, to run once: servoR.attach(9); servoL.attach(10); Serial.begin(9600); X = bitRead(0, 0); Y = bitRead(0, 1); Z = bitRead(0, 2); digitalWrite(addressX, X); digitalWrite(addressY, Y); digitalWrite(addressZ, Z); //Define threshold of the Robot (Varies day to day) int i = 0; int temp = 0; float temp2 = 0; while (i < 50) { temp += analogRead(A0); i++; } threshold = temp / 50 + 450; Serial.print("Threshold: "); Serial.println(threshold); } // checks if light is on the line or not (works) boolean isOn(int light) { if (light < threshold) return true; else return false; } boolean isWall(int sensorDistance) { if (sensorDistance < distanceThreshold) return true; return false; } //servo functions void goFor() { servoR.write(83); servoL.write(97); } void goBack() { servoR.write(95); servoL.write(85); } void goStop() { servoR.write(90); servoL.write(90); } void slightRight() { servoR.write(88); servoL.write(97); } void hardRight() { servoR.write(95); servoL.write(95); } void slightLeft() { servoR.write(83); servoL.write(92); } void hardLeft() { servoR.write(85); servoL.write(85); } // return sensor values if values needed in nested loop int getC() { X = bitRead(0, 0); Y = bitRead(0, 1); Z = bitRead(0, 2); digitalWrite(addressX, X); digitalWrite(addressY, Y); digitalWrite(addressZ, Z); return analogRead(A0); } int getR() { X = bitRead(1, 0); Y = bitRead(1, 1); Z = bitRead(1, 2); digitalWrite(addressX, X); digitalWrite(addressY, Y); digitalWrite(addressZ, Z); return analogRead(A0); } int getL() { X = bitRead(2, 0); Y = bitRead(2, 1); Z = bitRead(2, 2); digitalWrite(addressX, X); digitalWrite(addressY, Y); digitalWrite(addressZ, Z); return analogRead(A0); } void turnLeft() { digitalWrite(leftPin, HIGH); goFor(); delay(500); hardLeft(); delay(500); R = getR(); while (!isOn(R)) { R = getR(); } goStop(); } void turnRight() { digitalWrite(rightPin, HIGH); goFor(); delay(500); hardRight(); delay(500); L = getL(); while (!isOn(L)) { L = getL(); } goStop(); } void uTurn() { digitalWrite(leftPin, HIGH); goFor(); delay(100); hardLeft(); delay(500); R = getR(); while (!isOn(R)) { R = getR(); } hardLeft(); delay(500); R = getR(); while (!isOn(R)) { R = getR(); } goStop(); } float ptCurrent() { float result = analogRead(A4); float voltage = result * (5.0 / 1023.0); float current = 1000 * voltage / 178; return current; } void dfs() { Serial.println("Is on Intersect"); digitalWrite(intersectPin, HIGH); goStop(); delay(150); visited_nodes[current_node.x][current_node.y] = true; // current_dir = NORTH if (current_dir == 0) { // north, go north if (!isWall(distC) && visited_nodes[current_node.x][current_node.y + 1] == false) { Serial.println("DFS, North head North"); Serial.println(); current_dir = 0; stack.push(current_node); current_node.y = current_node.y + 1; digitalWrite(forPin, HIGH); goFor(); delay(250); } // north, turn east else if (!isWall(distR) && visited_nodes[current_node.x + 1][current_node.y] == false) { Serial.println("DFS, North head East"); Serial.println(); current_dir = 1; stack.push(current_node); current_node.x = current_node.x + 1; turnRight(); } // north, u turn to south, backtrack else { goStop(); back_track = true; } } // current_dir = EAST else if (current_dir == 1) { // east, turn left to north if (!isWall(distL) && visited_nodes[current_node.x][current_node.y + 1] == false) { Serial.println("DFS, East head North"); Serial.println(); current_dir = 0; stack.push(current_node); current_node.y = current_node.y + 1; turnLeft(); } // east, go forward to east else if (!isWall(distC) && visited_nodes[current_node.x + 1][current_node.y] == false) { Serial.println("DFS, East head East"); Serial.println(); current_dir = 1; stack.push(current_node); current_node.x = current_node.x + 1; digitalWrite(forPin, HIGH); goFor(); delay(250); } // east, go right to south else if (!isWall(distR) && visited_nodes[current_node.x][current_node.y - 1] == false) { Serial.println("DFS, East head South"); Serial.println(); current_dir = 2; stack.push(current_node); current_node.y = current_node.y - 1; turnRight(); } // else back track else { goStop(); back_track = true; } } // current_dir = SOUTH else if (current_dir == 2) { //south, turn left to go east if (!isWall(distL) && visited_nodes[current_node.x + 1][current_node.y] == false) { Serial.println("DFS, South head East"); Serial.println(); current_dir = 1; stack.push(current_node); current_node.x = current_node.x + 1; turnLeft(); } //south, go forward to go south else if (!isWall(distC) && visited_nodes[current_node.x][current_node.y - 1] == false) { Serial.println("DFS, South head South"); Serial.println(); current_dir = 2; stack.push(current_node); current_node.y = current_node.y - 1; digitalWrite(forPin, HIGH); goFor(); delay(250); } //south, go right to go west else if (!isWall(distR) && visited_nodes[current_node.x - 1][current_node.y] == false) { Serial.println("DFS, South head West"); Serial.println(); current_dir = 3; stack.push(current_node); current_node.x = current_node.x - 1; turnRight(); } //south, backtrack to north else { goStop(); back_track = true; } } // current_dir = WEST else if (current_dir == 3) { //west, turn right to north if (!isWall(distR) && visited_nodes[current_node.x][current_node.y + 1] == false) { Serial.println("DFS, West head North"); Serial.println(); current_dir = 0; stack.push(current_node); current_node.y = current_node.y + 1; turnRight(); } //west, turn left to go south else if (!isWall(distL) && visited_nodes[current_node.x][current_node.y - 1] == false) { Serial.println("DFS, West head South"); Serial.println(); current_dir = 2; stack.push(current_node); current_node.y = current_node.y - 1; turnLeft(); } //west, go for to go west else if (!isWall(distC) && visited_nodes[current_node.x - 1][current_node.y] == false) { Serial.println("DFS, West head West"); Serial.println(); current_dir = 3; stack.push(current_node); current_node.x = current_node.x - 1; digitalWrite(forPin, HIGH); goFor(); delay(250); } else { goStop(); back_track = true; } } } void backtrack() { Serial.println("in backtrack"); node next_node = stack.peek(); //north if (current_dir = 0) { // north and if next node is north if (current_node.x == next_node.x && current_node.y == next_node.y - 1) { Serial.println ("BackTrack, North head North"); Serial.println(); current_dir = 0; current_node = stack.pop(); back_track = false; digitalWrite(forPin, HIGH); goFor(); delay(200); } // north and if next node is to the east else if (current_node.x == next_node.x - 1 && current_node.y == next_node.y) { Serial.println ("BackTrack, North head East"); Serial.println(); current_dir = 1; current_node = stack.pop(); back_track = false; turnRight(); } // north and if next node is to the west else if (current_node.x == next_node.x + 1 && current_node.y == next_node.y) { Serial.println ("BackTrack, North head West"); Serial.println(); current_dir = 3; current_node = stack.pop(); back_track = false; turnLeft(); } // north and if next node is to the south else if (current_node.x == next_node.x && current_node.y == next_node.y + 1) { Serial.println ("BackTrack, North head South"); Serial.println(); current_dir = 2; current_node = stack.pop(); back_track = false; uTurn(); } } //east else if (current_dir = 1) { // east and if next node is north if (current_node.x == next_node.x && current_node.y == next_node.y - 1) { Serial.println ("BackTrack, East head North"); Serial.println(); current_dir = 0; current_node = stack.pop(); back_track = false; turnLeft(); } // east and if next node is to the east else if (current_node.x == next_node.x - 1 && current_node.y == next_node.y) { Serial.println ("BackTrack, East head East"); Serial.println(); current_dir = 1; current_node = stack.pop(); back_track = false; digitalWrite(forPin, HIGH); goFor(); delay(200); } // east and if next node is to the west else if (current_node.x == next_node.x + 1 && current_node.y == next_node.y) { Serial.println ("BackTrack, East head West"); Serial.println(); current_dir = 3; current_node = stack.pop(); back_track = false; uTurn(); } // east and if next node is to the south else if (current_node.x == next_node.x && current_node.y == next_node.y + 1) { Serial.println ("BackTrack, East head South"); Serial.println(); current_dir = 2; current_node = stack.pop(); back_track = false; turnRight(); } } //south else if (current_dir = 2) { // south and if next node is north if (current_node.x == next_node.x && current_node.y == next_node.y - 1) { Serial.println ("BackTrack, South head North"); Serial.println(); current_dir = 0; current_node = stack.pop(); back_track = false; uTurn(); } // south and if next node is to the east else if (current_node.x == next_node.x - 1 && current_node.y == next_node.y) { Serial.println ("BackTrack, South head East"); Serial.println(); current_dir = 1; current_node = stack.pop(); back_track = false; turnLeft(); } // south and if next node is to the west else if (current_node.x == next_node.x + 1 && current_node.y == next_node.y) { Serial.println ("BackTrack, South head West"); Serial.println(); current_dir = 3; current_node = stack.pop(); back_track = false; turnRight(); } // south and if next node is to the south else if (current_node.x == next_node.x && current_node.y == next_node.y + 1) { Serial.println ("BackTrack, South head South"); Serial.println(); current_dir = 2; current_node = stack.pop(); back_track = false; digitalWrite(forPin, HIGH); goFor(); delay(200); } } // west else if (current_dir == 3) { // west and if next node is north if (current_node.x == next_node.x && current_node.y == next_node.y - 1) { Serial.println ("BackTrack, West head North"); Serial.println(); current_dir = 0; current_node = stack.pop(); back_track = false; turnRight(); } // west and if next node is to the east else if (current_node.x == next_node.x - 1 && current_node.y == next_node.y) { Serial.println ("BackTrack, West head East"); Serial.println(); current_dir = 1; current_node = stack.pop(); back_track = false; uTurn(); } // west and if next node is to the west else if (current_node.x == next_node.x + 1 && current_node.y == next_node.y) { Serial.println ("BackTrack, West head West"); Serial.println(); current_dir = 3; current_node = stack.pop(); back_track = false; goFor(); } // west and if next node is to the south else if (current_node.x == next_node.x && current_node.y == next_node.y + 1) { Serial.println ("BackTrack, West head South"); Serial.println(); current_dir = 2; current_node = stack.pop(); back_track = false; digitalWrite(forPin, HIGH); turnLeft(); delay(200); } } } void loop() { digitalWrite(intersectPin, LOW); digitalWrite(forPin, LOW); digitalWrite(leftPin, LOW); digitalWrite(rightPin, LOW); int sensorVal[totalChannels]; // values for line sensors for (int i = 0; i < 3; i++) { X = bitRead(i, 0); Y = bitRead(i, 1); Z = bitRead(i, 2); digitalWrite(addressX, X); digitalWrite(addressY, Y); digitalWrite(addressZ, Z); sensorVal[i] = analogRead(A0); } // values for IR sensors for (int i = 3; i < totalChannels; i++) { X = bitRead(i, 0); Y = bitRead(i, 1); Z = bitRead(i, 2); digitalWrite(addressX, X); digitalWrite(addressY, Y); digitalWrite(addressZ, Z); float volt = analogRead(A0) * 0.0048828125; sensorVal[i] = 13 * pow(volt, -1); } // line sensors C = sensorVal[0]; R = sensorVal[1]; L = sensorVal[2]; // wall sensor distance distC = sensorVal[3]; distR = sensorVal[4]; distL = sensorVal[5]; // keeping robot on the line if (isOn(C) && !isOn(L) && !isOn(R)) goFor(); else if (isOn(L) && !isOn(R)) { slightLeft(); } else if (!isOn(L) && isOn(R)) { slightRight(); } else if (!isOn(C) && !isOn(L) && !isOn(R)) { goStop(); } //debug back_track // reaches intersection, make turn decision if (isOn(C) && isOn(R) && isOn(L)) { // print currentNode Serial.print("Current Node: "); Serial.print(current_node.x); Serial.print(", "); Serial.println(current_node.y); if (back_track == false) { dfs(); } else if (back_track == true) { backtrack(); } } }
[ "noreply@github.coecis.cornell.edu" ]
noreply@github.coecis.cornell.edu
081499abe9ed7bd615d2914ed70d4ab5995976fc
d6db29ed89efedf24f96e5d5986fc60080d9d18b
/Source/Objects/Weapons/Bullets.cpp
ad094748b1b866497c345b878b9656fab74863f4
[]
no_license
ErosPinzani/Gioco
ba951eb9b432dcfb567ca26c5baee61f9d8c7877
e2b2e5ecc38e9fdad70fd142b884f56177a5d879
refs/heads/master
2023-06-09T14:16:17.053077
2021-06-15T16:34:09
2021-06-15T16:34:09
374,622,759
0
0
null
null
null
null
UTF-8
C++
false
false
2,915
cpp
// // Created by erosp on 09/06/2021. // #include "..\..\..\Include\Objects\Weapons\Bullets.h" Textures::ID toTextureID(Bullets::BulletType bulletType) { switch(bulletType) { case Bullets::BulletType::aoeBullet: return Textures::aoeBullet; case Bullets::BulletType::stBullet: return Textures::stBullet; } } Bullets::Bullets(const TextureHolder& textures, BulletType bulletType): textures(textures), active(false), delayWalk(false), delayMoreWalk (false), delayMoreMoreWalk(false), counterWalk(0), bulletType(bulletType) { rect.setPosition(0, 0); texture = textures.get(toTextureID(bulletType)); sprite.setTexture(texture); switch(bulletType) { case aoeBullet: rect.setOrigin(30 / 2, 30 / 2); sprite.setOrigin(56 / 2, 56 / 2); //non credo necessario rect.setSize(sf::Vector2f(30, 30)); sprite.setTextureRect((sf::IntRect(0, 0, 56, 56))); attackDamage = 10; range = 5; break; case stBullet: rect.setOrigin(18 / 2, 15/ 2); sprite.setOrigin(18 / 2, 15 / 2); //non credo necessario rect.setSize(sf::Vector2f(18, 15)); sprite.setTextureRect((sf::IntRect(0, 0, 18, 15))); attackDamage = 5; range = 10; break; } } void Bullets::setPosition(const sf::Vector2f &position, Direction direction) { active = true; this->direction = direction; rect.move(position); sprite.setPosition(rect.getPosition()); initialPos = rect.getPosition(); } const sf::Sprite &Bullets::getSprite() { return Entity::getSprite(); } void Bullets::update() { switch(direction) { case up: rect.move(0,-movementSpeed); break; case down: rect.move(0,movementSpeed); break; case left: rect.move(-movementSpeed,0); break; case right: rect.move(movementSpeed,0); break; } if ( delayWalk ) { if ( delayMoreWalk ) { if(delayMoreMoreWalk) if(bulletType == aoeBullet) { counterWalk = (counterWalk + 1) % 4; } else if(bulletType == stBullet) counterWalk = (counterWalk + 1) % 2; delayMoreMoreWalk = !delayMoreMoreWalk; } delayMoreWalk = !delayMoreWalk; } delayWalk = !delayWalk; if(bulletType == aoeBullet) { sprite.setTextureRect((sf::IntRect(counterWalk*58,0,56,56))); } else if(bulletType == stBullet) sprite.setTextureRect((sf::IntRect(counterWalk*18,0,18,15))); if(abs(rect.getPosition().x-initialPos.x) > range || abs(rect.getPosition().y-initialPos.y) > range) active = false; //keeps rect and sprite together sprite.setPosition(rect.getPosition()); }
[ "71319627+ErosPinzani@users.noreply.github.com" ]
71319627+ErosPinzani@users.noreply.github.com
f7533c69f5bc7c80b9a0ae9aa1b395cfe2916a68
2fccd9aa2bf21db5045ee7413b550f26ca6bb6ef
/src/GL_View3D/GL_Engine/GL_Material.hpp
6c23fca7f424ac7b4ed0f878cf6d2a55c6187799
[]
no_license
jacquespillet/Improc
a3d0458ebe2af6569a10a3989d53742cff87bfb1
7b019277cd6eb0685e34084b97d89f85c52a5aa4
refs/heads/master
2023-03-30T09:24:36.120242
2021-04-05T16:07:23
2021-04-05T16:07:23
345,378,792
0
0
null
null
null
null
UTF-8
C++
false
false
1,497
hpp
#pragma once #include "CommonIncludes.hpp" #include "GL_Shader.hpp" #include "GL_Texture.hpp" class GL_Material { public: GL_Material(){} GL_Material(std::string vertShaderSrc, std::string fragShaderSrc, bool shouldInit=false) : vertShaderSrc(vertShaderSrc), fragShaderSrc(fragShaderSrc) { if(shouldInit) Init(); } ~GL_Material(){ Destroy(); } void Init(); GL_Shader shader; void SetMat4(std::string varName, glm::mat4 mat); void SetInt(std::string varName, int val); void SetTexture(GL_Texture glTexture, std::string texName) { GETGL this->textureInformation = { glTexture, texName }; BindTexture(); } void BindTexture() { GETGL gl->glActiveTexture(GL_TEXTURE0); gl->glBindTexture(GL_TEXTURE_2D, textureInformation.texture.glTex); SetInt( textureInformation.name, 0); } void Destroy() { GETGL gl->glUseProgram(0); gl->glDeleteProgram(shader.programShaderObject); } struct ShaderTexBinding { GL_Texture texture; std::string name; }; ShaderTexBinding textureInformation; //0 : diffuse //1 : specular //2 : ambient //3 : emissive //4 : normals //5 : shininess //6 : opacity //7 : displacement //8 : ambientOcclusion private: bool inited=false; std::string vertShaderSrc, fragShaderSrc; };
[ "jacques@scanlabprojects.co.uk" ]
jacques@scanlabprojects.co.uk
1a5c26582a7432a35fddd5d6ae145f28eb6b1fd9
3841f7991232e02c850b7e2ff6e02712e9128b17
/小浪底泥沙三维/EV_Xld/jni/src/EV_Symbol_Java/wrapper/drawmarker_wrapperjava.cpp
d290cfcac1464de69b9cd55561de88f47a361b6c
[]
no_license
15831944/BeijingEVProjects
62bf734f1cb0a8be6fed42cf6b207f9dbdf99e71
3b5fa4c4889557008529958fc7cb51927259f66e
refs/heads/master
2021-07-22T14:12:15.106616
2017-10-15T11:33:06
2017-10-15T11:33:06
null
0
0
null
null
null
null
UTF-8
C++
false
false
349
cpp
/* This file is produced by the JNI AutoWrapper Utility Copyright (c) 2012 by EarthView Image Inc */ #include "symbol/drawmarker.h" #include <jni.h> #include "core_java/global_reference.h" #include "core_java/jni_load.h" #include <typeinfo> namespace EarthView { namespace World { namespace Spatial { namespace Display { } } } }
[ "yanguanqi@aliyun.com" ]
yanguanqi@aliyun.com
70f20ffee7f4bfb35fd4e5855c4c61921567f3e5
59bd2260852bf868c6832c3a30a6c317eb9b9423
/DappNetwork/DappNetwork.hpp
a89eeb79c8fcd180c279fce5fd09de1367ccb13a
[ "Apache-2.0" ]
permissive
vvvictorlee/eos-dapp-network
abda624271bad3940d4f247e7f2f984eed2e5e39
d85d22712c93c80f2dfe62b2ba2b7f148a3ba02b
refs/heads/master
2020-04-01T00:04:17.849455
2018-09-21T15:36:20
2018-09-21T15:36:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,185
hpp
#pragma once #include <eosiolib/eosio.hpp> #include <eosiolib/transaction.hpp> #include <eosiolib/types.hpp> #include <eosiolib/asset.hpp> #include <eosiolib/currency.hpp> #include <eosio.system/eosio.system.hpp> using namespace eosio; class DappNetwork : public eosio::contract { public: DappNetwork( account_name self ) :contract(self), _this_contract(self), dapps_table( self, self ) {} void apply( account_name contract, account_name act ); // @abi table struct dapp { account_name contract; string metadata; uint64_t primary_key() const { return contract; } EOSLIB_SERIALIZE( dapp, (contract)(metadata) ) }; // @abi action struct clear { }; // @abi action struct regdapp { account_name contract; string metadata; EOSLIB_SERIALIZE( regdapp, (contract)(metadata) ) }; private: account_name _this_contract; void onclear(const clear& act ); void onregdapp(const regdapp& sc ); multi_index<N(dapp), dapp> dapps_table; };
[ "tal@bancor.network" ]
tal@bancor.network
4e1037684c1f2bba3131ad6268ef1fbf8a88c006
93fa1ef02051ec33c3ae0f63d8e2b7d23d4b5ebb
/Proyecto 1.cpp
f88c1d4968430a3de675f705e4701143e00e3a76
[]
no_license
Juice930/AllesC
33b385644273896d7d9e1c5768cdb20228bc4381
fdb0bc7bfc2d5b2d6f14456ef0b5bcbd647072de
refs/heads/master
2021-01-23T14:44:40.662645
2017-11-15T06:19:38
2017-11-15T06:19:38
102,696,589
0
0
null
null
null
null
UTF-8
C++
false
false
3,989
cpp
#include <iostream> using namespace std; int tam; struct Nodo{ int len; int *arre; Nodo *sig; }; struct SuperNodo{ int len; int *arre; Nodo *sig, *bebe; }; bool vLen(SuperNodo *N,int pos){ return pos<=N->len/tam; } int *Vectoriza(SuperNodo *N,int pos){ Nodo *aux=N->bebe; for(int i=1;i<pos;i++) aux=aux->sig; return aux->arre; } int Buscar(SuperNodo *N, int loc){ Nodo *aux=N->bebe; cout<<"Buscando\t"; loc--; if (loc!=tam) for(int i=0;i<loc/tam;i++) aux=aux->sig; return aux->arre[loc%tam]; } void Mostrar(SuperNodo *N){ int j=0; Nodo *aux=N->bebe; cout<<'\n'; for(int i=0;i<tam*3-1;i++) cout<<'-'; cout<<'\n'; cout<<'|'; for(int i=0;i<N->len;i++){ cout<<aux->arre[i%tam]<<"|"; if((i+1)%tam==0 && i!=0){ aux=aux->sig; cout<<'\n'; for(int i=0;i<tam*3-1;i++) cout<<'-'; cout<<"\n|"; j++; } } cout<<'\n'; } void AgregaNum(SuperNodo *N,int n){ if(N->bebe==NULL){ Nodo *s=new Nodo; s->arre=new int[tam]; s->len=1; s->arre[0]=n; s->sig=NULL; N->sig=s; N->bebe=N->sig; } else if (N->len%tam!=0){ N->sig->arre[(N->len)%tam]=n; N->sig->len++; } else{ N->sig->sig=new Nodo; N->sig->sig->arre=new int[tam]; N->sig->sig->len=1; N->sig->sig->arre[0]=n; N->sig->sig->sig=NULL; N->sig=N->sig->sig; } N->len++; } void Busqueda(SuperNodo *Super){ int n; char op; cout<<"\nEn donde quieres buscar?\t"; cin>>n; if(n<=Super->len && n>0) cout<<"\nTu numero es "<<Buscar(Super,n)<<'\n'; else cout<<"\nNo metiste tantos numeros!!!\n"; } void Suma(SuperNodo *N){ int V1,V2; cout<<"\nQue vectores quieres sumar?\n"; cin>>V1>>V2; cout<<'\n'; if(vLen(N,V1) && vLen(N,V2)){ int *Vector1=Vectoriza(N,V1); int *Vector2=Vectoriza(N,V2); cout<<"La Suma es:\n"; for(int i=0;i<tam;i++) cout<<Vector1[i]+Vector2[i]<<" "; cout<<'\n'; } else cout<<"\nNo existen esos vectores!\n"; } void Resta(SuperNodo *N){ int V1,V2; cout<<"\nQue vectores quieres restar?\n"; cin>>V1>>V2; cout<<'\n'; if(vLen(N,V1) && vLen(N,V2)){ int *Vector1=Vectoriza(N,V1); int *Vector2=Vectoriza(N,V2); cout<<"La Resta de V1-V2 es:\n"; for(int i=0;i<tam;i++) cout<<Vector1[i]-Vector2[i]<<" "; cout<<'\n'; } else cout<<"\nNo existen esos vectores!\n"; } void Escalar(SuperNodo *N){ int V,x; cout<<"\nQue vector quieres escalar?\n"; cin>>V; fflush(stdin); if(vLen(N,V)){ cout<<"\nMultiplicar por... "; cin>>x; int *Vector1=Vectoriza(N,V); cout<<"El nuevo vector es:\n"; for(int i=0;i<tam;i++) cout<<Vector1[i]*x<<" "; cout<<'\n'; } else cout<<"\nNo existe ese vector!\n"; } void Punto(SuperNodo *N){ int V1,V2; cout<<"\nQue vectores quieres multiplicar?\n"; cin>>V1>>V2; cout<<'\n'; int total=0; if(vLen(N,V1) && vLen(N,V2)){ int *Vector1=Vectoriza(N,V1); int *Vector2=Vectoriza(N,V2); for(int i=0;i<tam;i++) total+=Vector1[i]*Vector2[i]; cout<<"El producto punto da:\t"<<total; cout<<'\n'; } else cout<<"\nNo existen esos vectores!"; } main(){ SuperNodo *Super=new SuperNodo; Super->len=0; Super->sig=NULL; Super->bebe=NULL; int n; char op; tam=-1; while(tam<1){ cout<<"De que tamano quieres tus vectores?"; cin>>tam; } while(true){ cout<<"Dame un numero...\t"; cin>>n; AgregaNum(Super,int(n)); Mostrar(Super); cout<<"Quieres agregar otro num?\t"; cin>>op; if(op=='N' || op=='n') break; } while(true){ system("cls"); cout<<"Tus numeros"; Mostrar(Super); cout<<"\nQue quieres hacer?\n1\tBuscar\n2\tSuma\n3\tResta\n4\tProducto por un escalar\n5\tProducto Punto\n6\tSalir\n"; cin>>op; switch (op){ case '1': Busqueda(Super); system("pause"); break; case '2': Suma(Super); system("pause"); break; case '3': Resta(Super); system("pause"); break; case '4': Escalar(Super); system("pause"); break; case '5': Punto(Super); system("pause"); break; case '6': exit(0); } } }
[ "artvel_0412@hotmail.com" ]
artvel_0412@hotmail.com
362944acbf1b0c8c7ef8407d249200673e80e38e
b3ec268e1b027385f87f3f4dc6b98aaf5ec3b393
/teensy3/HardwareSerial.h
5585ac17f1e8e037cf6504d9649e05b648961fae
[]
no_license
mlen/teensy-toolchain
7d696ea45cd2b8060469a38f94ff63300e292e53
c570c2589988d39cb55940bd4c8846a6787571f5
refs/heads/master
2021-01-10T06:44:14.011049
2016-01-22T11:31:50
2016-01-22T12:31:21
50,179,954
3
1
null
null
null
null
UTF-8
C++
false
false
10,296
h
/* Teensyduino Core Library * http://www.pjrc.com/teensy/ * Copyright (c) 2013 PJRC.COM, LLC. * * 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: * * 1. The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * 2. If the Software is incorporated into a build system that allows * selection among a list of target devices, then similar target * devices manufactured by PJRC.COM must be included in the list of * target devices and selectable in the same manner. * * 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. */ #ifndef HardwareSerial_h #define HardwareSerial_h #include "kinetis.h" // uncomment to enable 9 bit formats //#define SERIAL_9BIT_SUPPORT #define SERIAL_7E1 0x02 #define SERIAL_7O1 0x03 #define SERIAL_8N1 0x00 #define SERIAL_8N2 0x04 #define SERIAL_8E1 0x06 #define SERIAL_8O1 0x07 #define SERIAL_7E1_RXINV 0x12 #define SERIAL_7O1_RXINV 0x13 #define SERIAL_8N1_RXINV 0x10 #define SERIAL_8N2_RXINV 0x14 #define SERIAL_8E1_RXINV 0x16 #define SERIAL_8O1_RXINV 0x17 #define SERIAL_7E1_TXINV 0x22 #define SERIAL_7O1_TXINV 0x23 #define SERIAL_8N1_TXINV 0x20 #define SERIAL_8N2_TXINV 0x24 #define SERIAL_8E1_TXINV 0x26 #define SERIAL_8O1_TXINV 0x27 #define SERIAL_7E1_RXINV_TXINV 0x32 #define SERIAL_7O1_RXINV_TXINV 0x33 #define SERIAL_8N1_RXINV_TXINV 0x30 #define SERIAL_8N2_RXINV_TXINV 0x34 #define SERIAL_8E1_RXINV_TXINV 0x36 #define SERIAL_8O1_RXINV_TXINV 0x37 #ifdef SERIAL_9BIT_SUPPORT #define SERIAL_9N1 0x84 #define SERIAL_9E1 0x8E #define SERIAL_9O1 0x8F #define SERIAL_9N1_RXINV 0x94 #define SERIAL_9E1_RXINV 0x9E #define SERIAL_9O1_RXINV 0x9F #define SERIAL_9N1_TXINV 0xA4 #define SERIAL_9E1_TXINV 0xAE #define SERIAL_9O1_TXINV 0xAF #define SERIAL_9N1_RXINV_TXINV 0xB4 #define SERIAL_9E1_RXINV_TXINV 0xBE #define SERIAL_9O1_RXINV_TXINV 0xBF #endif // bit0: parity, 0=even, 1=odd // bit1: parity, 0=disable, 1=enable // bit2: mode, 1=9bit, 0=8bit // bit3: mode10: 1=10bit, 0=8bit // bit4: rxinv, 0=normal, 1=inverted // bit5: txinv, 0=normal, 1=inverted // bit6: unused // bit7: actual data goes into 9th bit #if defined(KINETISK) #define BAUD2DIV(baud) (((F_CPU * 2) + ((baud) >> 1)) / (baud)) #define BAUD2DIV2(baud) (((F_CPU * 2) + ((baud) >> 1)) / (baud)) #define BAUD2DIV3(baud) (((F_BUS * 2) + ((baud) >> 1)) / (baud)) #elif defined(KINETISL) #if F_CPU <= 2000000 #define BAUD2DIV(baud) (((F_PLL / 16 ) + ((baud) >> 1)) / (baud)) #elif F_CPU <= 16000000 #define BAUD2DIV(baud) (((F_PLL / (F_PLL / 1000000)) + ((baud) >> 1)) / (baud)) #else #define BAUD2DIV(baud) (((F_PLL / 2 / 16) + ((baud) >> 1)) / (baud)) #endif #define BAUD2DIV2(baud) (((F_BUS / 16) + ((baud) >> 1)) / (baud)) #define BAUD2DIV3(baud) (((F_BUS / 16) + ((baud) >> 1)) / (baud)) #endif // C language implementation // #ifdef __cplusplus extern "C" { #endif void serial_begin(uint32_t divisor); void serial_format(uint32_t format); void serial_end(void); void serial_set_transmit_pin(uint8_t pin); int serial_set_rts(uint8_t pin); int serial_set_cts(uint8_t pin); void serial_putchar(uint32_t c); void serial_write(const void *buf, unsigned int count); void serial_flush(void); int serial_write_buffer_free(void); int serial_available(void); int serial_getchar(void); int serial_peek(void); void serial_clear(void); void serial_print(const char *p); void serial_phex(uint32_t n); void serial_phex16(uint32_t n); void serial_phex32(uint32_t n); void serial2_begin(uint32_t divisor); void serial2_format(uint32_t format); void serial2_end(void); void serial2_set_transmit_pin(uint8_t pin); int serial2_set_rts(uint8_t pin); int serial2_set_cts(uint8_t pin); void serial2_putchar(uint32_t c); void serial2_write(const void *buf, unsigned int count); void serial2_flush(void); int serial2_write_buffer_free(void); int serial2_available(void); int serial2_getchar(void); int serial2_peek(void); void serial2_clear(void); void serial3_begin(uint32_t divisor); void serial3_format(uint32_t format); void serial3_end(void); void serial3_set_transmit_pin(uint8_t pin); int serial3_set_rts(uint8_t pin); int serial3_set_cts(uint8_t pin); void serial3_putchar(uint32_t c); void serial3_write(const void *buf, unsigned int count); void serial3_flush(void); int serial3_write_buffer_free(void); int serial3_available(void); int serial3_getchar(void); int serial3_peek(void); void serial3_clear(void); #ifdef __cplusplus } #endif // C++ interface // #ifdef __cplusplus #include "Stream.h" class HardwareSerial : public Stream { public: virtual void begin(uint32_t baud) { serial_begin(BAUD2DIV(baud)); } virtual void begin(uint32_t baud, uint32_t format) { serial_begin(BAUD2DIV(baud)); serial_format(format); } virtual void end(void) { serial_end(); } virtual void transmitterEnable(uint8_t pin) { serial_set_transmit_pin(pin); } virtual bool attachRts(uint8_t pin) { return serial_set_rts(pin); } virtual bool attachCts(uint8_t pin) { return serial_set_cts(pin); } virtual int available(void) { return serial_available(); } virtual int peek(void) { return serial_peek(); } virtual int read(void) { return serial_getchar(); } virtual void flush(void) { serial_flush(); } virtual void clear(void) { serial_clear(); } virtual int availableForWrite(void) { return serial_write_buffer_free(); } virtual size_t write(uint8_t c) { serial_putchar(c); return 1; } virtual size_t write(unsigned long n) { return write((uint8_t)n); } virtual size_t write(long n) { return write((uint8_t)n); } virtual size_t write(unsigned int n) { return write((uint8_t)n); } virtual size_t write(int n) { return write((uint8_t)n); } virtual size_t write(const uint8_t *buffer, size_t size) { serial_write(buffer, size); return size; } virtual size_t write(const char *str) { size_t len = strlen(str); serial_write((const uint8_t *)str, len); return len; } virtual size_t write9bit(uint32_t c) { serial_putchar(c); return 1; } operator bool() { return true; } }; extern HardwareSerial Serial1; extern void serialEvent1(void); class HardwareSerial2 : public HardwareSerial { public: virtual void begin(uint32_t baud) { serial2_begin(BAUD2DIV2(baud)); } virtual void begin(uint32_t baud, uint32_t format) { serial2_begin(BAUD2DIV(baud)); serial2_format(format); } virtual void end(void) { serial2_end(); } virtual void transmitterEnable(uint8_t pin) { serial2_set_transmit_pin(pin); } virtual bool attachRts(uint8_t pin) { return serial2_set_rts(pin); } virtual bool attachCts(uint8_t pin) { return serial2_set_cts(pin); } virtual int available(void) { return serial2_available(); } virtual int peek(void) { return serial2_peek(); } virtual int read(void) { return serial2_getchar(); } virtual void flush(void) { serial2_flush(); } virtual void clear(void) { serial2_clear(); } virtual int availableForWrite(void) { return serial2_write_buffer_free(); } virtual size_t write(uint8_t c) { serial2_putchar(c); return 1; } virtual size_t write(unsigned long n) { return write((uint8_t)n); } virtual size_t write(long n) { return write((uint8_t)n); } virtual size_t write(unsigned int n) { return write((uint8_t)n); } virtual size_t write(int n) { return write((uint8_t)n); } virtual size_t write(const uint8_t *buffer, size_t size) { serial2_write(buffer, size); return size; } virtual size_t write(const char *str) { size_t len = strlen(str); serial2_write((const uint8_t *)str, len); return len; } virtual size_t write9bit(uint32_t c) { serial2_putchar(c); return 1; } operator bool() { return true; } }; extern HardwareSerial2 Serial2; extern void serialEvent2(void); class HardwareSerial3 : public HardwareSerial { public: virtual void begin(uint32_t baud) { serial3_begin(BAUD2DIV3(baud)); } virtual void begin(uint32_t baud, uint32_t format) { serial3_begin(BAUD2DIV3(baud)); serial3_format(format); } virtual void end(void) { serial3_end(); } virtual void transmitterEnable(uint8_t pin) { serial3_set_transmit_pin(pin); } virtual bool attachRts(uint8_t pin) { return serial3_set_rts(pin); } virtual bool attachCts(uint8_t pin) { return serial3_set_cts(pin); } virtual int available(void) { return serial3_available(); } virtual int peek(void) { return serial3_peek(); } virtual int read(void) { return serial3_getchar(); } virtual void flush(void) { serial3_flush(); } virtual void clear(void) { serial3_clear(); } virtual int availableForWrite(void) { return serial3_write_buffer_free(); } virtual size_t write(uint8_t c) { serial3_putchar(c); return 1; } virtual size_t write(unsigned long n) { return write((uint8_t)n); } virtual size_t write(long n) { return write((uint8_t)n); } virtual size_t write(unsigned int n) { return write((uint8_t)n); } virtual size_t write(int n) { return write((uint8_t)n); } virtual size_t write(const uint8_t *buffer, size_t size) { serial3_write(buffer, size); return size; } virtual size_t write(const char *str) { size_t len = strlen(str); serial3_write((const uint8_t *)str, len); return len; } virtual size_t write9bit(uint32_t c) { serial3_putchar(c); return 1; } operator bool() { return true; } }; extern HardwareSerial3 Serial3; extern void serialEvent3(void); #endif #endif
[ "mlen@mlen.pl" ]
mlen@mlen.pl
993122528806bd29a10c9b75b8d66c606edb4e84
e852ce5ff85d17208001ff90f46daf6981716df5
/src/m3.cpp
f86e3b0cb05d143cd54916f636af3c1c7c3d0a90
[]
no_license
makssobolevs/hep
0de674aa8921e619a6b0522bee8f041ce7e283fa
7261b754dd679b9066ef4872403e4ddb743f892e
refs/heads/master
2021-01-01T05:43:59.983241
2016-04-27T09:13:01
2016-04-27T09:13:01
57,136,364
0
0
null
null
null
null
UTF-8
C++
false
false
232,594
cpp
#include "m3.h" double m3_1(double s, double s1, double s2, double t1) { return ((14*pow(m,10)*mz*mz + (83*pow(m,8)*pow(mz,4))/2 + 28*pow(m,6)*pow(mz,6) + pow(m,4)*pow(mz,8) - 37*pow(m,8)*mz*mz*s - 70*pow(m,6)*pow(mz,4)*s - 12*pow(m,4)*pow(mz,6)*s + m*m*pow(mz,8)*s - (7*pow(m,8)*s*s)/2 + 32*pow(m,6)*mz*mz*s*s + (47*pow(m,4)*pow(mz,4)*s*s)/2 - 2*m*m*pow(mz,6)*s*s + 7*pow(m,6)*pow(s,3) - 9*pow(m,4)*mz*mz*pow(s,3) - 3*m*m*pow(mz,4)*pow(s,3) - (7*pow(m,4)*pow(s,4))/2 + 4*m*m*mz*mz*pow(s,4) + pow(m,8)*mz*mz*s1 - 7*pow(m,6)*pow(mz,4)*s1 - 14*pow(m,4)*pow(mz,6)*s1 + m*m*pow(mz,8)*s1 + 7*pow(m,8)*s*s1 + 37*pow(m,4)*pow(mz,4)*s*s1 + 2*m*m*pow(mz,6)*s*s1 + pow(mz,8)*s*s1 - 12*pow(m,6)*s*s*s1 - 13*pow(m,4)*mz*mz*s*s*s1 - 7*m*m*pow(mz,4)*s*s*s1 + 3*pow(m,4)*pow(s,3)*s1 - 2*m*m*mz*mz*pow(s,3)*s1 + pow(mz,4)*pow(s,3)*s1 + 2*m*m*pow(s,4)*s1 - 2*mz*mz*pow(s,4)*s1 - (7*pow(m,8)*s1*s1)/2 - (25*pow(m,4)*pow(mz,4)*s1*s1)/2 + 4*m*m*pow(mz,6)*s1*s1 + 3*pow(m,6)*s*s1*s1 + 19*pow(m,4)*mz*mz*s*s1*s1 - 11*m*m*pow(mz,4)*s*s1*s1 + 2*pow(mz,6)*s*s1*s1 + 4*pow(m,4)*s*s*s1*s1 + 2*m*m*mz*mz*s*s*s1*s1 - (pow(mz,4)*s*s*s1*s1)/2 - 3*m*m*pow(s,3)*s1*s1 + 3*mz*mz*pow(s,3)*s1*s1 - (pow(s,4)*s1*s1)/2 + 2*pow(m,6)*pow(s1,3) - 9*pow(m,4)*mz*mz*pow(s1,3) + 6*m*m*pow(mz,4)*pow(s1,3) - 3*pow(m,4)*s*pow(s1,3) - 6*m*m*mz*mz*s*pow(s1,3) + 2*pow(mz,4)*s*pow(s1,3) - mz*mz*s*s*pow(s1,3) + pow(s,3)*pow(s1,3) - (pow(m,4)*pow(s1,4))/2 + 4*m*m*mz*mz*pow(s1,4) + m*m*s*pow(s1,4) - (s*s*pow(s1,4))/2 + 6*pow(m,8)*mz*mz*s2 + 14*pow(m,6)*pow(mz,4)*s2 + 9*pow(m,4)*pow(mz,6)*s2 - m*m*pow(mz,8)*s2 - 4*pow(m,6)*mz*mz*s*s2 - 21*pow(m,4)*pow(mz,4)*s*s2 + m*m*pow(mz,6)*s*s2 - 7*pow(m,6)*s*s*s2 + 5*pow(m,4)*mz*mz*s*s*s2 + 7*m*m*pow(mz,4)*s*s*s2 + 7*pow(m,4)*pow(s,3)*s2 - 7*m*m*mz*mz*pow(s,3)*s2 - 10*pow(m,6)*mz*mz*s1*s2 - 7*pow(m,4)*pow(mz,4)*s1*s2 - 3*m*m*pow(mz,6)*s1*s2 - pow(mz,8)*s1*s2 + 14*pow(m,6)*s*s1*s2 + 6*m*m*pow(mz,4)*s*s1*s2 - pow(mz,6)*s*s1*s2 - 10*pow(m,4)*s*s*s1*s2 + 7*m*m*mz*mz*s*s*s1*s2 - pow(mz,4)*s*s*s1*s2 - 4*m*m*pow(s,3)*s1*s2 + 3*mz*mz*pow(s,3)*s1*s2 - 7*pow(m,6)*s1*s1*s2 + 5*pow(m,4)*mz*mz*s1*s1*s2 + 5*m*m*pow(mz,4)*s1*s1*s2 - 2*pow(mz,6)*s1*s1*s2 - pow(m,4)*s*s1*s1*s2 - m*m*mz*mz*s*s1*s1*s2 - pow(mz,4)*s*s1*s1*s2 + 7*m*m*s*s*s1*s1*s2 - 4*mz*mz*s*s*s1*s1*s2 + pow(s,3)*s1*s1*s2 + 4*pow(m,4)*pow(s1,3)*s2 - m*m*mz*mz*pow(s1,3)*s2 - 2*pow(mz,4)*pow(s1,3)*s2 - 2*m*m*s*pow(s1,3)*s2 + mz*mz*s*pow(s1,3)*s2 - 2*s*s*pow(s1,3)*s2 - m*m*pow(s1,4)*s2 + s*pow(s1,4)*s2 - (3*pow(m,4)*pow(mz,4)*s2*s2)/2 + m*m*pow(mz,6)*s2*s2 + 5*pow(m,4)*mz*mz*s*s2*s2 - 4*m*m*pow(mz,4)*s*s2*s2 - (7*pow(m,4)*s*s*s2*s2)/2 + 3*m*m*mz*mz*s*s*s2*s2 - 5*pow(m,4)*mz*mz*s1*s2*s2 + 2*m*m*pow(mz,4)*s1*s2*s2 + pow(mz,6)*s1*s2*s2 + 7*pow(m,4)*s*s1*s2*s2 - 6*m*m*mz*mz*s*s1*s2*s2 + 2*m*m*s*s*s1*s2*s2 - mz*mz*s*s*s1*s2*s2 - (7*pow(m,4)*s1*s1*s2*s2)/2 + 3*m*m*mz*mz*s1*s1*s2*s2 + (3*pow(mz,4)*s1*s1*s2*s2)/2 - 4*m*m*s*s1*s1*s2*s2 + mz*mz*s*s1*s1*s2*s2 - (s*s*s1*s1*s2*s2)/2 + 2*m*m*pow(s1,3)*s2*s2 + s*pow(s1,3)*s2*s2 - (pow(s1,4)*s2*s2)/2 - 34*pow(m,8)*mz*mz*t1 - (149*pow(m,6)*pow(mz,4)*t1)/2 - 27*pow(m,4)*pow(mz,6)*t1 + 2*m*m*pow(mz,8)*t1 + 61*pow(m,6)*mz*mz*s*t1 + 80*pow(m,4)*pow(mz,4)*s*t1 - m*m*pow(mz,6)*s*t1 + pow(mz,8)*s*t1 + (17*pow(m,6)*s*s*t1)/2 - 37*pow(m,4)*mz*mz*s*s*t1 - (29*m*m*pow(mz,4)*s*s*t1)/2 - 10*pow(m,4)*pow(s,3)*t1 + 12*m*m*mz*mz*pow(s,3)*t1 + pow(mz,4)*pow(s,3)*t1 + (3*m*m*pow(s,4)*t1)/2 - 2*mz*mz*pow(s,4)*t1 - 3*pow(m,6)*mz*mz*s1*t1 + (17*pow(m,4)*pow(mz,4)*s1*t1)/2 + 11*m*m*pow(mz,6)*s1*t1 + pow(mz,8)*s1*t1 - 17*pow(m,6)*s*s1*t1 + 13*pow(m,4)*mz*mz*s*s1*t1 - 31*m*m*pow(mz,4)*s*s1*t1 + 3*pow(mz,6)*s*s1*t1 + (31*pow(m,4)*s*s*s1*t1)/2 - 2*m*m*mz*mz*s*s*s1*t1 + (pow(mz,4)*s*s*s1*t1)/2 + 2*m*m*pow(s,3)*s1*t1 - (pow(s,4)*s1*t1)/2 + (17*pow(m,6)*s1*s1*t1)/2 - 6*pow(m,4)*mz*mz*s1*s1*t1 + 8*m*m*pow(mz,4)*s1*s1*t1 + 2*pow(mz,6)*s1*s1*t1 - pow(m,4)*s*s1*s1*t1 - 13*m*m*mz*mz*s*s1*s1*t1 + 4*pow(mz,4)*s*s1*s1*t1 - (15*m*m*s*s*s1*s1*t1)/2 + 3*mz*mz*s*s*s1*s1*t1 - (9*pow(m,4)*pow(s1,3)*t1)/2 + 9*m*m*mz*mz*pow(s1,3)*t1 + 2*pow(mz,4)*pow(s1,3)*t1 + 3*m*m*s*pow(s1,3)*t1 - mz*mz*s*pow(s1,3)*t1 + (3*s*s*pow(s1,3)*t1)/2 + m*m*pow(s1,4)*t1 - s*pow(s1,4)*t1 - 12*pow(m,6)*mz*mz*s2*t1 - 24*pow(m,4)*pow(mz,4)*s2*t1 - 3*m*m*pow(mz,6)*s2*t1 - pow(mz,8)*s2*t1 + 8*pow(m,4)*mz*mz*s*s2*t1 + 17*m*m*pow(mz,4)*s*s2*t1 - pow(mz,6)*s*s2*t1 + 10*pow(m,4)*s*s*s2*t1 - 11*m*m*mz*mz*s*s*s2*t1 - pow(mz,4)*s*s*s2*t1 - 3*m*m*pow(s,3)*s2*t1 + 3*mz*mz*pow(s,3)*s2*t1 + 8*pow(m,4)*mz*mz*s1*s2*t1 + 11*m*m*pow(mz,4)*s1*s2*t1 - 4*pow(mz,6)*s1*s2*t1 - 20*pow(m,4)*s*s1*s2*t1 + 10*m*m*mz*mz*s*s1*s2*t1 - pow(mz,4)*s*s1*s2*t1 + m*m*s*s*s1*s2*t1 - 2*mz*mz*s*s*s1*s2*t1 + pow(s,3)*s1*s2*t1 + 10*pow(m,4)*s1*s1*s2*t1 - 3*m*m*mz*mz*s1*s1*s2*t1 - 6*pow(mz,4)*s1*s1*s2*t1 + 7*m*m*s*s1*s1*s2*t1 - mz*mz*s*s1*s1*s2*t1 - s*s*s1*s1*s2*t1 - 5*m*m*pow(s1,3)*s2*t1 - s*pow(s1,3)*s2*t1 + pow(s1,4)*s2*t1 - (m*m*pow(mz,4)*s2*s2*t1)/2 + pow(mz,6)*s2*s2*t1 - m*m*mz*mz*s*s2*s2*t1 + (3*m*m*s*s*s2*s2*t1)/2 - mz*mz*s*s*s2*s2*t1 + m*m*mz*mz*s1*s2*s2*t1 + (3*pow(mz,4)*s1*s2*s2*t1)/2 - 3*m*m*s*s1*s2*s2*t1 + mz*mz*s*s1*s2*s2*t1 - (s*s*s1*s2*s2*t1)/2 + (3*m*m*s1*s1*s2*s2*t1)/2 + s*s1*s1*s2*s2*t1 - (pow(s1,3)*s2*s2*t1)/2 + 26*pow(m,6)*mz*mz*t1*t1 + (81*pow(m,4)*pow(mz,4)*t1*t1)/2 + 6*m*m*pow(mz,6)*t1*t1 + pow(mz,8)*t1*t1 - 27*pow(m,4)*mz*mz*s*t1*t1 - 26*m*m*pow(mz,4)*s*t1*t1 + pow(mz,6)*s*t1*t1 - (13*pow(m,4)*s*s*t1*t1)/2 + 14*m*m*mz*mz*s*s*t1*t1 + pow(mz,4)*s*s*t1*t1 + 3*m*m*pow(s,3)*t1*t1 - 3*mz*mz*pow(s,3)*t1*t1 + 3*pow(m,4)*mz*mz*s1*t1*t1 - 4*m*m*pow(mz,4)*s1*t1*t1 + 3*pow(mz,6)*s1*t1*t1 + 13*pow(m,4)*s*s1*t1*t1 - 14*m*m*mz*mz*s*s1*t1*t1 + 2*pow(mz,4)*s*s1*t1*t1 - 3*m*m*s*s*s1*t1*t1 + 3*mz*mz*s*s*s1*t1*t1 - pow(s,3)*s1*t1*t1 - (13*pow(m,4)*s1*s1*t1*t1)/2 + 6*m*m*mz*mz*s1*s1*t1*t1 + (9*pow(mz,4)*s1*s1*t1*t1)/2 - 3*m*m*s*s1*s1*t1*t1 + (3*s*s*s1*s1*t1*t1)/2 + 3*m*m*pow(s1,3)*t1*t1 - (pow(s1,4)*t1*t1)/2 + 6*pow(m,4)*mz*mz*s2*t1*t1 + 10*m*m*pow(mz,4)*s2*t1*t1 - 2*pow(mz,6)*s2*t1*t1 - 4*m*m*mz*mz*s*s2*t1*t1 - 3*m*m*s*s*s2*t1*t1 + 2*mz*mz*s*s*s2*t1*t1 + 2*m*m*mz*mz*s1*s2*t1*t1 - 4*pow(mz,4)*s1*s2*t1*t1 + 6*m*m*s*s1*s2*t1*t1 - 2*mz*mz*s*s1*s2*t1*t1 + s*s*s1*s2*t1*t1 - 3*m*m*s1*s1*s2*t1*t1 - 2*s*s1*s1*s2*t1*t1 + pow(s1,3)*s2*t1*t1 - 6*pow(m,4)*mz*mz*pow(t1,3) - (15*m*m*pow(mz,4)*pow(t1,3))/2 + pow(mz,6)*pow(t1,3) + 3*m*m*mz*mz*s*pow(t1,3) + (3*m*m*s*s*pow(t1,3))/2 - mz*mz*s*s*pow(t1,3) - m*m*mz*mz*s1*pow(t1,3) + (5*pow(mz,4)*s1*pow(t1,3))/2 - 3*m*m*s*s1*pow(t1,3) + mz*mz*s*s1*pow(t1,3) - (s*s*s1*pow(t1,3))/2 + (3*m*m*s1*s1*pow(t1,3))/2 + s*s1*s1*pow(t1,3) - (pow(s1,3)*pow(t1,3))/2)*(-((sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))*(c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1) + 2*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1) + (x1(s1,t1) - x2(s,s1))*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + (x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1))*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))/((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*(t2plus(s2,t1) + x1(s1,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(t2plus(s2,t1) - x2(s,s1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2plus(s2,t1) + x1(s1,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2plus(s2,t1) + x2(s,s1) + (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) - 2*a(s,s2)*x1(s1,t1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*a(s,s2)*x2(s,s1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5))))/(mz*mz*pow((m*m - s + s2 - t1),2)); } double m3_2(double s, double s1, double s2, double t1) { return ((2*m*m*mz*mz + 2*mz*mz*s - 2*mz*mz*s2 + 2*mz*mz*t1)*(((-(pow(x1(s1,t1),4)/((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2plus(s2,t1) + x1(s1,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))) - pow(x2(s,s1),4)/((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*(t2plus(s2,t1) - x2(s,s1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))/pow((x1(s1,t1) + x2(s,s1)),2) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2plus(s2,t1) + x1(s1,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2plus(s2,t1) + x2(s,s1) + ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))))/sqrt(a(s,s2)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) - 2*a(s,s2)*x1(s1,t1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*a(s,s2)*x2(s,s1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(-(pow(x1(s1,t1),4)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))) - pow(x2(s,s1),4)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + log(std::abs(b(s,s1,s2,t1) + 2*a(s,s2)*t2minus(s2,t1) + 2*sqrt(a(s,s2))*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))))/sqrt(a(s,s2)) - (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x1(s1,t1),3)*(4*c(s,s1,s2,t1)*(x1(s1,t1) + 2*x2(s,s1)) + x1(s1,t1)*(2*a(s,s2)*x1(s1,t1)*(x1(s1,t1) + 3*x2(s,s1)) - b(s,s1,s2,t1)*(3*x1(s1,t1) + 7*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (pow(x2(s,s1),3)*(4*c(s,s1,s2,t1)*(2*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(2*a(s,s2)*x2(s,s1)*(3*x1(s1,t1) + x2(s,s1)) + b(s,s1,s2,t1)*(7*x1(s1,t1) + 3*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5))))/(mz*mz*pow((m*m - s + s2 - t1),2)); } double m3_3(double s, double s1, double s2, double t1) { return (-2*(-((sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))*(c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1) + 2*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1) + (x1(s1,t1) - x2(s,s1))*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + (x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1))*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))/((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*(t2plus(s2,t1) + x1(s1,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(t2plus(s2,t1) - x2(s,s1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2plus(s2,t1) + x1(s1,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2plus(s2,t1) + x2(s,s1) + (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) - 2*a(s,s2)*x1(s1,t1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*a(s,s2)*x2(s,s1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(c(s,s1,s2,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1)) - b(s,s1,s2,t1)*(x1(s1,t1)*x1(s1,t1) + t2minus(s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*x2(s,s1)) + a(s,s2)*(pow(x1(s1,t1),3) - pow(x2(s,s1),3) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x1(s1,t1)*(3*x1(s1,t1) + x2(s,s1)) - b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((4*c(s,s1,s2,t1) + 2*a(s,s2)*x2(s,s1)*(x1(s1,t1) + 3*x2(s,s1)) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1)))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5))))/(mz*mz*pow((m*m - s + s2 - t1),2)); } double m3_4(double s, double s1, double s2, double t1) { return ((-3*pow(m,8)*mz*mz + (13*pow(m,6)*pow(mz,4))/2 + 15*pow(m,4)*pow(mz,6) - m*m*pow(mz,8) - 7*pow(m,8)*s + 2*pow(m,6)*mz*mz*s - 38*pow(m,4)*pow(mz,4)*s - 3*m*m*pow(mz,6)*s - pow(mz,8)*s + (23*pow(m,6)*s*s)/2 + 13*pow(m,4)*mz*mz*s*s + (17*m*m*pow(mz,4)*s*s)/2 - 2*pow(m,4)*pow(s,3) + 2*m*m*mz*mz*pow(s,3) - pow(mz,4)*pow(s,3) - (5*m*m*pow(s,4))/2 + 2*mz*mz*pow(s,4) + 7*pow(m,8)*s1 + 4*pow(m,6)*mz*mz*s1 + (53*pow(m,4)*pow(mz,4)*s1)/2 - 7*m*m*pow(mz,6)*s1 - 5*pow(m,6)*s*s1 - 40*pow(m,4)*mz*mz*s*s1 + 19*m*m*pow(mz,4)*s*s1 - 5*pow(mz,6)*s*s1 - (21*pow(m,4)*s*s*s1)/2 - 6*m*m*mz*mz*s*s*s1 + (5*pow(mz,4)*s*s*s1)/2 + 8*m*m*pow(s,3)*s1 - 6*mz*mz*pow(s,3)*s1 + (pow(s,4)*s1)/2 - (13*pow(m,6)*s1*s1)/2 + 23*pow(m,4)*mz*mz*s1*s1 - 16*m*m*pow(mz,4)*s1*s1 + 11*pow(m,4)*s*s1*s1 + 20*m*m*mz*mz*s*s1*s1 - 8*pow(mz,4)*s*s1*s1 - (5*m*m*s*s*s1*s1)/2 + 5*mz*mz*s*s*s1*s1 - 2*pow(s,3)*s1*s1 + (3*pow(m,4)*pow(s1,3))/2 - 14*m*m*mz*mz*pow(s1,3) - 3*m*m*s*pow(s1,3) - 2*mz*mz*s*pow(s1,3) + (3*s*s*pow(s1,3))/2 + 8*pow(m,6)*mz*mz*s2 + 6*pow(m,4)*pow(mz,4)*s2 + 4*m*m*pow(mz,6)*s2 + pow(mz,8)*s2 - 14*pow(m,6)*s*s2 + pow(m,4)*mz*mz*s*s2 - 7*m*m*pow(mz,4)*s*s2 + pow(mz,6)*s*s2 + 9*pow(m,4)*s*s*s2 - 8*m*m*mz*mz*s*s*s2 + pow(mz,4)*s*s*s2 + 5*m*m*pow(s,3)*s2 - 3*mz*mz*pow(s,3)*s2 + 14*pow(m,6)*s1*s2 - 7*pow(m,4)*mz*mz*s1*s2 - 9*m*m*pow(mz,4)*s1*s2 + 5*pow(mz,6)*s1*s2 + 4*pow(m,4)*s*s1*s2 + 6*m*m*mz*mz*s*s1*s2 + pow(mz,4)*s*s1*s2 - 17*m*m*s*s*s1*s2 + 7*mz*mz*s*s*s1*s2 - pow(s,3)*s1*s2 - 13*pow(m,4)*s1*s1*s2 - 2*m*m*mz*mz*s1*s1*s2 + 8*pow(mz,4)*s1*s1*s2 + 9*m*m*s*s1*s1*s2 - 4*mz*mz*s*s1*s1*s2 + 4*s*s*s1*s1*s2 + 3*m*m*pow(s1,3)*s2 + 2*mz*mz*pow(s1,3)*s2 - 3*s*pow(s1,3)*s2 + 5*pow(m,4)*mz*mz*s2*s2 - (5*m*m*pow(mz,4)*s2*s2)/2 - pow(mz,6)*s2*s2 - 7*pow(m,4)*s*s2*s2 + 7*m*m*mz*mz*s*s2*s2 - (5*m*m*s*s*s2*s2)/2 + mz*mz*s*s*s2*s2 + 7*pow(m,4)*s1*s2*s2 - 7*m*m*mz*mz*s1*s2*s2 - (7*pow(mz,4)*s1*s2*s2)/2 + 9*m*m*s*s1*s2*s2 - mz*mz*s*s1*s2*s2 + (s*s*s1*s2*s2)/2 - (13*m*m*s1*s1*s2*s2)/2 - mz*mz*s1*s1*s2*s2 - 2*s*s1*s1*s2*s2 + (3*pow(s1,3)*s2*s2)/2 + 9*pow(m,6)*mz*mz*t1 - 8*pow(m,4)*pow(mz,4)*t1 - 11*m*m*pow(mz,6)*t1 - pow(mz,8)*t1 + 17*pow(m,6)*s*t1 - 15*pow(m,4)*mz*mz*s*t1 + 31*m*m*pow(mz,4)*s*t1 - 4*pow(mz,6)*s*t1 - 15*pow(m,4)*s*s*t1 + pow(mz,4)*s*s*t1 - 2*m*m*pow(s,3)*t1 - 17*pow(m,6)*s1*t1 + 2*pow(m,4)*mz*mz*s1*t1 - 15*m*m*pow(mz,4)*s1*t1 - 5*pow(mz,6)*s1*t1 + pow(m,4)*s*s1*t1 + 26*m*m*mz*mz*s*s1*t1 - 9*pow(mz,4)*s*s1*t1 + 16*m*m*s*s*s1*t1 - 2*mz*mz*s*s*s1*t1 + 14*pow(m,4)*s1*s1*t1 - 19*m*m*mz*mz*s1*s1*t1 - 8*pow(mz,4)*s1*s1*t1 - 11*m*m*s*s1*s1*t1 + mz*mz*s*s1*s1*t1 - 3*s*s*s1*s1*t1 - 3*m*m*pow(s1,3)*t1 - 2*mz*mz*pow(s1,3)*t1 + 3*s*pow(s1,3)*t1 - 4*pow(m,4)*mz*mz*s2*t1 - 11*m*m*pow(mz,4)*s2*t1 + 5*pow(mz,6)*s2*t1 + 20*pow(m,4)*s*s2*t1 - 8*m*m*mz*mz*s*s2*t1 - m*m*s*s*s2*t1 + mz*mz*s*s*s2*t1 - 20*pow(m,4)*s1*s2*t1 + 15*pow(mz,4)*s1*s2*t1 - 14*m*m*s*s1*s2*t1 - 2*mz*mz*s*s1*s2*t1 + s*s*s1*s2*t1 + 15*m*m*s1*s1*s2*t1 + 5*mz*mz*s1*s1*s2*t1 + 2*s*s1*s1*s2*t1 - 3*pow(s1,3)*s2*t1 - m*m*mz*mz*s2*s2*t1 - 2*pow(mz,4)*s2*s2*t1 + 3*m*m*s*s2*s2*t1 - 3*m*m*s1*s2*s2*t1 - mz*mz*s1*s2*s2*t1 - s*s1*s2*s2*t1 + s1*s1*s2*s2*t1 - 9*pow(m,4)*mz*mz*t1*t1 + (9*m*m*pow(mz,4)*t1*t1)/2 - 4*pow(mz,6)*t1*t1 - 13*pow(m,4)*s*t1*t1 + 12*m*m*mz*mz*s*t1*t1 - pow(mz,4)*s*t1*t1 + (7*m*m*s*s*t1*t1)/2 - mz*mz*s*s*t1*t1 + 13*pow(m,4)*s1*t1*t1 - 4*m*m*mz*mz*s1*t1*t1 - (23*pow(mz,4)*s1*t1*t1)/2 + 5*m*m*s*s1*t1*t1 + 2*mz*mz*s*s1*t1*t1 - (3*s*s*s1*t1*t1)/2 - (17*m*m*s1*s1*t1*t1)/2 - 4*mz*mz*s1*s1*t1*t1 + (3*pow(s1,3)*t1*t1)/2 - 4*m*m*mz*mz*s2*t1*t1 + 5*pow(mz,4)*s2*t1*t1 - 6*m*m*s*s2*t1*t1 - mz*mz*s*s2*t1*t1 + 6*m*m*s1*s2*t1*t1 + 3*mz*mz*s1*s2*t1*t1 + 2*s*s1*s2*t1*t1 - 2*s1*s1*s2*t1*t1 + 3*m*m*mz*mz*pow(t1,3) - 3*pow(mz,4)*pow(t1,3) + 3*m*m*s*pow(t1,3) + mz*mz*s*pow(t1,3) - 3*m*m*s1*pow(t1,3) - 2*mz*mz*s1*pow(t1,3) - s*s1*pow(t1,3) + s1*s1*pow(t1,3))*(((x1(s1,t1)/((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2plus(s2,t1) + x1(s1,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))) - x2(s,s1)/((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*(t2plus(s2,t1) - x2(s,s1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2plus(s2,t1) + x1(s1,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2plus(s2,t1) + x2(s,s1) + ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) - 2*a(s,s2)*x1(s1,t1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*a(s,s2)*x2(s,s1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - x2(s,s1)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) - ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + ((2*c(s,s1,s2,t1)*(x1(s1,t1) - x2(s,s1)) + x2(s,s1)*(b(s,s1,s2,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 4*a(s,s2)*x2(s,s1)*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + ((-2*c(s,s1,s2,t1)*x1(s1,t1) + 2*c(s,s1,s2,t1)*x2(s,s1) - b(s,s1,s2,t1)*x1(s1,t1)*x2(s,s1) + 3*b(s,s1,s2,t1)*x2(s,s1)*x2(s,s1) + 4*a(s,s2)*pow(x2(s,s1),3))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5))))/(mz*mz*pow((m*m - s + s2 - t1),2)); } double m3_5(double s, double s1, double s2, double t1) { return (((-7*pow(m,8))/2 - 4*pow(m,6)*mz*mz - 14*pow(m,4)*pow(mz,4) + 3*m*m*pow(mz,6) + 2*pow(m,6)*s + 21*pow(m,4)*mz*mz*s - 8*m*m*pow(mz,4)*s + 3*pow(mz,6)*s + (13*pow(m,4)*s*s)/2 + 4*m*m*mz*mz*s*s - 2*pow(mz,4)*s*s - 5*m*m*pow(s,3) + 3*mz*mz*pow(s,3) + 7*pow(m,6)*s1 - 19*pow(m,4)*mz*mz*s1 + 14*m*m*pow(mz,4)*s1 - 13*pow(m,4)*s*s1 - 22*m*m*mz*mz*s*s1 + 10*pow(mz,4)*s*s1 + 5*m*m*s*s*s1 - 7*mz*mz*s*s*s1 + pow(s,3)*s1 - (3*pow(m,4)*s1*s1)/2 + 18*m*m*mz*mz*s1*s1 + 3*m*m*s*s1*s1 + 6*mz*mz*s*s1*s1 - (3*s*s*s1*s1)/2 - 7*pow(m,6)*s2 + 2*pow(m,4)*mz*mz*s2 + 4*m*m*pow(mz,4)*s2 - 3*pow(mz,6)*s2 - 3*pow(m,4)*s*s2 - 5*m*m*mz*mz*s*s2 + 10*m*m*s*s*s2 - 3*mz*mz*s*s*s2 + 14*pow(m,4)*s1*s2 + 7*m*m*mz*mz*s1*s2 - 10*pow(mz,4)*s1*s2 - 12*m*m*s*s1*s2 + 5*mz*mz*s*s1*s2 - 2*s*s*s1*s2 - 3*m*m*s1*s1*s2 - 6*mz*mz*s1*s1*s2 + 3*s*s1*s1*s2 - (7*pow(m,4)*s2*s2)/2 + 4*m*m*mz*mz*s2*s2 + 2*pow(mz,4)*s2*s2 - 5*m*m*s*s2*s2 + 7*m*m*s1*s2*s2 + 2*mz*mz*s1*s2*s2 + s*s1*s2*s2 - (3*s1*s1*s2*s2)/2 + (17*pow(m,6)*t1)/2 + 4*pow(m,4)*mz*mz*t1 + 7*m*m*pow(mz,4)*t1 + 3*pow(mz,6)*t1 - 13*m*m*mz*mz*s*t1 + 5*pow(mz,4)*s*t1 - (17*m*m*s*s*t1)/2 - mz*mz*s*s*t1 - (29*pow(m,4)*s1*t1)/2 + 11*m*m*mz*mz*s1*t1 + 10*pow(mz,4)*s1*t1 + 13*m*m*s*s1*t1 + mz*mz*s*s1*t1 + (3*s*s*s1*t1)/2 + 3*m*m*s1*s1*t1 + 6*mz*mz*s1*s1*t1 - 3*s*s1*s1*t1 + 10*pow(m,4)*s2*t1 + 3*m*m*mz*mz*s2*t1 - 9*pow(mz,4)*s2*t1 + 7*m*m*s*s2*t1 + 3*mz*mz*s*s2*t1 - 15*m*m*s1*s2*t1 - 10*mz*mz*s1*s2*t1 - s*s1*s2*t1 + 3*s1*s1*s2*t1 + (3*m*m*s2*s2*t1)/2 + mz*mz*s2*s2*t1 - (s1*s2*s2*t1)/2 - (13*pow(m,4)*t1*t1)/2 - 2*m*m*mz*mz*t1*t1 + 7*pow(mz,4)*t1*t1 - 2*m*m*s*t1*t1 - 2*mz*mz*s*t1*t1 + 8*m*m*s1*t1*t1 + 8*mz*mz*s1*t1*t1 - (3*s1*s1*t1*t1)/2 - 3*m*m*s2*t1*t1 - 3*mz*mz*s2*t1*t1 + s1*s2*t1*t1 + (3*m*m*pow(t1,3))/2 + 2*mz*mz*pow(t1,3) - (s1*pow(t1,3))/2)*(-((sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))*(c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + (x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1))*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))) + x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*x2(s,s1)*(x1(s1,t1) - x2(s,s1) + 2*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))) + b(s,s1,s2,t1)*(-2*x1(s1,t1)*x2(s,s1) + x1(s1,t1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) - x2(s,s1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))))/((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*(t2plus(s2,t1) + x1(s1,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(t2plus(s2,t1) - x2(s,s1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2plus(s2,t1) + x1(s1,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2plus(s2,t1) + x2(s,s1) + (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) - 2*a(s,s2)*x1(s1,t1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*a(s,s2)*x2(s,s1)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - (-((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(x1(s1,t1)*x2(s,s1)*(a(s,s2)*x1(s1,t1)*(2*t2minus(s2,t1) + x1(s1,t1) - x2(s,s1))*x2(s,s1) + b(s,s1,s2,t1)*(t2minus(s2,t1)*x1(s1,t1) - t2minus(s2,t1)*x2(s,s1) - 2*x1(s1,t1)*x2(s,s1))) + c(s,s1,s2,t1)*(x1(s1,t1)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1)) + t2minus(s2,t1)*(x1(s1,t1)*x1(s1,t1) + x2(s,s1)*x2(s,s1)))))/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2minus(s2,t1) - x2(s,s1))*pow((x1(s1,t1) + x2(s,s1)),2)*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))) + (x1(s1,t1)*(-(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1))) + 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) - 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*(b(s,s1,s2,t1)*x1(s1,t1)*(x1(s1,t1) - 3*x2(s,s1)) - 2*a(s,s2)*x1(s1,t1)*x1(s1,t1)*(x1(s1,t1) - x2(s,s1)) + 4*c(s,s1,s2,t1)*x2(s,s1))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*(4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(3*x1(s1,t1) - x2(s,s1)) + 2*a(s,s2)*(x1(s1,t1) - x2(s,s1))*x2(s,s1)))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x2(s,s1)*(-4*c(s,s1,s2,t1)*x1(s1,t1) + x2(s,s1)*(b(s,s1,s2,t1)*(-3*x1(s1,t1) + x2(s,s1)) + 2*a(s,s2)*x2(s,s1)*(-x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5))))/(mz*mz*pow((m*m - s + s2 - t1),2)); } double m3_6(double s, double s1, double s2, double t1) { return (((-5*pow(m,6))/2 + 5*pow(m,4)*mz*mz - 4*m*m*pow(mz,4) + 5*pow(m,4)*s + 8*m*m*mz*mz*s - 4*pow(mz,4)*s - (5*m*m*s*s)/2 + 3*mz*mz*s*s + (pow(m,4)*s1)/2 - 10*m*m*mz*mz*s1 - m*m*s*s1 - 6*mz*mz*s*s1 + (s*s*s1)/2 - 5*pow(m,4)*s2 - 4*m*m*mz*mz*s2 + 4*pow(mz,4)*s2 + 5*m*m*s*s2 - 2*mz*mz*s*s2 + m*m*s1*s2 + 6*mz*mz*s1*s2 - s*s1*s2 - (5*m*m*s2*s2)/2 - mz*mz*s2*s2 + (s1*s2*s2)/2 + 5*pow(m,4)*t1 - m*m*mz*mz*t1 - 4*pow(mz,4)*t1 - 5*m*m*s*t1 - mz*mz*s*t1 - m*m*s1*t1 - 6*mz*mz*s1*t1 + s*s1*t1 + 5*m*m*s2*t1 + 5*mz*mz*s2*t1 - s1*s2*t1 - (5*m*m*t1*t1)/2 - 4*mz*mz*t1*t1 + (s1*t1*t1)/2)*(((pow(x1(s1,t1),3)/((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*(t2plus(s2,t1) + x1(s1,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))) - pow(x2(s,s1),3)/((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*(t2plus(s2,t1) - x2(s,s1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2plus(s2,t1) + x1(s1,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2plus(s2,t1) + x2(s,s1) + ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) - 2*a(s,s2)*x1(s1,t1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + b(s,s1,s2,t1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*a(s,s2)*x2(s,s1)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))) + 2*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1)))*sqrt(c(s,s1,s2,t1) + (t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2)))*(b(s,s1,s2,t1) + a(s,s2)*(t2plus(s2,t1) - ((sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*(pow(x1(s1,t1),3)/((t2minus(s2,t1) + x1(s1,t1))*(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1)))) - pow(x2(s,s1),3)/((t2minus(s2,t1) - x2(s,s1))*(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/pow((x1(s1,t1) + x2(s,s1)),2) + (x1(s1,t1)*x1(s1,t1)*(2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) - b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(t2minus(s2,t1) + x1(s1,t1))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x1(s1,t1)*x1(s1,t1)*(-2*c(s,s1,s2,t1)*(x1(s1,t1) + 3*x2(s,s1)) + x1(s1,t1)*(-4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(x1(s1,t1) + 5*x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) - b(s,s1,s2,t1)*x1(s1,t1) - 2*a(s,s2)*t2minus(s2,t1)*x1(s1,t1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))))))/(2*pow((c(s,s1,s2,t1) + x1(s1,t1)*(-b(s,s1,s2,t1) + a(s,s2)*x1(s1,t1))),1.5)*pow((x1(s1,t1) + x2(s,s1)),3)) + (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(-t2minus(s2,t1) + x2(s,s1))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)) - (x2(s,s1)*x2(s,s1)*(2*c(s,s1,s2,t1)*(3*x1(s1,t1) + x2(s,s1)) + x2(s,s1)*(4*a(s,s2)*x1(s1,t1)*x2(s,s1) + b(s,s1,s2,t1)*(5*x1(s1,t1) + x2(s,s1))))*log(std::abs(2*c(s,s1,s2,t1) + b(s,s1,s2,t1)*t2minus(s2,t1) + b(s,s1,s2,t1)*x2(s,s1) + 2*a(s,s2)*t2minus(s2,t1)*x2(s,s1) + 2*sqrt(c(s,s1,s2,t1) + t2minus(s2,t1)*(b(s,s1,s2,t1) + a(s,s2)*t2minus(s2,t1)))*sqrt(c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5)))/(mz*mz*pow((m*m - s + s2 - t1),2))))))))/(2*pow((x1(s1,t1) + x2(s,s1)),3)*pow((c(s,s1,s2,t1) + x2(s,s1)*(b(s,s1,s2,t1) + a(s,s2)*x2(s,s1))),1.5))))/(mz*mz*pow((m*m - s + s2 - t1),2)); } double m3(double s, double s1, double s2, double t1) { return m3_1(s, s1, s2, t1) + m3_2(s, s1, s2, t1) + m3_3(s, s1, s2, t1) + m3_4(s, s1, s2, t1) + m3_5(s, s1, s2, t1) + m3_6(s, s1, s2, t1); }
[ "makssobolevs@gmail.com" ]
makssobolevs@gmail.com
943c3f4389166eadf9f0671df4bec78377185f27
fc19a754b0f6163e592699053ba680177f1a4799
/template/graph/spfa.cpp
8e07d45119b3355de76c0287a7deb2533b8c53a8
[]
no_license
Josephtao584/MyCode
02305c8f3d00fabc0485eeded60df73cbd0951b2
2f92d193c0e753779f6729e9b46f4ff0d29beb4f
refs/heads/master
2023-07-06T06:46:18.080464
2023-06-30T07:05:05
2023-06-30T07:05:05
324,576,868
0
0
null
null
null
null
UTF-8
C++
false
false
1,348
cpp
//spfa求最短路(可以有负边) #include<iostream> #include<cstring> #include<algorithm> #include<queue> using namespace std; const int N = 1e5 + 10; int h[N], e[N], w[N], ne[N], idx; int n, m; queue<int> q; int st[N], dist[N], cnt[N]; void add(int a, int b, int c) { e[idx] = b, w[idx] = c, ne[idx] = h[a], h[a] = idx++; } int spfa() { memset(dist, 0x3f, sizeof dist); for (int i = 1; i <= n; i++) { q.push(i); st[i] = true; } st[1] = true; while (q.size()) { int t = q.front(); q.pop(); st[t] = false; for (int i = h[t]; i != -1; i = ne[i]) { int j = e[i]; if (dist[j] > dist[t] + w[i]) { dist[j] = dist[t] + w[i]; cnt[j] = cnt[t] + 1; // 如果超过了n-1 // 根据抽屉原理,说明经过某个节点两次,则说明有环 if (cnt[j] >= n) return true; if (!st[j]) { st[j] = true; q.push(j); } } } } return false; } int main() { memset(h, -1, sizeof h); cin >> n >> m; for (int i = 0; i < m; i++) { int a, b, c; scanf("%d%d%d", &a, &b, &c); add(a, b, c); } if (spfa()) puts("Yes"); else puts("No"); }
[ "506188980@qq.com" ]
506188980@qq.com
06d707e95adf4eec436994f977564d8cb3198326
e5524c8ae5624a20bc34b5788c8a45cdda27bf70
/src/server.h
7c504c9f1153164f303f0b5bc5aee330437c5ef6
[]
no_license
mirogon/io_auto_scan
b73a5be28c3b63d9f6e0dd87fec8fddec7a295e5
d7883ea1d2826546d3507b76dd8658679a02e38a
refs/heads/master
2020-12-01T17:49:16.993216
2019-12-29T07:06:44
2019-12-29T07:06:44
230,715,951
0
0
null
null
null
null
UTF-8
C++
false
false
328
h
#pragma once #include "global.h" namespace m1 { typedef uint32_t packet_identifier; struct net_packet_scan { packet_identifier m_packet_identifier; }; const uint32_t NET_ID_SCAN = 3345; class server { public: server(); ~server(); bool has_received_scan_packet(); private: UDPsocket m_socket; }; }
[ "m1smr@m1smr.com" ]
m1smr@m1smr.com
baf180264363e0ec6504e9e0d684c9436c81b08e
c773326e2a8c8128d2bb3279319cadff175a3ce9
/Shadows/Cube.h
7285cc311e01a153bb4260ebfe3fb486639d44c1
[]
no_license
phinion/GACP_Shadows
486bccaaae7d3c589f650d2299f09a19753268b9
1a41009e36d540667e2859fdeae223764ad574ec
refs/heads/master
2023-08-27T10:44:43.891333
2021-10-13T12:53:20
2021-10-13T12:53:20
231,459,518
0
0
null
null
null
null
UTF-8
C++
false
false
468
h
#ifndef _CUBE_H_ #define _CUBE_H_ #include <glad/glad.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include "stb_image.h" #include "TransformComponent.h" #include <iostream> #include <vector> class Cube : public Transform{ public: unsigned int VAO; Cube(); void loadTexture(char const * path); void bindTextures(unsigned int _shadowCubemap); void draw(); private: unsigned int VBO; std::vector<unsigned int> textures; }; #endif
[ "yashvishwanath@yahoo.com" ]
yashvishwanath@yahoo.com
4e6b8dca682017ee049f63b4bf4f28b172e98bf0
5310f015c9cc3ef9e720f511c7bfd07e2ea8bd33
/Source/AgoraVideoCall/UI/VideoViewWidget.h
9d46fc5cec7bb5765b6856972f3e56d96e4a4860
[]
no_license
risooonho/Unreal-Agora
970f96d87aa436135dca74ec99ee781376d6b9f6
c88441fb897dfb872bb40afd60456dc3a68ab625
refs/heads/master
2022-04-04T11:49:00.127808
2020-02-11T21:25:35
2020-02-11T21:25:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,064
h
// Copyright (c) 2019 Agora.io. All rights reserved. #pragma once #include "CoreMinimal.h" #include "Blueprint/UserWidget.h" #include "Components/Image.h" #include "VideoViewWidget.generated.h" /** * */ UCLASS() class AGORAVIDEOCALL_API UVideoViewWidget : public UUserWidget { GENERATED_BODY() public: UVideoViewWidget(const FObjectInitializer& ObjectInitializer); void NativeConstruct() override; void NativeDestruct() override; public: void NativeTick(const FGeometry& MyGeometry, float DeltaTime) override; void UpdateBuffer( uint8* RGBBuffer, uint32_t Width, uint32_t Height, uint32_t Size); void ResetBuffer(); public: UPROPERTY(BlueprintReadOnly, meta = (BindWidget)) UImage* RenderTargetImage = nullptr; UPROPERTY(EditDefaultsOnly) UTexture2D* RenderTargetTexture = nullptr; UTexture2D* CameraoffTexture = nullptr; uint8* Buffer = nullptr; uint32_t Width = 0; uint32_t Height = 0; uint32 BufferSize = 0; FUpdateTextureRegion2D* UpdateTextureRegion = nullptr; FSlateBrush Brush; FCriticalSection Mutex; };
[ "priddyjacob84@gmail.com" ]
priddyjacob84@gmail.com
ce388188ba30853b07b58fb4cffbff35e93b27f9
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_1595491_0/C++/coolabhi/small.cpp
d25c11ab5e13496d5c5d73780654d1006f36fc25
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
C++
false
false
774
cpp
#include<stack> #include<queue> #include<set> #include<cmath> #include<cstdlib> #include<cctype> #include<algorithm> #include<cctype> #include<climits> #define pp pair<int,int> using namespace std; int main() { freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); int T,S,N,p,a,b,c,i,t; scanf("%d",&T); for(i=1;i<=T;i++) { scanf("%d%d%d",&N,&S,&p); c=0; while(N--) { scanf("%d",&t); a=t/3; b=t%3; if(t==0 && p==1); else if(a>=p) c++; else if(b==0 && (a+1)>=p && S>0){c++;S--;} else if((b==1 || b==2)&& (a+1)>=p)c++; else if(b==2 && (a+2)>=p && S>0){c++;S--;} } printf("Case #%d: %d\n",i,c); } return 0; }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
8b19a8453014bc3ac7322a033a57984a0cd330ab
e612c9cd5e3085d09979efb68b380c079b432705
/pro/windows/runner/main.cpp
b8e271b196b54752837ad70a22fb8f6f5539eb26
[]
no_license
Daksh-Vatyani/Farmvilla
0c8f96d5f606702e931ce5cf365e9ff89d03cefc
3c5e49700413113a3fe1d947333f327585ec60a1
refs/heads/main
2023-07-07T02:59:27.092602
2021-08-15T08:05:23
2021-08-15T08:05:23
396,250,624
0
0
null
null
null
null
UTF-8
C++
false
false
1,213
cpp
#include <flutter/dart_project.h> #include <flutter/flutter_view_controller.h> #include <windows.h> #include "flutter_window.h" #include "run_loop.h" #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, _In_ wchar_t *command_line, _In_ int show_command) { // Attach to console when present (e.g., 'flutter run') or create a // new console when running with a debugger. if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { CreateAndAttachConsole(); } // Initialize COM, so that it is available for use in the library and/or // plugins. ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); RunLoop run_loop; flutter::DartProject project(L"data"); std::vector<std::string> command_line_arguments = GetCommandLineArguments(); project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); FlutterWindow window(&run_loop, project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); if (!window.CreateAndShow(L"pro", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true); run_loop.Run(); ::CoUninitialize(); return EXIT_SUCCESS; }
[ "vatyanidaksh20@gmail.com" ]
vatyanidaksh20@gmail.com
93652308adeb5bf8232679b7de20c00598f384c5
83d8bc3d035013f5412bc5a9926de1a0937b2fad
/Library/Source/Nano/Files/NFilePath.cpp
e25e264b325c67c231e275b9b9cfdd666946caeb
[ "BSD-3-Clause" ]
permissive
southdy/Nano
6cd6b9d02277e88a5ddf1fb88cbe33b8d6b46f38
dceb0907061f7845d8a3c662f309ca164e932e6f
refs/heads/main
2023-08-29T04:39:47.718211
2021-10-06T21:58:19
2021-10-06T21:58:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
17,346
cpp
/* NAME: NFilePath.cpp DESCRIPTION: File path. COPYRIGHT: Copyright (c) 2006-2021, refNum Software 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. 3. Neither the name of the copyright holder 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 HOLDER 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. ___________________________________________________________________________ */ //============================================================================= // Includes //----------------------------------------------------------------------------- #include "NFilePath.h" // Nano #include "NPOSIX.h" //============================================================================= // Internal Constants //----------------------------------------------------------------------------- // Separator #if NN_TARGET_WINDOWS inline constexpr const char* kNPathSeparator = "\\"; #else inline constexpr const char* kNPathSeparator = "/"; #endif // Parts #if NN_TARGET_WINDOWS inline constexpr const char* kNAbsolutePrefix = "[A-Za-z]:\\\\"; inline constexpr const char* kNRootSuffix = ":\\"; inline constexpr const char* kNPartRoot = "^([A-Za-z]:\\\\)"; inline constexpr const char* kNPartParent = "(.*)\\\\.*?$"; inline constexpr const char* kNPartFilename = ".*\\\\(.*?$)"; #else inline constexpr const char* kNAbsolutePrefix = "\\/"; inline constexpr const char* kNRootSuffix = "/"; inline constexpr const char* kNPartRoot = "^(\\/)"; inline constexpr const char* kNPartParent = "(.*)\\/.*?$"; inline constexpr const char* kNPartFilename = ".*\\/(.*?$)"; #endif // Patterns inline constexpr const char* kNMatchStem = "(.+)\\."; inline constexpr const char* kNMatchExtension = ".+\\.(.*)"; //============================================================================= // NFilePath::NFilePath : Constructor. //----------------------------------------------------------------------------- NFilePath::NFilePath(const NString& thePath) : mPath() { // Set the path SetPath(thePath); } //============================================================================= // NFilePath::IsValid : Is the path valid? //----------------------------------------------------------------------------- bool NFilePath::IsValid() const { // Check the state return !mPath.IsEmpty(); } //============================================================================= // NFilePath::IsAbsolute : Is this an absolute path? //----------------------------------------------------------------------------- bool NFilePath::IsAbsolute() const { // Validate our state NN_REQUIRE(IsValid()); // Check the state return mPath.StartsWith(kNAbsolutePrefix, NStringFind::Pattern); } //============================================================================= // NFilePath::IsRelative : Is this a relative path? //----------------------------------------------------------------------------- bool NFilePath::IsRelative() const { // Validate our state NN_REQUIRE(IsValid()); // Check the state return !IsAbsolute(); } //============================================================================= // NFilePath::IsRoot : Is this a root path? //----------------------------------------------------------------------------- bool NFilePath::IsRoot() const { // Validate our state NN_REQUIRE(IsValid()); // Check the state return mPath.EndsWith(kNRootSuffix); } //============================================================================= // NFilePath::Clear : Clear the path. //----------------------------------------------------------------------------- void NFilePath::Clear() { // Reset our state mPath.Clear(); } //============================================================================= // NFilePath::GetRoot : Get the root path. //----------------------------------------------------------------------------- NFilePath NFilePath::GetRoot() const { // Validate our state NN_REQUIRE(IsValid()); // Get the root path NString theRoot = GetPart(kNPartRoot); NN_REQUIRE((IsRelative() && theRoot.IsEmpty()) || (IsAbsolute() && !theRoot.IsEmpty())); return theRoot; } //============================================================================= // NFilePath::GetParent : Get the parent. //----------------------------------------------------------------------------- NFilePath NFilePath::GetParent() const { // Validate our state NN_REQUIRE(IsValid()); // Get the parent if (IsRoot()) { // A root is its own parent return *this; } else { // Get the parent // // The root is the part that remains when there are no more parents. NString theParent = GetPart(kNPartParent); if (!theParent.Contains(kNPathSeparator)) { theParent = GetPart(kNPartRoot); } return theParent; } } //============================================================================= // NFilePath::GetChild : Get a child of the path. //----------------------------------------------------------------------------- NFilePath NFilePath::GetChild(const NString& theName) const { // Validate our parameters and state NN_REQUIRE(!theName.IsEmpty()); NN_REQUIRE(IsValid()); // Get the child NFilePath theChild(*this); if (!theChild.IsRoot()) { NN_REQUIRE(!theChild.mPath.EndsWith(kNPathSeparator)); theChild.mPath += kNPathSeparator; } theChild.mPath += theName; return theChild; } //============================================================================= // NFilePath::GetFilename : Get the filename. //----------------------------------------------------------------------------- NString NFilePath::GetFilename() const { // Validate our state NN_REQUIRE(IsValid()); // Get the filename // // If we fail to find a separator we must have a single, relative, part. NString theName = GetPart(kNPartFilename); if (theName.IsEmpty()) { NN_REQUIRE(IsRelative()); theName = mPath; } return theName; } //============================================================================= // NFilePath::SetFilename : Set the filename. //----------------------------------------------------------------------------- void NFilePath::SetFilename(const NString& theName) { // Validate our parameters and state NN_REQUIRE(!theName.IsEmpty()); NN_REQUIRE(IsValid()); // Set the filename // // If we fail to find a separator we must have a single, relative, part. if (!SetPart(kNPartFilename, theName)) { NN_REQUIRE(IsRelative()); mPath = theName; } // Validate our state NN_REQUIRE(GetFilename() == theName); } //============================================================================= // NFilePath::GetStem : Get the stem. //----------------------------------------------------------------------------- NString NFilePath::GetStem() const { // Validate our state NN_REQUIRE(IsValid()); // Get the stem NString fileName = GetFilename(); NString theStem; if (fileName == "." || fileName == "..") { theStem = fileName; } else { theStem = fileName.GetMatch(kNMatchStem); if (theStem.IsEmpty()) { theStem = fileName; NN_REQUIRE(GetExtension().IsEmpty()); } } return theStem; } //============================================================================= // NFilePath::SetStem : Set the stem. //----------------------------------------------------------------------------- void NFilePath::SetStem(const NString& theStem) { // Validate our parameters and state NN_REQUIRE(!theStem.IsEmpty()); NN_REQUIRE(IsValid()); // Set the stem NString fileName = theStem; if (theStem != "." && theStem != "..") { NString theExtension = GetExtension(); if (!theExtension.IsEmpty()) { fileName += "."; fileName += theExtension; } } SetFilename(fileName); // Validate our state NN_REQUIRE(GetStem() == theStem); } //============================================================================= // NFilePath::GetExtension : Get the extension. //----------------------------------------------------------------------------- NString NFilePath::GetExtension() const { // Validate our state NN_REQUIRE(IsValid()); // Get the extension NString fileName = GetFilename(); NString theExtension; if (fileName != "." && fileName != "..") { theExtension = fileName.GetMatch(kNMatchExtension); if (theExtension == fileName) { theExtension.Clear(); } } return theExtension; } //============================================================================= // NFilePath::SetExtension : Set the extension. //----------------------------------------------------------------------------- void NFilePath::SetExtension(const NString& theExtension) { // Validate our parameters and state NN_REQUIRE(!theExtension.StartsWith(".")); NN_REQUIRE(IsValid()); // Set the extension NString fileName = GetStem(); if (!theExtension.IsEmpty()) { fileName += "."; fileName += theExtension; } SetFilename(fileName); // Validate our state NN_REQUIRE(GetExtension() == theExtension); } //============================================================================= // NFilePath::GetParts : Get the parts. //----------------------------------------------------------------------------- NVectorString NFilePath::GetParts() const { // Validate our state NN_REQUIRE(IsValid()); // Get the parts NVectorString theParts; if (IsRoot()) { // The root path contains the root theParts.push_back(mPath); } else { // A non-root path is split on separators // // If the path was absolute then the root part's separator // will have been lost, so this must be added back on. theParts = mPath.Split(kNPathSeparator); NN_REQUIRE(!theParts.empty()); if (IsAbsolute()) { theParts[0] += kNPathSeparator; } } return theParts; } //============================================================================= // NFilePath::SetParts : Set the parts. //----------------------------------------------------------------------------- void NFilePath::SetParts(const NVectorString& theParts) { // Get the state we need bool isAbsolute = false; size_t numParts = theParts.size(); size_t n = 0; mPath.Clear(); // Set the parts for (const auto& thePart : theParts) { // Update our state mPath += thePart; if (n == 0) { isAbsolute = IsAbsolute(); } // Add a separator // // We don't add a separator after the last part. // // If we have an absolute path then the root already contains // a separator so we don't add one after the first part either. if (n == (numParts - 1)) { // Don't add separator after last part } else if (isAbsolute && n == 0) { // Don't add separator after root part } else { mPath += kNPathSeparator; } n++; } } //============================================================================= // NFilePath::GetPath : Get the path. //----------------------------------------------------------------------------- NString NFilePath::GetPath() const { // Validate our state NN_REQUIRE(IsValid()); // Get the path return mPath; } //============================================================================= // NFilePath::SetPath : Set the path. //----------------------------------------------------------------------------- void NFilePath::SetPath(const NString& thePath) { // Set the path mPath = thePath; } //============================================================================= // NFilePath::GetUTF8 : Get the path as a UTF8 string. //----------------------------------------------------------------------------- const utf8_t* NFilePath::GetUTF8() const { // Validate our state NN_REQUIRE(IsValid()); // Get the path return mPath.GetUTF8(); } //============================================================================= // NFilePath::GetUTF16 : Get the path as a UTF16 string. //----------------------------------------------------------------------------- const utf16_t* NFilePath::GetUTF16() const { // Validate our state NN_REQUIRE(IsValid()); // Get the path return mPath.GetUTF16(); } //============================================================================= // NFilePath::GetCurrent : Get the current working directory. //----------------------------------------------------------------------------- NFilePath NFilePath::GetCurrent() { // Get the path return NPOSIX::getcwd(); } //============================================================================= // NFilePath::SetCurrent : Set the current working directory. //----------------------------------------------------------------------------- void NFilePath::SetCurrent(const NFilePath& thePath) { // Validate our parameters NN_REQUIRE(thePath.IsValid()); // Set the path NPOSIX::chdir(thePath); } #pragma mark NMixinAppendable //============================================================================= // NFilePath::Append : Append a value. //----------------------------------------------------------------------------- void NFilePath::Append(const NFilePath& thePath) { // Append the path *this = GetChild(thePath.mPath); } #pragma mark NMixinComparable //============================================================================= // NFilePath::CompareEqual : Perform an equality comparison. //----------------------------------------------------------------------------- bool NFilePath::CompareEqual(const NFilePath& thePath) const { // Compare the path return CompareOrder(thePath) == NComparison::EqualTo; } //============================================================================= // NFilePath::CompareOrder : Perform a three-way comparison. //----------------------------------------------------------------------------- NComparison NFilePath::CompareOrder(const NFilePath& thePath) const { // Compare the path // // File paths are considered to be case-insensitive but case-preserving. return mPath.Compare(thePath.mPath, NStringFind::NoCase); } #pragma mark NMixinHashable //============================================================================= // NFilePath::HashGet : Get the hash. //----------------------------------------------------------------------------- size_t NFilePath::HashGet() const { // Get the hash return mPath.HashGet(); } //============================================================================= // NFilePath::HashUpdate : Update the hash. //----------------------------------------------------------------------------- size_t NFilePath::HashUpdate() { // Update the hash return mPath.HashUpdate(); } //============================================================================= // NFilePath::HashClear : Clear the hash. //----------------------------------------------------------------------------- void NFilePath::HashClear() { // Clear the hash mPath.HashClear(); } #pragma mark private //============================================================================= // NFilePath::GetPart : Get part of the path. //----------------------------------------------------------------------------- NString NFilePath::GetPart(const NString& thePattern) const { // Get the part return mPath.GetMatch(thePattern); } //============================================================================= // NFilePath::SetPart : Set part of the path. //----------------------------------------------------------------------------- bool NFilePath::SetPart(const NString& thePattern, const NString& theValue) { // Set the part NPatternMatch theMatch = mPath.FindMatch(thePattern); bool didSet = !theMatch.theGroups.empty(); if (didSet) { mPath.Replace(theMatch.theGroups[0], theValue); } return didSet; }
[ "dair@refnum.com" ]
dair@refnum.com
0e313f7a39cedd768e6bcc3780f8c293d17c8374
5a2349399fa9d57c6e8cc6e0f7226d683391a362
/src/qt/qtwebkit/Source/WebKit2/WebProcess/NetworkInfo/WebNetworkInfoManager.cpp
844f9b5c49041ca2f860560897ce66406b5b994d
[ "BSD-3-Clause" ]
permissive
aharthcock/phantomjs
e70f3c379dcada720ec8abde3f7c09a24808154c
7d7f2c862347fbc7215c849e790290b2e07bab7c
refs/heads/master
2023-03-18T04:58:32.428562
2023-03-14T05:52:52
2023-03-14T05:52:52
24,828,890
0
0
BSD-3-Clause
2023-03-14T05:52:53
2014-10-05T23:38:56
C++
UTF-8
C++
false
false
3,901
cpp
/* * Copyright (C) 2012 Intel Corporation. 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 APPLE INC. AND ITS 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 APPLE INC. OR ITS 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. */ #include "config.h" #include "WebNetworkInfoManager.h" #if ENABLE(NETWORK_INFO) #include "WebNetworkInfoManagerMessages.h" #include "WebNetworkInfoManagerProxyMessages.h" #include "WebPage.h" #include "WebProcess.h" #include <WebCore/NetworkInfo.h> #include <WebCore/NetworkInfoController.h> #include <limits.h> using namespace WebCore; namespace WebKit { const char* WebNetworkInfoManager::supplementName() { return "WebNetworkInfoManager"; } WebNetworkInfoManager::WebNetworkInfoManager(WebProcess* process) : m_process(process) { m_process->addMessageReceiver(Messages::WebNetworkInfoManager::messageReceiverName(), this); } WebNetworkInfoManager::~WebNetworkInfoManager() { } void WebNetworkInfoManager::registerWebPage(WebPage* page) { bool wasEmpty = m_pageSet.isEmpty(); m_pageSet.add(page); if (wasEmpty) m_process->parentProcessConnection()->send(Messages::WebNetworkInfoManagerProxy::StartUpdating(), 0); } void WebNetworkInfoManager::unregisterWebPage(WebPage* page) { m_pageSet.remove(page); if (m_pageSet.isEmpty()) m_process->parentProcessConnection()->send(Messages::WebNetworkInfoManagerProxy::StopUpdating(), 0); } double WebNetworkInfoManager::bandwidth(WebPage* page) const { // The spec indicates that we should return "infinity" if the bandwidth is unknown. double bandwidth = std::numeric_limits<double>::infinity(); m_process->parentProcessConnection()->sendSync(Messages::WebNetworkInfoManagerProxy::GetBandwidth(), Messages::WebNetworkInfoManagerProxy::GetBandwidth::Reply(bandwidth), page->pageID()); return bandwidth; } bool WebNetworkInfoManager::metered(WebPage* page) const { bool metered = false; m_process->parentProcessConnection()->sendSync(Messages::WebNetworkInfoManagerProxy::IsMetered(), Messages::WebNetworkInfoManagerProxy::IsMetered::Reply(metered), page->pageID()); return metered; } void WebNetworkInfoManager::didChangeNetworkInformation(const AtomicString& eventType, const WebNetworkInfo::Data& data) { RefPtr<NetworkInfo> networkInformation = NetworkInfo::create(data.bandwidth, data.metered); HashSet<WebPage*>::const_iterator it = m_pageSet.begin(); HashSet<WebPage*>::const_iterator end = m_pageSet.end(); for (; it != end; ++it) { WebPage* page = *it; if (page->corePage()) NetworkInfoController::from(page->corePage())->didChangeNetworkInformation(eventType, networkInformation.get()); } } } // namespace WebKit #endif // ENABLE(NETWORK_INFO)
[ "ariya.hidayat@gmail.com" ]
ariya.hidayat@gmail.com
1ad8bec26fda932379faaf6f0153267b23ff1e3e
465fe842cea448e45e2c1c2a526a6cca888c8181
/44.cpp
de749a5668d5567a07e6a3cf28cfc6f064f4b32f
[]
no_license
PigTS/Coding-Interviews
fdcbe9cf24a9185e173740fa5a129ef41090fd95
ca034424ae33709e48bf1a37547b79463fe23575
refs/heads/master
2020-03-25T07:46:52.949357
2018-09-08T08:08:44
2018-09-08T08:08:44
null
0
0
null
null
null
null
GB18030
C++
false
false
579
cpp
//牛客最近来了一个新员工Fish,每天早晨总是会拿着一本英文杂志,写些句子在本子上。 //同事Cat对Fish写的内容颇感兴趣,有一天他向Fish借来翻看,但却读不懂它的意思。 //例如,“student. a am I”。后来才意识到,这家伙原来把句子单词的顺序翻转了,正确的句子应该是“I am a student.”。 //Cat对一一的翻转这些单词顺序可不在行,你能帮助他么? //py2.7 #include <string> using namespace std; class Solution{ public: string ReverseSentence(string str){ } };
[ "1814014897@qq.com" ]
1814014897@qq.com
d98cd76d8a3eff9dcfa3595754771936e7cbe2d5
9905370a700088d95d445bb725de8ecd1cd4a8a7
/course1/Laba2/H/main.cpp
3f9dd062cb3b5d14cdca179f18820187d1a81b69
[ "MIT" ]
permissive
flydzen/ITMO_algo
cb53b5205a128e77e78729e6f695c874753e0574
ea251dca0fddb0d4d212377c6785cdc3667ece89
refs/heads/master
2023-01-04T22:36:09.975625
2020-11-14T07:38:11
2020-11-14T07:38:11
312,693,221
0
0
null
null
null
null
UTF-8
C++
false
false
1,513
cpp
#include <iostream> #include <vector> using namespace std; unsigned int cur = 0; unsigned int nextRand24(unsigned int a, unsigned int b) { cur = cur * a + b; return cur >> 8; } void merge(vector<int> &v, unsigned int left, unsigned int right, unsigned int mid, unsigned long long &cou) { unsigned int u1 = left; unsigned int u2 = mid; vector<int> res((int) right - left); while (u1 < mid && u2 < right) { if (v[u1] <= v[u2]) { res[u1 + u2 - left - mid] = v[u1]; u1++; } else { res[u1 + u2 - left - mid] = v[u2]; cou += mid - u1; u2++; } } while (u1 < mid) { res[u1 + u2 - left - mid] = v[u1]; u1++; } while (u2 < right) { res[u1 + u2 - left - mid] = v[u2]; u2++; } for (unsigned int i = 0; i < right - left; i++) { v[left + i] = res[i]; } } void sort(vector<int> &v, unsigned int l, unsigned int r, unsigned long long &cou) { if (r - l <= 1) { return; } unsigned int mid = (l + r) / 2; sort(v, l, mid, cou); sort(v, mid, r, cou); merge(v, l, r, mid, cou); } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); unsigned int n, m, a, b; cin >> n >> m >> a >> b; vector<int> v(n); for (unsigned int i = 0; i < n; i++) { v[i] = nextRand24(a, b) % m; } unsigned long long cou = 0; sort(v, 0, n, cou); cout << cou << endl; return 0; }
[ "flydzen@gmail.com" ]
flydzen@gmail.com
8d3be48c7367320bf75c83f30c580ffc5eb34577
de51ca68306b46a9f0f9217cb4e5f9c4d5308e8e
/I/samples/date-monthly.cpp
ef25b4e8f9c6a6a91b29a148fc18105039f41a7b
[]
no_license
alioshag/Cplusplus
5c180e2a5baf678be0a9f4c1425f283034e96936
9cf027a199529272fa32579f7ae421bca7a6c666
refs/heads/master
2020-12-24T06:57:24.199726
2016-08-25T16:43:10
2016-08-25T16:43:10
58,066,471
0
0
null
null
null
null
UTF-8
C++
false
false
2,649
cpp
//date-yrs_dates.cpp //Divide the distance between years and days #include <iostream> #include <cstdlib> #include <ctime> //for time_t, time, tm, localtime #include <climits> //for INT_MAX using namespace std; int main() { const int length[] = { 0, //dummy element so that January will have subscript 1 31, //January 28, //February 31, //March 30, //April 31, //May 30, //June 31, //July 31, //August 30, //September 31, //October 30, //November 31 //December }; const size_t n = sizeof length / sizeof length[0] - 1; const time_t t = time(0); //Get the current date. if (t == -1) { cerr << "time failed\n"; return EXIT_FAILURE; } const tm *const p = localtime(&t); int year = p->tm_year + 1900; int month = p->tm_mon + 1; int day = p->tm_mday; cout << "How many days forward do you want to go from " << month << "/" << day << "/" << year << "? "; int distance; //uninitialized variable cin >> distance; if (!cin) { cerr << "Input failed.\n"; return EXIT_FAILURE; } int distance_yrs = distance / 365; //Convert distance to years and days int distance_days = distance % 365; if (distance_days < 0) { //Negative distance distance_days += 365; //converts the negative distance into a positive distance adding 365 year -= 1; //and substracting 1 year } cout << "Distance_years = " << distance_yrs << "\n" << "Distance_days = " << distance_days << "\n"; int off_day = length[month] - day; //month offset of current day if (distance_days > off_day) { distance -= off_day; if (month < n) { ++month; } else { month = 1; } day = 0; for (; distance > length[month]; distance -= length[month]) { if (month < n) { ++month; continue; } month = 1; if (year < INT_MAX) { ++year; continue; } cerr << "Can't go beyond year " << INT_MAX << "\n"; return EXIT_FAILURE; } } --month; day += distance; cout << "The new date is " << month << "/" << day << "/" << year << ".\n"; return EXIT_SUCCESS; }
[ "alioshag26@gmail.com" ]
alioshag26@gmail.com
e893eece2055242e7f39287600fb1e3debe15ea2
9311386583f8be41e637049856635cac335b2f1e
/external/cmdshell.h
67f307685e9a042813026ec7b35864687acd05c1
[ "MIT" ]
permissive
KidneyThief/TinScript1.0
3d596afccbcac212ef864e6cbae1476008ecf956
73ae9e4f75672b6d3026055bbf2edcc07c9b59ee
refs/heads/master
2016-08-03T11:22:43.960853
2014-11-13T07:55:45
2014-11-13T07:55:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,434
h
// ------------------------------------------------------------------------------------------------ // The MIT License // // Copyright (c) 2013 Tim Andersen // // 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. // ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------ // cmdshell.h // ------------------------------------------------------------------------------------------------ // -- TinScript includes #include "TinScript.h" #include "TinRegistration.h" // ==================================================================================================================== // Default Assert Handler // ==================================================================================================================== bool8 CmdShellAssertHandler(TinScript::CScriptContext* script_context, const char* condition, const char* file, int32 linenumber, const char* fmt, ...); // ==================================================================================================================== // class CCmdShell: simple input out command shell // ==================================================================================================================== class CCmdShell { public: // -- constructor / destructor CCmdShell(); virtual ~CCmdShell() { } // -- clears out stale text, and refreshes the prompt void RefreshConsoleInput(bool8 display_prompt = false, const char* new_input_string = NULL); // -- update should be called every frame - returns the const char* of the current command const char* Update(); private: // -- constants static const int32 kMaxHistory = 64; // -- history members bool8 mHistoryFull; int32 mHistoryIndex; int32 mHistoryLastIndex; char mHistory[TinScript::kMaxTokenLength][kMaxHistory]; // -- input members char mConsoleInputBuf[TinScript::kMaxTokenLength]; char* mInputPtr; // -- command entry buffer char mCommandBuf[TinScript::kMaxTokenLength]; }; // ==================================================================================================================== // EOF // ====================================================================================================================
[ "kidneythief@shaw.ca" ]
kidneythief@shaw.ca
256cde90e467d4cd945a21f7e6d4e89ae971637e
ce1e8b29ffd9d97ffc5c693fe3bd4ee358b5e1d5
/src/VoxieBackend/Component/ExternalOperation.cpp
b30b8ee628e9cd4eb0acaa842f073e6bcd7285cb
[ "MIT" ]
permissive
voxie-viewer/voxie
d76fe7d3990b14dea34e654378d82ddeb48f6445
2b4f23116ab1c2fd44b134c4265a59987049dcdb
refs/heads/master
2023-04-14T13:30:18.668070
2023-04-04T10:58:24
2023-04-04T10:58:24
60,341,017
6
1
MIT
2022-11-29T06:52:16
2016-06-03T10:50:54
C++
UTF-8
C++
false
false
13,840
cpp
/* * Copyright (c) 2014-2022 The Voxie Authors * * 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. */ // QDBusConnection should be included as early as possible: // https://bugreports.qt.io/browse/QTBUG-48351 / // https://bugreports.qt.io/browse/QTBUG-48377 #include <QtDBus/QDBusConnection> #include "ExternalOperation.hpp" #include <VoxieClient/DBusAdaptors.hpp> #include <VoxieClient/Exception.hpp> #include <VoxieClient/VoxieDBus.hpp> #include <VoxieBackend/Component/Extension.hpp> #include <VoxieBackend/IO/Operation.hpp> #include <VoxieBackend/IO/OperationImport.hpp> #include <VoxieClient/ObjectExport/Client.hpp> #include <QtCore/QDebug> using namespace vx; using namespace vx; using namespace vx::io; namespace vx { class ExternalOperationAdaptorImpl : public ExternalOperationAdaptor { ExternalOperation* object; public: ExternalOperationAdaptorImpl(ExternalOperation* object); ~ExternalOperationAdaptorImpl() override; bool isCancelled() const override; // Must be called before doing anything else with the object // After the operation is finished, client.DecRefCount(operation) has to // be called. void ClaimOperation(const QDBusObjectPath& client, const QMap<QString, QDBusVariant>& options) override; // Set the progress of the operation. // (progress should be between 0.0 and 1.0) void SetProgress(double progress, const QMap<QString, QDBusVariant>& options) override; void FinishError(const QString& name, const QString& message, const QMap<QString, QDBusVariant>& options) override; QString action() const override { return object->action(); } QString name() const override { return object->name(); } }; ExternalOperation::ExternalOperation( const QSharedPointer<vx::io::Operation>& operation) : RefCountedObject("ExternalOperation"), operation_(operation) { auto adapter = new ExternalOperationAdaptorImpl(this); if (!operation) qCritical() << "ExternalOperation::ExternalOperation: operation is null"; connect(operation.data(), &Operation::cancelled, adapter, [adapter]() { adapter->Cancelled(vx::emptyOptions()); }); // Note: This cannot use this->initialProcessStatus() because the process is // not set yet. connect( this, &QObject::destroyed, this, [operation = this->operation(), initialProcessStatusContainer = this->initialProcessStatusContainer()]() { if (!operation->isFinished()) { // Script called ClaimOperation() but neither Finish() nor // FinishError() auto initialProcessStatus = *initialProcessStatusContainer; QString additionalError; if (!initialProcessStatus) { // No process information additionalError = ""; } else if (!initialProcessStatus->isStarted()) { // Should not happen, because there should be no one to claim the // operation in this case. additionalError = " Initial process failed to start (?)."; } else if (!initialProcessStatus->isExited()) { additionalError = " Initial process still running."; } else { additionalError = QString( " Initial process exited with exit status %1 / exit code " "%2.") .arg(exitStatusToString(initialProcessStatus->exitStatus())) .arg(initialProcessStatus->exitCode()); } operation->finish( createQSharedPointer<vx::io::Operation::ResultError>( createQSharedPointer<Exception>( "de.uni_stuttgart.Voxie.Error", "Extension process failed to return any data." + additionalError))); } }); } ExternalOperation::~ExternalOperation() { // qDebug() << "ExternalOperation::~ExternalOperation"; } ExternalOperationAdaptorImpl::ExternalOperationAdaptorImpl( ExternalOperation* object) : ExternalOperationAdaptor(object), object(object) {} ExternalOperationAdaptorImpl::~ExternalOperationAdaptorImpl() {} void ExternalOperation::setInitialProcess(QProcess* process) { vx::checkOnMainThread("ExternalOperation::setInitialProcess()"); if (!process) { qWarning() << "ExternalOperation::setInitialProcess() called with nullptr"; return; } if (this->initialProcessSet) { qWarning() << "ExternalOperation::setInitialProcess() called multiple times"; return; } this->initialProcessSet = true; this->initialProcess_ = process; *this->initialProcessStatusContainer_ = makeSharedQObject<ProcessStatus>(process); } void ExternalOperation::checkClient() { if (!client) throw Exception("de.uni_stuttgart.Voxie.InvalidOperation", "ExternalOperation not yet claimed"); if (client->uniqueConnectionName() == "") return; if (!calledFromDBus()) { qWarning() << "ExternalOperationAdaptor::checkClient() called from " "non-DBus context:" << this; return; } if (client->uniqueConnectionName() != message().service()) { qWarning() << "ExternalOperationAdaptor::checkClient(): connection " "mismatch, expected" << client->uniqueConnectionName() << "got" << message().service() << "for" << this; } } void ExternalOperation::cleanup() {} bool ExternalOperation::isClaimed() { QSharedPointer<QSharedPointer<ExternalOperation>> ref(initialReference); if (!ref) // TODO: What should be done here? throw Exception("de.uni_stuttgart.Voxie.Error", "initialReference not set"); return !*ref; } bool ExternalOperationAdaptorImpl::isCancelled() const { return object->operation()->isCancelled(); } void ExternalOperationAdaptorImpl::ClaimOperation( const QDBusObjectPath& client, const QMap<QString, QDBusVariant>& options) { try { ExportedObject::checkOptions(options); // qDebug() << "ExternalOperation::ClaimOperation" << client.path(); Client* clientPtr = qobject_cast<Client*>(vx::ExportedObject::lookupWeakObject(client)); if (!clientPtr) { throw Exception("de.uni_stuttgart.Voxie.ObjectNotFound", "Cannot find client object"); } QSharedPointer<QSharedPointer<ExternalOperation>> ref( object->initialReference); if (!ref) throw Exception("de.uni_stuttgart.Voxie.Error", "initialReference not set"); if (!*ref) throw Exception("de.uni_stuttgart.Voxie.InvalidOperation", "ExternalOperation already claimed"); auto ptr = *ref; if (ptr.data() != object) throw Exception("de.uni_stuttgart.Voxie.Error", "initialReference set to invalid value"); if (object->client) throw Exception("de.uni_stuttgart.Voxie.Error", "object->client already set"); object->client = clientPtr; ref->reset(); Q_EMIT object->claimed(); clientPtr->incRefCount(ptr); return; } catch (vx::Exception& e) { e.handle(object); return; } } void ExternalOperationAdaptorImpl::SetProgress( double progress, const QMap<QString, QDBusVariant>& options) { try { ExportedObject::checkOptions(options); object->checkClient(); // qDebug() << "ExternalOperation::SetProgress" << progress; object->operation()->updateProgress(progress); } catch (vx::Exception& e) { e.handle(object); return; } } void ExternalOperationAdaptorImpl::FinishError( const QString& name, const QString& message, const QMap<QString, QDBusVariant>& options) { try { ExportedObject::checkOptions(options); object->checkClient(); // qDebug() << "ExternalOperation::FinishError" << name << message; if (object->isFinished) throw Exception("de.uni_stuttgart.Voxie.InvalidOperation", "ExternalOperation is already finished"); Q_EMIT object->error(Exception(name, message)); object->isFinished = true; object->cleanup(); } catch (vx::Exception& e) { e.handle(object); return; } } class ExternalOperationImportAdaptorImpl : public ExternalOperationImportAdaptor { ExternalOperationImport* object; public: ExternalOperationImportAdaptorImpl(ExternalOperationImport* object); ~ExternalOperationImportAdaptorImpl() override; void Finish(const QDBusObjectPath& data, const QDBusObjectPath& version, const QMap<QString, QDBusVariant>& options) override; QString filename() const override { return object->filename(); } QMap<QString, QDBusVariant> properties() const override { return object->properties(); } }; ExternalOperationImport::ExternalOperationImport( const QSharedPointer<vx::io::Operation>& operation, const QString& filename, const QMap<QString, QDBusVariant>& properties, const QString& name) : ExternalOperation(operation), filename_(filename), properties_(properties), name_(name) { new ExternalOperationImportAdaptorImpl(this); // TODO: Merge this code into the // FinishError() method connect(this, &ExternalOperation::error, this, [this](const Exception& err) { this->operation()->finish(createQSharedPointer<Operation::ResultError>( createQSharedPointer<Exception>(err))); }); } ExternalOperationImport::~ExternalOperationImport() {} QString ExternalOperationImport::action() { return "Import"; } QString ExternalOperationImport::name() { return name_; } ExternalOperationImportAdaptorImpl::ExternalOperationImportAdaptorImpl( ExternalOperationImport* object) : ExternalOperationImportAdaptor(object), object(object) {} ExternalOperationImportAdaptorImpl::~ExternalOperationImportAdaptorImpl() {} void ExternalOperationImportAdaptorImpl::Finish( const QDBusObjectPath& data, const QDBusObjectPath& version, const QMap<QString, QDBusVariant>& options) { try { ExportedObject::checkOptions(options); object->checkClient(); // qDebug() << "ExternalOperation::Finish" << data.path(); auto dataStorage = Data::lookup(data); auto versionObj = DataVersion::lookup(version); if (object->isFinished) throw Exception("de.uni_stuttgart.Voxie.InvalidOperation", "ExternalOperationImport is already finished"); if (versionObj->data() != dataStorage) throw vx::Exception("de.uni_stuttgart.Voxie.InvalidOperation", "Given DataVersion is for another object"); object->operation()->finish( createQSharedPointer<OperationImport::Result>(dataStorage, versionObj)); object->isFinished = true; object->cleanup(); } catch (vx::Exception& e) { e.handle(object); return; } } class ExternalOperationExportAdaptorImpl : public ExternalOperationExportAdaptor { ExternalOperationExport* object; public: ExternalOperationExportAdaptorImpl(ExternalOperationExport* object) : ExternalOperationExportAdaptor(object), object(object) {} ~ExternalOperationExportAdaptorImpl() {} void Finish(const QMap<QString, QDBusVariant>& options) override { try { ExportedObject::checkOptions(options); object->checkClient(); // qDebug() << "ExternalOperation::Finish" << data.path(); if (object->operation()->isFinished()) throw Exception("de.uni_stuttgart.Voxie.InvalidOperation", "ExternalOperationExport is already finished"); object->operation()->finish( createQSharedPointer<Operation::ResultSuccess>()); object->isFinished = true; object->cleanup(); } catch (vx::Exception& e) { e.handle(object); return; } } QDBusObjectPath data() const override { return ExportedObject::getPath(object->data()); } QString filename() const override { return object->filename(); } }; ExternalOperationExport::ExternalOperationExport( const QSharedPointer<vx::io::Operation>& operation, const QString& filename, const QString& name, const QSharedPointer<vx::Data>& data) : ExternalOperation(operation), filename_(filename), name_(name), data_(data) { new ExternalOperationExportAdaptorImpl(this); // TODO: Change ExternalOperationImport and merge this code into the // FinishError() method connect(this, &ExternalOperation::error, this, [this](const Exception& err) { this->operation()->finish(createQSharedPointer<Operation::ResultError>( createQSharedPointer<Exception>(err))); }); } ExternalOperationExport::~ExternalOperationExport() {} QString ExternalOperationExport::action() { return "Export"; } QString ExternalOperationExport::name() { return name_; } } // namespace vx
[ "steffen.kiess@cis.iti.uni-stuttgart.de" ]
steffen.kiess@cis.iti.uni-stuttgart.de
b273d5ad1507615f1ad7ddfff13726b7545cbec7
5ff8cc5d2067269c950c971569253e7ccb5f287b
/algorithm_2019_cplus/algorithm_2019_cplus/1208.cpp
925dde60c926954217e14629a91dbdbb420488f6
[]
no_license
bbom16/study_algorithm
df7769aac0f54f7c34813521c6f57c9151c22012
22f0d7606951b61b89feb926a82157b9509228ab
refs/heads/master
2020-04-16T09:40:36.677997
2020-02-11T01:57:34
2020-02-11T01:57:34
165,473,113
0
0
null
null
null
null
UHC
C++
false
false
705
cpp
// 2019.06.30 // swExpertAcademy 2819 // [S/W 문제해결 기본] 1일차 - Flatten // 그냥 sort 문제 #include <stdio.h> #include <iostream> #include <utility> #include <vector> #include <algorithm> #include <functional> using namespace std; int total_dumped; int boxes[101]; int diff_h; int main(int argc, char * argv[]) { for (int t = 1; t <= 10; t++) { scanf("%d", &total_dumped); for (int i = 0; i < 100; i++) { scanf("%d", &boxes[i]); } while(total_dumped >= 0){ sort(boxes, boxes+100, greater<int>()); diff_h = boxes[0] - boxes[99]; if (diff_h <= 1) break; boxes[0]--; boxes[99]++; total_dumped--; } printf("#%d %d\n", t, diff_h); } return 0; }
[ "23fnsk23@naver.com" ]
23fnsk23@naver.com
f5cb2773362c6bf42666353554d6d0a7d983a8fd
18f0b70bc2fb7bd155bd32880589cd3dea0d696a
/ct_models/include/ct/models/QuadrotorWithLoad/generated/jacobians.impl.h
62ebb08e35028b90e72810e677d2494172b5046b
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
crisdeodates/Robotics-control-toolbox
8a791989a47ee0dd6bee0bdacdcbc3b2a3561021
7d36e42ff665c9f4b6c5f3e4ddce04a0ab41628a
refs/heads/v3.0.2
2023-06-10T22:38:41.718705
2021-07-05T08:23:09
2021-07-05T08:23:09
337,681,994
0
0
BSD-2-Clause
2021-07-05T13:25:34
2021-02-10T09:59:09
null
UTF-8
C++
false
false
1,317
h
template <typename TRAIT> iit::ct_quadrotor::tpl::Jacobians<TRAIT>::Jacobians () : fr_body_J_fr_ee() { updateParameters(); } template <typename TRAIT> void iit::ct_quadrotor::tpl::Jacobians<TRAIT>::updateParameters() { } template <typename TRAIT> iit::ct_quadrotor::tpl::Jacobians<TRAIT>::Type_fr_body_J_fr_ee::Type_fr_body_J_fr_ee() { (*this)(0,0) = 0; (*this)(1,0) = 0; (*this)(2,0) = 1.0; (*this)(2,1) = 0; (*this)(5,0) = 0; } template <typename TRAIT> const typename iit::ct_quadrotor::tpl::Jacobians<TRAIT>::Type_fr_body_J_fr_ee& iit::ct_quadrotor::tpl::Jacobians<TRAIT>::Type_fr_body_J_fr_ee::update(const JState& jState) { SCALAR sin__q_jA__; SCALAR sin__q_jB__; SCALAR cos__q_jA__; SCALAR cos__q_jB__; sin__q_jA__ = TRAIT::sin( jState(JA)); sin__q_jB__ = TRAIT::sin( jState(JB)); cos__q_jA__ = TRAIT::cos( jState(JA)); cos__q_jB__ = TRAIT::cos( jState(JB)); (*this)(0,1) = sin__q_jA__; (*this)(1,1) = - cos__q_jA__; (*this)(3,0) = ((- 0.7 * sin__q_jA__) * sin__q_jB__); (*this)(3,1) = (( 0.7 * cos__q_jA__) * cos__q_jB__); (*this)(4,0) = (( 0.7 * cos__q_jA__) * sin__q_jB__); (*this)(4,1) = (( 0.7 * sin__q_jA__) * cos__q_jB__); (*this)(5,1) = ( 0.7 * sin__q_jB__); return *this; }
[ "neunertm@gmail.com" ]
neunertm@gmail.com
9d2f43ddbd4335682d72cabeeddf9b343e3ad97b
e98cd32546b613d2a24457f70cd9bf440623e3af
/内部演示版本/性能/Coptermaster/coptermaster/AC_PID/AC_PID.h
f44f9310bfcec4812d3f8cbdd454f8423f55eb08
[]
no_license
Kimicz20/Lab603
5f9ea48c08ad28f2a09cf3d8c1fc56863b4d1ce3
44aac79c61fb8f6a31553c31ff545b4f68abb551
refs/heads/master
2021-01-23T03:27:17.809795
2017-08-13T12:42:01
2017-08-13T12:42:01
86,073,286
0
0
null
null
null
null
UTF-8
C++
false
false
3,754
h
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// @file AC_PID.h /// @brief Generic PID algorithm, with EEPROM-backed storage of constants. #ifndef __AC_PID_H__ #define __AC_PID_H__ #include "../AP_Common/AP_Common.h" #include "../AP_Param/AP_Param.h" #include <stdlib.h> #include <math.h> #include "../DataFlash/DataFlash.h" #define AC_PID_FILT_HZ_DEFAULT 20.0f // default input filter frequency #define AC_PID_FILT_HZ_MIN 0.01f // minimum input filter frequency /// @class AC_PID /// @brief Copter PID control class class AC_PID { public: // Constructor for PID AC_PID(float initial_p, float initial_i, float initial_d, float initial_imax, float initial_filt_hz, float dt); // set_dt - set time step in seconds void set_dt(float dt); // set_input_filter_all - set input to PID controller // input is filtered before the PID controllers are run // this should be called before any other calls to get_p, get_i or get_d void set_input_filter_all(float input); // set_input_filter_d - set input to PID controller // only input to the D portion of the controller is filtered // this should be called before any other calls to get_p, get_i or get_d void set_input_filter_d(float input); // get_pid - get results from pid controller float get_pid(); float get_pi(); float get_p(); float get_i(); float get_d(); // reset_I - reset the integrator void reset_I(); // reset_filter - input filter will be reset to the next value provided to set_input() void reset_filter(); // load gain from eeprom void load_gains(); // save gain to eeprom void save_gains(); /// operator function call for easy initialisation void operator() (float p, float i, float d, float imaxval, float input_filt_hz, float dt ); // get accessors float kP() const { return _kp.get(); } float kI() const { return _ki.get(); } float kD() const { return _kd.get(); } float imax() const { return _imax.get(); } float filt_hz() const { return _filt_hz.get(); } float get_filt_alpha() const; // set accessors void kP(const float v) { _kp.set(v); } void kI(const float v) { _ki.set(v); } void kD(const float v) { _kd.set(v); } void imax(const float v) { _imax.set(fabsf(v)); } void filt_hz(const float v); float get_integrator() const { return _integrator; } void set_integrator(float i) { _integrator = i; } // set the designed rate (for logging purposes) void set_desired_rate(float desired) { _pid_info.desired = desired; } const DataFlash_Class::PID_Info& get_pid_info(void) const { return _pid_info; } // parameter var table static const struct AP_Param::GroupInfo var_info[]; protected: // parameters AP_Float _kp; AP_Float _ki; AP_Float _kd; AP_Float _imax; AP_Float _filt_hz; // PID Input filter frequency in Hz // flags struct ac_pid_flags { bool _reset_filter : 1; // true when input filter should be reset during next call to set_input } _flags; // internal variables float _dt; // timestep in seconds float _integrator; // integrator value float _input; // last input for derivative float _derivative; // last derivative for low-pass filter DataFlash_Class::PID_Info _pid_info; }; #endif // __AC_PID_H__
[ "hz2z0421@163.com" ]
hz2z0421@163.com
c381d45e37a726f44de324560be3f644f5288dec
e4cafc579f6d612990f618d81604442302a6752d
/LeetCode-CPP/main.cpp
6ca0cfbf092abf13efc8c2a49e879219e919386d
[]
no_license
YanjieHe/AlgorithmsOJ
6f09b0332ea9cbfcd450aa0c10ea2d2ec69df6a5
e8b859dafa0085f9622cc794bcc30ac9306020fa
refs/heads/master
2020-03-23T13:58:54.938781
2018-09-22T16:21:54
2018-09-22T16:21:54
141,648,660
0
0
null
null
null
null
UTF-8
C++
false
false
144
cpp
#include "ConvertSortedListToBinarySearchTree.hpp" #include <iostream> using namespace std; int main() { Solution::test(); return 0; }
[ "heyanjie0@outlook.com" ]
heyanjie0@outlook.com
467fe40a5d35190d1199999621dc3628af5805ac
ef187d259d33e97c7b9ed07dfbf065cec3e41f59
/work/atcoder/abc/abc026/C/C.cpp
8db69856bd8b4e2e1f8d2d2a97c1c8967b29a609
[]
no_license
kjnh10/pcw
847f7295ea3174490485ffe14ce4cdea0931c032
8f677701bce15517fb9362cc5b596644da62dca8
refs/heads/master
2020-03-18T09:54:23.442772
2018-07-19T00:26:09
2018-07-19T00:26:09
134,586,379
0
0
null
null
null
null
UTF-8
C++
false
false
3,278
cpp
using namespace std; #include <iostream> #include <bits/stdc++.h> #define ten(n) ((int)1e##n) #define uni(x) x.erase(unique(all(x)),x.end()) // dump macro{{{ // http://www.creativ.xyz/dump-cpp-652 #define DUMPOUT cerr // 変数ダンプ先。coutかcerr #ifdef PCM // 引数はいくつでもどんな型でも可(ストリーム出力演算子があればOK) #define dump(...) DUMPOUT<<" "; \ DUMPOUT<<#__VA_ARGS__; \ DUMPOUT<<":=> "; \ dump_func(__VA_ARGS__); DUMPOUT<<"in ["<<__LINE__<<":"<<__FUNCTION__<<"]"<<endl; #define dump_1d(x,n) DUMPOUT <<" " \ <<#x<<"["<<#n<<"]"<<":=> {"; \ rep(i,n){ DUMPOUT << x[i] << (((i)==(n-1))?"}":", "); } DUMPOUT <<" in [" << __LINE__ << "]" << endl; #define dump_2d(x,n,m) DUMPOUT <<" " \ <<#x<<"["<<#n<<"]"<<"["<<#m<<"]"<<":=> \n"; \ rep(i,n)rep(j,m){ DUMPOUT << ((j==0)?" |":" ") << x[i][j] << (((j)==(m-1))?"|\n":" "); } \ DUMPOUT <<" in [" << __LINE__ << "]" << endl; #else #define dump(...) 42 #define dump_1d(...) 42 #define dump_2d(...) 42 #endif // デバッグ用変数ダンプ関数 void dump_func() { } template <class Head, class... Tail> void dump_func(Head&& head, Tail&&... tail) { DUMPOUT << head; if (sizeof...(Tail) == 0) { DUMPOUT << " "; } else { DUMPOUT << ", "; } dump_func(std::move(tail)...); } // vector出力 template<typename T> ostream& operator << (ostream& os, vector<T>& vec) { os << "{"; for (int i = 0; i<vec.size(); i++) { os << vec[i] << (i + 1 == vec.size() ? "" : ", "); } os << "}"; return os; }/*}}}*/ #define rep(i, x) for(int i = 0; i < (int)(x); i++)/*{{{*/ #define reps(i,x) for(int i = 1; i <= (int)(x); i++) #define rrep(i,x) for(int i=((int)(x)-1);i>=0;i--) #define rreps(i,x) for(int i=((int)(x));i>0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define RFOR(i, m, n) for(int i = m;i >= n;i--) #define foreach(x,a) for(auto& (x) : (a) ) #define all(x) (x).begin(),(x).end() #define sum(v) accumulate(all(v), 0) #define sz(x) ((int)(x).size()) #define fill(x,y) memset(x,y,sizeof(x)) #define pb(a) push_back(a) #define INF 2147483647 #define INFLL 1000000000000000000LL #define MOD 1000000007/*}}}*/ struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;/*{{{*/ typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<long long> vll; typedef vector<vll> vvll; typedef long double ld; typedef pair<int,int> pii; typedef vector<pii> vii; typedef vector<vii> vvii; typedef tuple<int,int,int> iii; typedef set<int> si; typedef complex<double> pnt; typedef vector<pnt> vpnt; typedef priority_queue<pii,vii,greater<pii> > spq; int dy[]={0, 0, 1, -1, 0}; int dx[]={1, -1, 0, 0, 0}; /*}}}*/ //-------------------------------------------------------------------------- vvi Buka; int bfs(int p){ if (sz(Buka[p])==0) { return 1; } if (sz(Buka[p])==1) { return bfs(Buka[p][0])*2+1; } int m = INF; int M = 0; rep(i, sz(Buka[p])){ m = min(bfs(Buka[p][i]), m); M = max(bfs(Buka[p][i]), M); dump(p, i, Buka[p][i]); } dump(m,M); return m+M+1; } int main() { int n;cin>>n; int p; rep(i, n){ Buka.pb({}); } reps(i, n-1){ cin>>p;p--; Buka[p].pb(i); } cout << bfs(0) << endl; return 0; }
[ "kojinho10@gmail.com" ]
kojinho10@gmail.com
a8d38c1ffe9ee97108eac272579c6bcb4d111854
b70200058f885a698d2062807f70a979a11fd626
/4일차/Engine/Engine/Object.h
1723b8d0f84e0365f5ed1dffb87d1cc887e9d6cc
[]
no_license
ParkSunW00/2020-GameProgramming
d906f797297d2f2a5ceb888eb7ce4612e5694ee4
3a114ffe12fcf50e703eabcf95e3784748a61d01
refs/heads/master
2022-12-01T06:24:08.385355
2020-08-14T07:41:58
2020-08-14T07:41:58
286,383,768
0
0
null
null
null
null
UTF-8
C++
false
false
696
h
#pragma once #include <d3dx9.h> #include <list> class Object { protected: Object* parent; D3DXMATRIX mat; D3DXVECTOR2 pos; D3DXVECTOR2 scalingCenter; D3DXVECTOR2 scale; D3DXVECTOR2 rotationCenter; float rotation; RECT rect; std::list<Object*> childList; public: Object(); ~Object(); virtual void Render(); virtual void Update(float dTime); void AddChild(Object* child); void RemoveChild(Object* child); bool IsCollisionRect(Object* object); bool IsPointInRect(D3DXVECTOR2 p); D3DXMATRIX getMat(); D3DXVECTOR2 getPos(); RECT getRect(); int getPosX(); int getPosY(); void setParent(Object* parnet); void setPos(int x, int y); void setPos(D3DXVECTOR2 pos); };
[ "jinwon11022@naver.com" ]
jinwon11022@naver.com
c4d86950b1bfb69d9f29b7e1be045f6ba90b1ca9
352345820069ad7044f08beed01229ad8e2fa82f
/vcl_source/rrVCLUtils.cpp
b0d070547b22c4946cef5f7e4e114f3c2cd9cebf
[ "Apache-2.0" ]
permissive
Alcibiades586/roadrunner
81731a4bbe88a027ea6b9e60a1e290ed452c1fcd
28ec33bcfc8f6929a62b0570c1c7cb9113e34ec2
refs/heads/master
2021-01-15T21:25:35.862307
2013-09-25T22:49:55
2013-09-25T22:49:55
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,071
cpp
#pragma hdrstop #include "rrVCLUtils.h" #include "rrUtils.h" //--------------------------------------------------------------------------- #pragma package(smart_init) namespace rr { using namespace std; using namespace rr; //Passing a NULL string, returns a empty std string.. string stdstr(const char* str) { return (str != NULL) ? string(str) : string(""); } string stdstr(const string& str) { return str; } string stdstr(const String& str) { return stdstr(wstring(str.c_str())); } string stdstr( const std::wstring& str ) { ostringstream stm; const ctype<char>& ctfacet = use_facet< ctype<char> >( stm.getloc() ); for( size_t i=0 ; i<str.size() ; ++i ) { stm << ctfacet.narrow( str[i], 0 ); } return stm.str() ; } String vclstr(const std::string& s) { return String( s.c_str(), s.length() ); } String vclstr(const std::ostringstream& s) { return vclstr(s.str()); } StringList getCheckedItems(TCheckListBox* listBox) { //Go trough the listbox and return checked items StringList checked; for(int i = 0; i < listBox->Count; i++) { if(listBox->Checked[i]) { String anItem = listBox->Items->Strings[i]; checked.add(stdstr(anItem)); } } return checked; } void addItemsToListBox(const rr::StringList& items, TCheckListBox *lb, bool checked) { for(int i = 0; i < items.Count(); i++) { int index = lb->Items->Add(items[i].c_str()); lb->Checked[index] = checked; } } void addItemsToListBox(const rr::StringList& items, TListBox *lb) { for(int i = 0; i < items.Count(); i++) { int index = lb->Items->Add(items[i].c_str()); } } int populateDropDown(set<string>& files, TComboBox *CB) { //Populate the drop down. CB->Clear(); set<string>::iterator it = files.begin(); for (; it != files.end(); ++it) { string file = getFileNameNoExtension(*it); CB->Items->Add(file.c_str()); } return files.size(); } }
[ "tottek@gmail.com@c0027639-9190-0b57-01eb-f09a03790dae" ]
tottek@gmail.com@c0027639-9190-0b57-01eb-f09a03790dae
7e785f9df7cbec9e0c567bcdea5214a5d1c38f56
0e16849aa88fbcf491119e34e8af1d642af354b2
/r_defs.h
bbd4b211d388c4a0535745ce610c95479334a75d
[]
no_license
derek57/psp-doom
09863f5914325151bf6c50f872c40662e68f21ec
b1286965b0dac623c672ff7beca7ab08388b6d8f
refs/heads/master
2021-01-20T12:37:36.224022
2014-11-18T10:16:56
2014-11-18T10:16:56
32,111,288
3
0
null
null
null
null
UTF-8
C++
false
false
8,552
h
// Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard // // 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 2 // 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, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. // // DESCRIPTION: // Refresh/rendering module, shared data struct definitions. // //----------------------------------------------------------------------------- #ifndef __R_DEFS__ #define __R_DEFS__ // Screenwidth. #include "doomdef.h" // Some more or less basic data types // we depend on. #include "m_fixed.h" // We rely on the thinker data struct // to handle sound origins in sectors. #include "d_think.h" // SECTORS do store MObjs anyway. #include "p_mobj.h" #include "i_video.h" #include "v_patch.h" // Silhouette, needed for clipping Segs (mainly) // and sprites representing things. #define SIL_NONE 0 #define SIL_BOTTOM 1 #define SIL_TOP 2 #define SIL_BOTH 3 #define MAXDRAWSEGS 256 // // INTERNAL MAP TYPES // used by play and refresh // // // Your plain vanilla vertex. // Note: transformed values not buffered locally, // like some DOOM-alikes ("wt", "WebView") did. // typedef struct { fixed_t x; fixed_t y; } vertex_t; // Forward of LineDefs, for Sectors. struct line_s; // Each sector has a degenmobj_t in its center // for sound origin purposes. // I suppose this does not handle sound from // moving objects (doppler), because // position is prolly just buffered, not // updated. typedef struct { thinker_t thinker; // not used for anything fixed_t x; fixed_t y; fixed_t z; } degenmobj_t; // // The SECTORS record, at runtime. // Stores things/mobjs. // typedef struct { fixed_t floorheight; fixed_t ceilingheight; short floorpic; short ceilingpic; short lightlevel; short special; short tag; // 0 = untraversed, 1,2 = sndlines -1 int soundtraversed; // thing that made a sound (or null) mobj_t* soundtarget; // mapblock bounding box for height changes int blockbox[4]; // origin for any sounds played by the sector degenmobj_t soundorg; // if == validcount, already checked int validcount; // list of mobjs in sector mobj_t* thinglist; // thinker_t for reversable actions void* specialdata; int linecount; struct line_s** lines; // [linecount] size } sector_t; // // The SideDef. // typedef struct { // add this to the calculated texture column fixed_t textureoffset; // add this to the calculated texture top fixed_t rowoffset; // Texture indices. // We do not maintain names here. short toptexture; short bottomtexture; short midtexture; // Sector the SideDef is facing. sector_t* sector; } side_t; // // Move clipping aid for LineDefs. // typedef enum { ST_HORIZONTAL, ST_VERTICAL, ST_POSITIVE, ST_NEGATIVE } slopetype_t; typedef struct line_s { // Vertices, from v1 to v2. vertex_t* v1; vertex_t* v2; // Precalculated v2 - v1 for side checking. fixed_t dx; fixed_t dy; // Animation related. short flags; short special; short tag; // Visual appearance: SideDefs. // sidenum[1] will be -1 if one sided short sidenum[2]; // Neat. Another bounding box, for the extent // of the LineDef. fixed_t bbox[4]; // To aid move clipping. slopetype_t slopetype; // Front and back sector. // Note: redundant? Can be retrieved from SideDefs. sector_t* frontsector; sector_t* backsector; // if == validcount, already checked int validcount; // thinker_t for reversable actions void* specialdata; } line_t; // // A SubSector. // References a Sector. // Basically, this is a list of LineSegs, // indicating the visible walls that define // (all or some) sides of a convex BSP leaf. // typedef struct subsector_s { sector_t* sector; short numlines; short firstline; } subsector_t; // // The LineSeg. // typedef struct { vertex_t* v1; vertex_t* v2; fixed_t offset; angle_t angle; side_t* sidedef; line_t* linedef; // Sector references. // Could be retrieved from linedef, too. // backsector is NULL for one sided lines sector_t* frontsector; sector_t* backsector; } seg_t; // // BSP node. // typedef struct { // Partition line. fixed_t x; fixed_t y; fixed_t dx; fixed_t dy; // Bounding box for each child. fixed_t bbox[2][4]; // If NF_SUBSECTOR its a subsector. unsigned short children[2]; } node_t; // PC direct to screen pointers //B UNUSED - keep till detailshift in r_draw.c resolved //extern byte* destview; //extern byte* destscreen; // // OTHER TYPES // // This could be wider for >8 bit display. // Indeed, true color support is posibble // precalculating 24bpp lightmap/colormap LUT. // from darkening PLAYPAL to all black. // Could even us emore than 32 levels. typedef byte lighttable_t; // // ? // typedef struct drawseg_s { seg_t* curline; int x1; int x2; fixed_t scale1; fixed_t scale2; fixed_t scalestep; // 0=none, 1=bottom, 2=top, 3=both int silhouette; // do not clip sprites above this fixed_t bsilheight; // do not clip sprites below this fixed_t tsilheight; // Pointers to lists for sprite clipping, // all three adjusted so [x1] is first value. short* sprtopclip; short* sprbottomclip; short* maskedtexturecol; } drawseg_t; // A vissprite_t is a thing // that will be drawn during a refresh. // I.e. a sprite object that is partly visible. typedef struct vissprite_s { // Doubly linked list. struct vissprite_s* prev; struct vissprite_s* next; int x1; int x2; // for line side calculation fixed_t gx; fixed_t gy; // global bottom / top for silhouette clipping fixed_t gz; fixed_t gzt; // horizontal position of x1 fixed_t startfrac; fixed_t scale; // negative if flipped fixed_t xiscale; fixed_t texturemid; int patch; // for color translation and shadow draw, // maxbright frames as well lighttable_t* colormap; int mobjflags; } vissprite_t; // // Sprites are patches with a special naming convention // so they can be recognized by R_InitSprites. // The base name is NNNNFx or NNNNFxFx, with // x indicating the rotation, x = 0, 1-7. // The sprite and frame specified by a thing_t // is range checked at run time. // A sprite is a patch_t that is assumed to represent // a three dimensional object and may have multiple // rotations pre drawn. // Horizontal flipping is used to save space, // thus NNNNF2F5 defines a mirrored patch. // Some sprites will only have one picture used // for all views: NNNNF0 // typedef struct { // If false use 0 for any position. // Note: as eight entries are available, // we might as well insert the same name eight times. boolean rotate; // Lump to use for view angles 0-7. short lump[8]; // Flip bit (1 = flip) to use for view angles 0-7. byte flip[8]; } spriteframe_t; // // A sprite definition: // a number of animation frames. // typedef struct { int numframes; spriteframe_t* spriteframes; } spritedef_t; // // Now what is a visplane, anyway? // typedef struct { fixed_t height; int picnum; int lightlevel; int minx; int maxx; // leave pads for [minx-1]/[maxx+1] byte pad1; // Here lies the rub for all // dynamic resize/change of resolution. byte top[SCREENWIDTH]; byte pad2; byte pad3; // See above. byte bottom[SCREENWIDTH]; byte pad4; } visplane_t; #endif
[ "vermillion57@e7163ed3-fc1d-de10-b724-2a9d26b79ad1" ]
vermillion57@e7163ed3-fc1d-de10-b724-2a9d26b79ad1
bc5cc74f00787afe585633f2033c5da855b465f0
e9c499c8ea74fd45f30c340249dcc0ac7cd3ff43
/chapter03_04/spreadsheet.cc
eb0619ab18c12c5b0e7978b49180ea086e1937a6
[]
no_license
Nunocky/Qt_Study
f56644e83158ca432853984e895450caa1d7bdcc
422615211b2bc50f0c31e12305171950ceef162e
refs/heads/master
2021-03-14T10:45:55.452288
2020-03-17T07:23:18
2020-03-17T07:23:18
246,759,993
0
0
null
null
null
null
UTF-8
C++
false
false
7,654
cc
#include <QtGui> #include <QtWidgets> #include "cell.h" #include "spreadsheet.h" SpreadSheet::SpreadSheet(QWidget *parent) : QTableWidget(parent) { autoRecalc = true; setItemPrototype(new Cell); setSelectionMode(ContiguousSelection); connect(this, SIGNAL(itemChanged(QTableWidgetItem*)), this, SLOT(somethingChanged())); clear(); } QString SpreadSheet::currentLocation() const { return QChar('A' + currentColumn()) + QString::number(currentRow() + 1); } QString SpreadSheet::currentFormula() const { return formula(currentRow(), currentColumn()); } QTableWidgetSelectionRange SpreadSheet::selectedRange() const { QList<QTableWidgetSelectionRange> ranges = selectedRanges(); if (ranges.isEmpty()) { return QTableWidgetSelectionRange(); } return ranges.first(); } void SpreadSheet::clear() { setRowCount(0); setColumnCount(0); setRowCount(RowCount); setColumnCount(ColumnCount); for (int i=0; i<ColumnCount; ++i) { QTableWidgetItem *item = new QTableWidgetItem; item->setText(QString(QChar('A' + i))); setHorizontalHeaderItem(i, item); } setCurrentCell(0, 0); } bool SpreadSheet::readFile(const QString &fileName) { QFile file(fileName); if (!file.open(QIODevice::ReadOnly)) { QMessageBox::warning(this, tr("Spreadsheet"), tr("Cannot read file %1:\n%2.").arg(file.fileName()).arg(file.errorString())); return false; } QDataStream in(&file); in.setVersion(QDataStream::Qt_4_1); quint32 magic; in >> magic; if (magic != MagicNumber) { QMessageBox::warning(this, tr("Spreadsheet"), tr("The file is not a Spreadsheet file.")); return false; } clear(); quint16 row; quint16 column; QString str; QApplication::setOverrideCursor(Qt::WaitCursor); while(!in.atEnd()) { in >> row >> column >> str; setFormula(row, column, str); } QApplication::restoreOverrideCursor(); return true; } bool SpreadSheet::writeFile(const QString &fileName) { QFile file(fileName); if (!file.open(QIODevice::WriteOnly)) { QMessageBox::warning(this, tr("Spreadsheet"), tr("Cannot write file %1:\n%2.").arg(file.fileName()).arg(file.errorString())); return false; } QDataStream out(&file); out.setVersion(QDataStream::Qt_4_1); out << quint32(MagicNumber); QApplication::setOverrideCursor(Qt::WaitCursor); for (int row = 0; row < RowCount; ++row) { for(int column=0; column<ColumnCount; ++column) { QString str = formula(row, column); if(!str.isEmpty()) { out << quint16(row) << quint16(column) << str; } } } QApplication::restoreOverrideCursor(); return true; } void SpreadSheet::sort(const SpreadsheetCompare &compare) { QList<QStringList> rows; QTableWidgetSelectionRange range = selectedRange(); int i; for (i=0; i<range.rowCount(); ++i) { QStringList row; for(int j=0; j< range.columnCount(); ++j) { row.append(formula(range.topRow()+i, range.leftColumn()+j)); } rows.append(row); } qStableSort(rows.begin(), rows.end(), compare); for(i=0; i<range.rowCount(); ++i) { for(int j=0; j<range.columnCount(); ++j) { setFormula(range.topRow() + i, range.leftColumn() + j, rows[i][j]); } } clearSelection(); somethingChanged(); } void SpreadSheet::cut() { copy(); del(); } void SpreadSheet::copy() { QTableWidgetSelectionRange range = selectedRange(); QString str; for(int i=0; i<range.rowCount(); ++i) { if (i>0) { str += "\n"; } for(int j=0; j<range.columnCount(); ++j) { if (j>0) { str += "\t"; } str += formula(range.topRow()+i, range.leftColumn()+j); } } QApplication::clipboard()->setText(str); } void SpreadSheet::paste() { QTableWidgetSelectionRange range = selectedRange(); QString str = QApplication::clipboard()->text(); QStringList rows = str.split('\n'); int numRows = rows.count(); int numColumns = rows.first().count('\t') + 1; if (range.rowCount() * range.columnCount() != 1 && (range.rowCount() != numRows || range.columnCount() != numColumns)) { QMessageBox::information(this, tr("Spreadsheet"), tr("The information cannot be pasted because the copy and paste areas aren't the same size.")); return; } for(int i=0; i<numRows; ++i) { QStringList columns = rows[i].split('\t'); for(int j=0; j<numColumns; ++j) { int row = range.topRow() + i; int column = range.leftColumn() + j; if (row < RowCount && column < ColumnCount) { setFormula(row, column, columns[j]); } } } somethingChanged(); } void SpreadSheet::del() { QList<QTableWidgetItem*> items = selectedItems(); if (!items.isEmpty()) { foreach(QTableWidgetItem *item, items) { delete item; } somethingChanged(); } } void SpreadSheet::selectCurrentRow() { selectRow(currentRow()); } void SpreadSheet::selectCurrentColumn() { selectColumn(currentColumn()); } void SpreadSheet::recalculate() { for(int row = 0; row < RowCount; ++row) { for(int column = 0; column < ColumnCount; ++column) { if (cell(row, column)) { cell(row, column)->setDirty(); } } } viewport()->update(); } void SpreadSheet::setAutoRecalculate(bool recalc) { autoRecalc = recalc; if (autoRecalc) { recalculate(); } } void SpreadSheet::findNext(const QString &str, Qt::CaseSensitivity cs) { int row = currentRow(); int column = currentColumn() + 1; while (row < RowCount) { while (column < ColumnCount) { if (text(row, column).contains(str, cs)) { clearSelection(); setCurrentCell(row, column); activateWindow(); return; } ++column; } column = 0; ++row; } QApplication::beep(); } void SpreadSheet::findPrev(const QString &str, Qt::CaseSensitivity cs) { int row = currentRow(); int column = currentColumn() - 1; while (row >= 0) { while (column >= 0) { if (text(row, column).contains(str, cs)) { clearSelection(); setCurrentCell(row, column); activateWindow(); return; } --column; } column = ColumnCount - 1; --row; } QApplication::beep(); } void SpreadSheet::somethingChanged() { if (autoRecalc) { recalculate(); } emit modified(); } Cell* SpreadSheet::cell(int row, int column) const { return static_cast<Cell*>(item(row, column)); } QString SpreadSheet::text(int row, int column) const { Cell *c = cell(row, column); if (c) { return c->text(); } else { return ""; } } QString SpreadSheet::formula(int row, int column) const { Cell *c = cell(row, column); if (c) { return c->formula(); } else { return ""; } } void SpreadSheet::setFormula(int row, int column, const QString &formula) { Cell *c = cell(row, column); if (!c) { c = new Cell; setItem(row, column, c); } c->setFormula(formula); } //-------------------------------------------------------------------------------- bool SpreadsheetCompare::operator() (const QStringList &row1, const QStringList &row2) const { for(int i=0; i<KeyCount; ++i) { int column = keys[i]; if (column != -1) { if (row1[column] != row2[column]) { if (ascending[i]) { return row1[column] < row2[column]; } else { return row1[column] > row2[column]; } } } } return false; }
[ "masato.nunokawa@gmail.com" ]
masato.nunokawa@gmail.com
3cda11b5d85bfc7c189bdbd83c24f7a93f900a60
8f74f2f4b04d56a6b11c85474233199774378018
/cpp/023_merge_k_sorted_lists.cpp
48cf92fa3dcb9f061ab3895e7a2f3d80868dcf06
[]
no_license
hatchercode/leetcode-1
c602c0afc2636c2acc786542caf94aa2d44526d9
febf424951d1e193815699c6e760823530ef3185
refs/heads/master
2021-07-13T17:52:33.446183
2017-10-19T04:39:11
2017-10-19T04:39:11
null
0
0
null
null
null
null
UTF-8
C++
false
false
936
cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* mergeKLists(vector<ListNode*>& lists) { ListNode *dummy = new ListNode(0); ListNode *l = dummy; auto cmp = [](ListNode *left, ListNode *right) { return left->val > right->val;}; std::priority_queue<ListNode*, vector<ListNode*>, decltype(cmp)> pqueue(cmp); for (auto &pl : lists) { if (pl != nullptr) { pqueue.push(pl); } } ListNode *tmp; while (!pqueue.empty()) { tmp = pqueue.top(); pqueue.pop(); l->next = tmp; l = l->next; tmp = tmp->next; if (tmp != nullptr) pqueue.push(tmp); } return dummy->next; } };
[ "lhhtsinghua@gmail.com" ]
lhhtsinghua@gmail.com
91ee1b6e9c5fb97bf88df6c2b2bd22fd425c2908
e7e497b20442a4220296dea1550091a457df5a38
/java_workplace/oce-tools/CxxTest/test_env.h
1df4376b5f587fd2da0e42866881b1d31d1d0ad1
[]
no_license
gunner14/old_rr_code
cf17a2dedf8dfcdcf441d49139adaadc770c0eea
bb047dc88fa7243ded61d840af0f8bad22d68dee
refs/heads/master
2021-01-17T18:23:28.154228
2013-12-02T23:45:33
2013-12-02T23:45:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
969
h
#include <iostream> #include <stdlib.h> using namespace std; void test_env(){ cout << ">>>>>>>>>>>>>>>>>>>>>>>>>>>> [test_env] >>>>>>>>>>>>>>>>>>>>>>>>>>>>" << endl; cout << "[test_env] 函数名: getenv" << endl; cout << "[test_env] 头文件: <stdlib.h>" << endl; cout << "[test_env] 用 法: char *getenv(char *envvar);" << endl; cout << "[test_env] 说 明: 用来取得参数enwar环境变量的内容。enwar为环境变量的名称,存在则会返回指向该内容的指针。环境变量的格式为enwar=value" << endl; cout << "[test_env] 返回值: 执行成功则返回指向该内容的指针,找不到符合的环境变量名称则返回NULL" << endl; cout << endl; cout << "[test_env] testing >>>>>>>>>>" << endl; ////////////////////// char *s; s=getenv("JAVA_HOME"); printf( "[test_env] JAVA_HOME = %s\n",s ); cout << "[test_env] ICE_HOME = " << getenv("ICE_HOME") << endl; cout << endl; ////////////////////// }
[ "liyong19861014@gmail.com" ]
liyong19861014@gmail.com
54c90321560cbe31b32f312fb7fcd1d0c5db2098
334558bf31b6a8fd3caaf09c24898ff331c7e2da
/GenieWindow/plugins/GeniePlugin_LPC/code/UUPages.cpp
eb9e45f5e118fe3f287b2dfbbcda64d43af68e9a
[]
no_license
roygaogit/Bigit_Genie
e38bac558e81d9966ec6efbdeef0a7e2592156a7
936a56154a5f933b1e9c049ee044d76ff1d6d4db
refs/heads/master
2020-03-31T04:20:04.177461
2013-12-09T03:38:15
2013-12-09T03:38:15
null
0
0
null
null
null
null
UTF-8
C++
false
false
13,094
cpp
#include "UUPages.h" #include <QtGui/QKeyEvent> #include <QtGui/QMovie> namespace LPCUserUtility { StartupPage::StartupPage(QWidget *parent) : NavPage(parent) { } StartupPage::~StartupPage() { } void StartupPage::onLoad() { m_movieLabel = qFindChild<QLabel*>(this, QString::fromUtf8("movieLabel")); m_statusLabel = qFindChild<QLabel*>(this, QString::fromUtf8("statusLabel")); m_errorLabel = qFindChild<QLabel*>(this, QString::fromUtf8("errorLabel")); m_movie = new QMovie(QString::fromUtf8(":/LPCModule/images/icon_working.gif"), "gif", m_movieLabel); m_movieLabel->setMovie(m_movie); m_movie->start(); m_errorLabel->hide(); setLPCText(m_statusLabel, "Status: detecting the router"); m_op = CoreApi::beginDetectRouter(nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onDetectRouterFinished())); } void StartupPage::onDetectRouterFinished() { m_op->deleteLater(); int routerError = m_op->property("UURouterError").toInt(); if (routerError == UURouterError_NoError) { appData()->m_mac = m_op->property("varMac").toByteArray(); if (appData()->m_routerUsername.isEmpty()) { appData()->m_routerUsername = AppData::DEFAULT_ROUTER_USERNAME; if (appData()->m_routerPassword.isEmpty()) { appData()->m_routerPassword = AppData::DEFAULT_ROUTER_PASSWORD; } } if (appData()->m_soapAction.isEmpty()) { m_op = CoreApi::beginAutoRouterAuthenticate(appData()->m_routerUsername, appData()->m_routerPassword, nam(), this); } else { m_op = RouterApi::beginAuthenticate(appData()->m_routerUsername, appData()->m_routerPassword, appData()->m_soapAction, nam(), this); } connect(m_op, SIGNAL(finished()), SLOT(onRouterAuthFinished())); } else { handleRouterError(routerError); } } void StartupPage::handleRouterError(int error) { switch (error) { case UURouterError_NoRouter: displayError("Error: could not detect the router", UUWebsiteError_NoRouter, true); break; case UURouterError_NoNetwork: displayError("Error: Internet connection not found", UUWebsiteError_NoNetwork, true); break; case UURouterError_ParentalControlNotEnabled: displayError("Error: Parental Controls not enabled on this router", UUWebsiteError_ParentalControlNotEnabled, true); break; case UURouterError_NoDefaultDeviceId: displayError("Error: We have detected a router change. Please restart the User Utility", UUWebsiteError_NoDefaultDeviceId, true); break; case UURouterError_InvalidRouterPassword: navigateTo("RouterPassword"); break; case UURouterError_Unknown: default: navigateTo("StartupLongError"); break; } } void StartupPage::displayError(const char *msg, int webError, bool stopProgress) { if (webError == UUWebsiteError_NoError) { // TODO: color m_errorLabel->hide(); } else { QByteArray url; url.append("http://netgear.opendns.com/support/switch/error"); url.append(QString::fromUtf8("%1").arg(webError).toUtf8()); m_errorLabel->setProperty("LPCTextURL", QByteArray(url)); setLPCText(m_errorLabel, "Learn more about this error", false); m_errorLabel->show(); } setLPCText(m_statusLabel, msg); if (stopProgress) { m_movie->stop(); m_movieLabel->hide(); } else { m_movie->start(); m_movieLabel->show(); } } void StartupPage::onRouterAuthFinished() { m_op->deleteLater(); int routerError = m_op->property("UURouterError").toInt(); if (routerError == UURouterError_NoError) { QVariant varSoapAction = m_op->property("varSoapAction"); if (varSoapAction.isValid()) { appData()->m_soapAction = varSoapAction.toString(); } m_op = CoreApi::beginWrappedGetParentalControlEnableStatus(appData()->m_soapAction, nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onGetLPCEnableStatusFinished())); } else { handleRouterError(routerError); } } void StartupPage::onGetLPCEnableStatusFinished() { m_op->deleteLater(); QVariant varParentalControlStatus = m_op->property("varParentalControlStatus"); if (varParentalControlStatus.isValid() && varParentalControlStatus.toBool()) { m_op = CoreApi::beginWrappedGetDNSMasqDeviceID(QString::fromUtf8("default"), appData()->m_soapAction, nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onGetDefaultIdFinished())); } else { handleRouterError(UURouterError_ParentalControlNotEnabled); } } void StartupPage::onGetDefaultIdFinished() { m_op->deleteLater(); QString parentDeviceID = m_op->property("varDeviceID").toString(); if (!parentDeviceID.isEmpty()) { appData()->setParentDeviceId(parentDeviceID); m_op = CoreApi::beginWrappedGetDNSMasqDeviceID(appData()->m_mac, appData()->m_soapAction, nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onGetChildIdFinished())); } else { handleRouterError(UURouterError_NoDefaultDeviceId); } } void StartupPage::onGetChildIdFinished() { m_op->deleteLater(); appData()->setChildDeviceId(m_op->property("varDeviceID").toString()); displayError("Status: downloading accounts information", UUWebsiteError_NoError, false); m_op = WebApi::beginGetUserForChildDeviceId(appData()->childDeviceId(), nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onGetUserForChildFinished())); } void StartupPage::onGetUserForChildFinished() { m_op->deleteLater(); appData()->setUserName(m_op->property("varUserName").toString()); m_op = WebApi::beginGetUsersForDeviceId(appData()->parentDeviceId(), nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onGetUsersFinished())); } void StartupPage::onGetUsersFinished() { m_op->deleteLater(); if (m_op->result().toInt() == WTFStatus_NoError) { QStringList userList = m_op->property("varList").toStringList(); if (!userList.isEmpty()) { appData()->m_userList = userList; if (appData()->userName().isEmpty()) { navigateTo("Main"); } else { App::instance()->setLoginState(true); navigateTo("Status"); } } else { displayError("Error: no user accounts configured for this device", UUWebsiteError_NoUserAccountsConfigured, true); } } else { displayError("Error: couldn't download information about user accounts", UUWebsiteError_FailedDownloadUserAccounts, true); } } InfoNoticePage::InfoNoticePage(QWidget *parent) : NavPage(parent) { } InfoNoticePage::~InfoNoticePage() { } void InfoNoticePage::onLoad() { m_movieLabel = qFindChild<QLabel*>(this, QString::fromUtf8("movieLabel")); m_statusLabel = qFindChild<QLabel*>(this, QString::fromUtf8("statusLabel")); m_movie = new QMovie(QString::fromUtf8(":/LPCModule/images/icon_working.gif"), "gif", m_movieLabel); m_movieLabel->setMovie(m_movie); m_movie->start(); switch (appData()->m_opMode) { case AppData::Mode_LogIn: loginAction(); break; case AppData::Mode_LogOut: logoutAction(); break; } } void InfoNoticePage::loginAction() { setLPCText(m_statusLabel, "Status: logging in..."); m_op = WebApi::beginGetDeviceChild(appData()->parentDeviceId(), appData()->userName(), appData()->m_webPassword, nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onWebLoginFinished())); } void InfoNoticePage::onWebLoginFinished() { m_op->deleteLater(); int result = m_op->result().toInt(); if (result == WTFStatus_NoError) { appData()->setChildDeviceId(m_op->property("varChildDeviceId").toString()); m_op = RouterApi::beginAuthenticate(appData()->m_routerUsername, appData()->m_routerPassword, appData()->m_soapAction, nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onAuthRouterFinished())); } else if (result == WTFStatus_AuthenticationFailed) { App::instance()->showMessage(ttt("You have entered an incorrect password for user %1. Please try again.").arg(appData()->userName())); navigateTo("Main"); } else { App::instance()->showMessage(ttt("Failed to obtain user accounts.")); navigateTo("Main"); } } void InfoNoticePage::onAuthRouterFinished() { m_op->deleteLater(); int result = m_op->result().toInt(); if (result == WTFStatus_NoError) { m_op = CoreApi::beginWrappedSetDNSMasqDeviceID(appData()->m_mac, appData()->childDeviceId(), appData()->m_soapAction, nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onSetMasqIDFinished())); } else { App::instance()->showMessage(ttt("Failed to associate with router. Please reconnect your router and/or restart the User Utility")); } } void InfoNoticePage::onSetMasqIDFinished() { m_op->deleteLater(); int result = m_op->result().toInt(); if (result == WTFStatus_NoError) { App::instance()->setLoginState(true); //App::instance()->showMessage(ttt("You've logged in succesfully as %1").arg(appData()->userName())); //deactivateUI(); navigateTo("Status"); } else { App::instance()->showMessage(ttt("Failed to associate with router. Please reconnect your router and/or restart the User Utility")); } } void InfoNoticePage::logoutAction() { setLPCText(m_statusLabel, "Status: logging out..."); m_op = RouterApi::beginAuthenticate(appData()->m_routerUsername, appData()->m_routerPassword, appData()->m_soapAction, nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onAuthRouterFinished2())); } void InfoNoticePage::onAuthRouterFinished2() { m_op->deleteLater(); int result = m_op->result().toInt(); if (result == WTFStatus_NoError) { m_op = CoreApi::beginWrappedDeleteMacAddress(appData()->m_mac, appData()->m_soapAction, nam(), this); connect(m_op, SIGNAL(finished()), SLOT(onDeleteMacFinished())); } else { navigateTo("StartupLongError"); } } void InfoNoticePage::onDeleteMacFinished() { m_op->deleteLater(); int result = m_op->result().toInt(); if (result == WTFStatus_NoError) { App::instance()->setLoginState(false); navigateTo("Status"); } else { navigateTo("StartupLongError"); } } MainPage::MainPage(QWidget *parent) : NavPage(parent) { } MainPage::~MainPage() { } void MainPage::onLoad() { m_accountList = qFindChild<QListWidget*>(this, QString::fromUtf8("accountList")); m_passwordEdit = qFindChild<QLineEdit*>(this, QString::fromUtf8("passwordEdit")); m_loginButton = qFindChild<QPushButton*>(this, QString::fromUtf8("loginButton")); m_accountList->addItems(appData()->m_userList); connect(m_accountList, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(onListItemChanged(QListWidgetItem*,QListWidgetItem*))); m_loginButton->setEnabled(false); if (m_accountList->count() > 0) { m_accountList->setCurrentRow(0); } m_passwordEdit->setFocus(); } void MainPage::doLogin() { appData()->setUserName(m_accountList->currentItem()->text()); appData()->m_webPassword = m_passwordEdit->text(); appData()->m_opMode = AppData::Mode_LogIn; navigateTo("InfoNotice"); } void MainPage::onListItemChanged(QListWidgetItem *current, QListWidgetItem *previous) { m_loginButton->setEnabled(current != NULL); } RouterPasswordPage::RouterPasswordPage(QWidget *parent) : NavPage(parent) { } RouterPasswordPage::~RouterPasswordPage() { } void RouterPasswordPage::onLoad() { m_usernameEdit = qFindChild<QLineEdit*>(this, QString::fromUtf8("usernameEdit")); m_passwordEdit = qFindChild<QLineEdit*>(this, QString::fromUtf8("passwordEdit")); m_okButton = qFindChild<QPushButton*>(this, QString::fromUtf8("okButton")); connect(m_usernameEdit, SIGNAL(textChanged(const QString&)), SLOT(onTextChanged(const QString&))); connect(m_passwordEdit, SIGNAL(textChanged(const QString&)), SLOT(onTextChanged(const QString&))); m_usernameEdit->setText(appData()->m_routerUsername); } void RouterPasswordPage::keyPressEvent(QKeyEvent *e) { if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) { if (focusWidget() == m_usernameEdit) { m_passwordEdit->setFocus(); return; } if (focusWidget() == m_passwordEdit) { m_okButton->click(); return; } } return NavPage::keyPressEvent(e); } void RouterPasswordPage::nextPage() { appData()->m_routerUsername = m_usernameEdit->text(); appData()->m_routerPassword = m_passwordEdit->text(); navigateTo("Startup"); } void RouterPasswordPage::onTextChanged(const QString& text) { m_okButton->setDisabled(m_usernameEdit->text().isEmpty() || m_passwordEdit->text().isEmpty()); } StatusPage::StatusPage(QWidget *parent) : NavPage(parent) { } StatusPage::~StatusPage() { } void StatusPage::onLoad() { m_statusLabel = qFindChild<QLabel*>(this, QString::fromUtf8("statusLabel")); m_actionButton = qFindChild<QPushButton*>(this, QString::fromUtf8("actionButton")); if (appData()->m_loggedIn) { setLPCText(m_statusLabel, "You're logged in."); m_statusLabel->setText(ttt("You're logged in as %1.").arg(appData()->userName())); setLPCText(m_actionButton, "Log out"); } else { setLPCText(m_statusLabel, "You are not logged in."); setLPCText(m_actionButton, "Login"); } } void StatusPage::retranslateUI() { NavPage::retranslateUI(); if (appData()->m_loggedIn) { m_statusLabel->setText(ttt("You're logged in as %1.").arg(appData()->userName())); } } void StatusPage::onPageAction() { if (appData()->m_loggedIn) { appData()->m_opMode = AppData::Mode_LogOut; navigateTo("InfoNotice"); } else { navigateTo("Main"); } } StartupLongErrorPage::StartupLongErrorPage(QWidget *parent) : NavPage(parent) { } StartupLongErrorPage::~StartupLongErrorPage() { } } // namespace LPCUserUtility
[ "raylq@qq.com" ]
raylq@qq.com
8ecf287b184e36db620af8a8bb341ebc071b0dde
f5f87325b0ab9253382a60d93f8c19e25c12ee75
/quiz/1/5/src.cpp
8d5407f56df4fa33ed0e1ff432a98a9162bacab8
[]
no_license
ysuzuki19/cpp
cf1786808ccda0ad43a42fbbdf5cba93f1312d93
f436584e588772560478b0ae442c59212efebb79
refs/heads/master
2020-04-29T20:52:23.903518
2019-11-28T10:02:44
2019-11-28T10:02:44
176,395,778
0
0
null
null
null
null
UTF-8
C++
false
false
936
cpp
#include <iostream> #include <vector> #include <genVector.hpp> #include <template.hpp> constexpr size_t arSize = 50; constexpr int rndMax = 100; using namespace std; int main(int argc, char **argv) { vector<string> args(argv, argv+argc); auto v = genVectorByRandom(arSize, rndMax); debug(v); auto vTemp = v; sort(vTemp.begin(), vTemp.end()); map<int, int> duplicateMap; size_t i, j; for(i=0; i<vTemp.size()-1; ++i){ for(j=i; vTemp[i]==vTemp[j]; ++j){} if(vTemp[i] == vTemp[i+1]) duplicateMap.emplace(vTemp[i], j-i); i = j - 1; } for(auto& e : duplicateMap) e.second = e.second - 1; for(i=v.size()-1; i<v.size(); --i){ auto itr = duplicateMap.find(v[i]); if(itr!=duplicateMap.end()){ if(duplicateMap[v[i]]!=0){ duplicateMap[v[i]] = duplicateMap[v[i]]-1; v.erase(v.begin()+i); } } } cout << "duplicate number was erased!" << endl; debug(v); return 0; }
[ "msethuuh7@i.softbank.jp" ]
msethuuh7@i.softbank.jp
b108df5039f1a0f7ea017bec5323ab4777532846
d3fcfbaa0e200f49cefe4b77388292402e428eb3
/Codemarshal/SUB IUPC 2019/A. A Permutation with Mr. Peabody and Sherman.cpp
9a9425a77da392ff8ee04c8c6a172f98cb38fce7
[]
no_license
edge555/Online-Judge-Solves
c3136b19dc2243e9676b57132d4162c554acaefb
452a85ea69d89a3691a04b5dfb7d95d1996b736d
refs/heads/master
2023-08-22T03:23:11.263266
2023-08-21T07:22:33
2023-08-21T07:22:33
145,904,907
14
3
null
null
null
null
UTF-8
C++
false
false
1,348
cpp
#include <bits/stdc++.h> #define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define pf printf #define sc scanf #define sf(num) scanf("%d",&num) #define sff(num1,num2) scanf("%d %d",&num1,&num2) #define sfff(num1,num2,num3) scanf("%d %d %d",&num1,&num2,&num3) #define sl(num) scanf("%lld",&num) #define sll(num1,num2) scanf("%lld %lld",&num1,&num2) #define slll(num1,num2,num3) scanf("%lld %lld %lld",&num1,&num2,&num3) #define rep(i,n) for(i=1;i<=n;i++) #define rep0(i,n) for(i=0;i<n;i++) #define reps(i,a,n) for(i=a;i<=n;i++) #define pb push_back #define mpp make_pair #define MOD 1000000007 #define fi first #define se second #define N 100005 #define mem(ara,n) memset(ara,n,sizeof(ara)) #define memb(ara) memset(ara,false,sizeof(ara)) #define all(x) (x).begin(),(x).end() #define sq(x) ((x)*(x)) #define pi pair<int,int> #define pii pair<pair<int,int>,pair<int,int> > #define db(x) cout<<#x<<" :: "<<x<<"\n"; #define dbb(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n"; #define fr freopen("input.txt","r",stdin); #define fw freopen("output.txt","w",stdout); #define TIME cerr<<"Time : "<<(double)clock()/(double)CLOCKS_PER_SEC<<"s\n"; typedef long long int ll; using namespace std; int main() { int t,tc; sf(tc); rep(t,tc) { int n; sf(n); pf("Case %d: %d/1\n",t,n-1); } }
[ "2010.ahmed.shoaib@gmail.com" ]
2010.ahmed.shoaib@gmail.com
7131dbe2146c2519a06202ab9a3a42ed2938d053
c2d270aff0a4d939f43b6359ac2c564b2565be76
/src/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
f531d197ab9eaf4cc189c1c5314f3e8fab0781c5
[ "BSD-3-Clause" ]
permissive
bopopescu/QuicDep
dfa5c2b6aa29eb6f52b12486ff7f3757c808808d
bc86b705a6cf02d2eade4f3ea8cf5fe73ef52aa0
refs/heads/master
2022-04-26T04:36:55.675836
2020-04-29T21:29:26
2020-04-29T21:29:26
null
0
0
null
null
null
null
UTF-8
C++
false
false
10,530
h
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_ #include <stdint.h> #include <memory> #include <string> #include <vector> #include "base/callback_forward.h" #include "base/files/file.h" #include "base/files/scoped_temp_dir.h" #include "base/macros.h" #include "base/observer_list_threadsafe.h" #include "chrome/browser/sync_file_system/local/local_file_sync_status.h" #include "chrome/browser/sync_file_system/sync_status_code.h" #include "storage/browser/blob/blob_data_handle.h" #include "storage/browser/fileapi/file_system_operation.h" #include "storage/browser/fileapi/file_system_url.h" #include "storage/browser/quota/quota_callbacks.h" #include "storage/common/fileapi/file_system_types.h" #include "storage/common/fileapi/file_system_util.h" #include "storage/common/quota/quota_types.h" #include "third_party/WebKit/common/quota/quota_status_code.h" namespace base { class SingleThreadTaskRunner; } namespace storage { class FileSystemContext; class FileSystemOperationRunner; class FileSystemURL; } namespace leveldb { class Env; } namespace net { class URLRequestContext; } namespace storage { class QuotaManager; } namespace sync_file_system { class FileChangeList; class LocalFileSyncContext; class SyncFileSystemBackend; // A canned syncable filesystem for testing. // This internally creates its own QuotaManager and FileSystemContext // (as we do so for each isolated application). class CannedSyncableFileSystem : public LocalFileSyncStatus::Observer { public: typedef base::OnceCallback< void(const GURL& root, const std::string& name, base::File::Error result)> OpenFileSystemCallback; typedef base::Callback<void(base::File::Error)> StatusCallback; typedef base::Callback<void(int64_t)> WriteCallback; typedef storage::FileSystemOperation::FileEntryList FileEntryList; enum QuotaMode { QUOTA_ENABLED, QUOTA_DISABLED, }; CannedSyncableFileSystem( const GURL& origin, leveldb::Env* env_override, const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner); ~CannedSyncableFileSystem() override; // SetUp must be called before using this instance. void SetUp(QuotaMode quota_mode); // TearDown must be called before destructing this instance. void TearDown(); // Creates a FileSystemURL for the given (utf8) path string. storage::FileSystemURL URL(const std::string& path) const; // Initialize this with given |sync_context| if it hasn't // been initialized. sync_file_system::SyncStatusCode MaybeInitializeFileSystemContext( LocalFileSyncContext* sync_context); // Opens a new syncable file system. base::File::Error OpenFileSystem(); // Register sync status observers. Unlike original // LocalFileSyncStatus::Observer implementation the observer methods // are called on the same thread where AddSyncStatusObserver were called. void AddSyncStatusObserver(LocalFileSyncStatus::Observer* observer); void RemoveSyncStatusObserver(LocalFileSyncStatus::Observer* observer); // Accessors. storage::FileSystemContext* file_system_context() { return file_system_context_.get(); } storage::QuotaManager* quota_manager() { return quota_manager_.get(); } GURL origin() const { return origin_; } storage::FileSystemType type() const { return type_; } storage::StorageType storage_type() const { return FileSystemTypeToQuotaStorageType(type_); } // Helper routines to perform file system operations. // OpenFileSystem() must have been called before calling any of them. // They create an operation and run it on IO task runner, and the operation // posts a task on file runner. base::File::Error CreateDirectory(const storage::FileSystemURL& url); base::File::Error CreateFile(const storage::FileSystemURL& url); base::File::Error Copy(const storage::FileSystemURL& src_url, const storage::FileSystemURL& dest_url); base::File::Error Move(const storage::FileSystemURL& src_url, const storage::FileSystemURL& dest_url); base::File::Error TruncateFile(const storage::FileSystemURL& url, int64_t size); base::File::Error TouchFile(const storage::FileSystemURL& url, const base::Time& last_access_time, const base::Time& last_modified_time); base::File::Error Remove(const storage::FileSystemURL& url, bool recursive); base::File::Error FileExists(const storage::FileSystemURL& url); base::File::Error DirectoryExists(const storage::FileSystemURL& url); base::File::Error VerifyFile(const storage::FileSystemURL& url, const std::string& expected_data); base::File::Error GetMetadataAndPlatformPath( const storage::FileSystemURL& url, base::File::Info* info, base::FilePath* platform_path); base::File::Error ReadDirectory(const storage::FileSystemURL& url, FileEntryList* entries); // Returns the # of bytes written (>=0) or an error code (<0). int64_t Write(net::URLRequestContext* url_request_context, const storage::FileSystemURL& url, std::unique_ptr<storage::BlobDataHandle> blob_data_handle); int64_t WriteString(const storage::FileSystemURL& url, const std::string& data); // Purges the file system local storage. base::File::Error DeleteFileSystem(); // Retrieves the quota and usage. blink::QuotaStatusCode GetUsageAndQuota(int64_t* usage, int64_t* quota); // ChangeTracker related methods. They run on file task runner. void GetChangedURLsInTracker(storage::FileSystemURLSet* urls); void ClearChangeForURLInTracker(const storage::FileSystemURL& url); void GetChangesForURLInTracker(const storage::FileSystemURL& url, FileChangeList* changes); SyncFileSystemBackend* backend(); storage::FileSystemOperationRunner* operation_runner(); // LocalFileSyncStatus::Observer overrides. void OnSyncEnabled(const storage::FileSystemURL& url) override; void OnWriteEnabled(const storage::FileSystemURL& url) override; // Operation methods body. // They can be also called directly if the caller is already on IO thread. void DoOpenFileSystem(OpenFileSystemCallback callback); void DoCreateDirectory(const storage::FileSystemURL& url, const StatusCallback& callback); void DoCreateFile(const storage::FileSystemURL& url, const StatusCallback& callback); void DoCopy(const storage::FileSystemURL& src_url, const storage::FileSystemURL& dest_url, const StatusCallback& callback); void DoMove(const storage::FileSystemURL& src_url, const storage::FileSystemURL& dest_url, const StatusCallback& callback); void DoTruncateFile(const storage::FileSystemURL& url, int64_t size, const StatusCallback& callback); void DoTouchFile(const storage::FileSystemURL& url, const base::Time& last_access_time, const base::Time& last_modified_time, const StatusCallback& callback); void DoRemove(const storage::FileSystemURL& url, bool recursive, const StatusCallback& callback); void DoFileExists(const storage::FileSystemURL& url, const StatusCallback& callback); void DoDirectoryExists(const storage::FileSystemURL& url, const StatusCallback& callback); void DoVerifyFile(const storage::FileSystemURL& url, const std::string& expected_data, const StatusCallback& callback); void DoGetMetadataAndPlatformPath(const storage::FileSystemURL& url, base::File::Info* info, base::FilePath* platform_path, const StatusCallback& callback); void DoReadDirectory(const storage::FileSystemURL& url, FileEntryList* entries, const StatusCallback& callback); void DoWrite(net::URLRequestContext* url_request_context, const storage::FileSystemURL& url, std::unique_ptr<storage::BlobDataHandle> blob_data_handle, const WriteCallback& callback); void DoWriteString(const storage::FileSystemURL& url, const std::string& data, const WriteCallback& callback); void DoGetUsageAndQuota(int64_t* usage, int64_t* quota, const storage::StatusCallback& callback); private: typedef base::ObserverListThreadSafe<LocalFileSyncStatus::Observer> ObserverList; // Callbacks. void DidOpenFileSystem(base::SingleThreadTaskRunner* original_task_runner, const base::Closure& quit_closure, const GURL& root, const std::string& name, base::File::Error result); void DidInitializeFileSystemContext(const base::Closure& quit_closure, sync_file_system::SyncStatusCode status); void InitializeSyncStatusObserver(); base::ScopedTempDir data_dir_; const std::string service_name_; scoped_refptr<storage::QuotaManager> quota_manager_; scoped_refptr<storage::FileSystemContext> file_system_context_; const GURL origin_; const storage::FileSystemType type_; GURL root_url_; base::File::Error result_; sync_file_system::SyncStatusCode sync_status_; leveldb::Env* env_override_; scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; // Boolean flags mainly for helping debug. bool is_filesystem_set_up_; bool is_filesystem_opened_; // Should be accessed only on the IO thread. scoped_refptr<ObserverList> sync_status_observers_; DISALLOW_COPY_AND_ASSIGN(CannedSyncableFileSystem); }; } // namespace sync_file_system #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_CANNED_SYNCABLE_FILE_SYSTEM_H_
[ "rdeshm0@aptvm070-6.apt.emulab.net" ]
rdeshm0@aptvm070-6.apt.emulab.net
d3855739d257bc9e4e0efbd46a32d36ae89ca993
c547c4da323f293150978d399b41ed097344f850
/Games/Homeland/Homeland/Logic/Units/ParticleAirSystem.cpp
d85b5ae06ab8fd56e3c07593631ce38020945905
[]
no_license
Guanzhe/PocketEngine
48686a77714cf8e0c52c68896fc4db31e828efab
7728f6d8e520f54be5cd39023801286c78cce446
refs/heads/master
2021-09-18T06:32:28.031072
2017-12-29T20:50:22
2017-12-29T20:50:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,359
cpp
// // ParticleAirSystem.cpp // Homeland // // Created by Jeppe Nielsen on 28/10/15. // Copyright (c) 2015 Jeppe Nielsen. All rights reserved. // #include "ParticleAirSystem.h" void ParticleAirSystem::ObjectAdded(Pocket::GameObject *object) { objectsMoved.Add(object->GetComponent<Transform>()->Position, object); } void ParticleAirSystem::ObjectRemoved(Pocket::GameObject *object) { objectsMoved.Remove(object->GetComponent<Transform>()->Position, object); } void ParticleAirSystem::Update(float dt) { for(auto o : Objects()) { UpdateObject(dt, o); } } void ParticleAirSystem::UpdateObject(float dt, Pocket::GameObject *object) { Map* map = object->GetComponent<Mappable>()->Map; Particle* particle = object->GetComponent<Particle>(); Transform* transform = object->GetComponent<Transform>(); Airable* airable = object->GetComponent<Airable>(); Vector2 particlePosition = particle->position; if (airable->positions.empty()) { airable->positions.push_back(particlePosition); } else { if (!particlePosition.EqualEpsilon(airable->positions.back(), 0.01f)) { airable->positions.push_back(particlePosition); } } int x = (int)floorf(particlePosition.x); int z = (int)floorf(particlePosition.y); float dx = particlePosition.x - x; float dz = particlePosition.y - z; const Map::Node& n0 = map->GetNode(x,z); const Map::Node& n1 = map->GetNode(x+1,z); const Map::Node& n2 = map->GetNode(x+1,z+1); const Map::Node& n3 = map->GetNode(x,z+1); float height = 0.0f; Vector3 normal = 0; if ((dx + dz) < 1) { height = n0.height; height += (n1.height - n0.height) * dx; height += (n3.height - n0.height) * dz; } else { height = n2.height; height += (n1.height - n2.height) * (1 - dz); height += (n3.height - n2.height) * (1 - dx); } if (height<1) height = 1; float targetY = height + airable->targetAboveGround; airable->currentHeightY = airable->currentHeightY + (targetY - airable->currentHeightY)* airable->heightAligmentSpeed * dt; transform->Position = { particlePosition.x, airable->currentHeightY + sinf(airable->sineWobble)*0.2f, particlePosition.y }; airable->sineWobble += 1.0f * dt; if (airable->positions.size()>10) { Vector2 direction = 0; for (int i = 0; i<airable->positions.size()-1; i++) { direction += (airable->positions[i+1]- airable->positions[i]); } direction.Normalize(); Vector3 normal = {0,-1,0}; Vector3 forward = {0,0,1}; Vector3 sideways = normal.Cross(forward); forward = sideways.Cross(normal); //sideways.Normalize(); //forward.Normalize(); Quaternion rotation2d = Quaternion(Vector3(0,atan2f(direction.x, direction.y) + MathHelper::Pi,0)); Quaternion normalRotation = Quaternion(sideways, -normal, -forward); Quaternion target = normalRotation * rotation2d; Quaternion quat = Quaternion::Slerp(10.0f * dt, transform->Rotation, target, true); quat.Normalize(); transform->Rotation = quat; airable->positions.erase(airable->positions.begin()); } }
[ "nielsen_jeppe@hotmail.com" ]
nielsen_jeppe@hotmail.com
5a90614177052f1c1da776a76a8696211e92610d
03c530d659410409ab5785dbaeec2a3296f1021a
/cbits/halide-hs.cpp
a272fa1d9905d68205064ae7cb1d3355cf8b27ea
[]
no_license
silky/halide-hs
28212e3ab3299efdc6704b6bf3be030437f4dcdd
619689df107c738bfd47ab72017bacee8c44f7a4
refs/heads/master
2021-01-24T07:29:23.934134
2017-05-06T00:34:48
2017-06-04T23:58:55
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,418
cpp
// The only Halide header file you need is Halide.h. It includes all of Halide. #include "Halide.h" // We'll also include stdio for printf. #include <stdio.h> /* typedef void CFunc; */ using namespace Halide; // Turn a pointer of argument points (from haskell) into a vector of // arguments used for ahead of time compilation. std::vector<Argument> argvector (int n, Argument** args) { std::vector<Argument> values; //(args, args+n); for (int i = 0; i < n; i++) { values.push_back(*(args[i])); } return values; } extern "C" { /** Arguments *********************************************************/ /* Param<>* new_scalar_param(halide_type_t ty, char* name) { */ /* return new Param<uint_8>(ty, name); */ /* } */ // must be a better way to do this? void delete_param_int8(Param<int8_t>* p) { delete p; } void delete_param_int16(Param<int16_t>* p) { delete p; } void delete_param_int32(Param<int32_t>* p) { delete p; } void delete_param_int64(Param<int64_t>* p) { delete p; } void delete_param_uint8(Param<uint8_t>* p) { delete p; } void delete_param_uint16(Param<uint16_t>* p) { delete p; } void delete_param_uint32(Param<uint32_t>* p) { delete p; } void delete_param_uint64(Param<uint64_t>* p) { delete p; } void delete_param_float(Param<float>* p) { delete p; } void delete_param_double(Param<float>* p) { delete p; } ImageParam* new_image_param(halide_type_t ty, int dim, char* name) { ImageParam* img = new ImageParam(ty, dim, name); return img; } /* void set_image_param(ImageParam* img, halide_buffer_t* buff) { */ /* Image<> */ void delete_image_param(ImageParam* img) { delete img; } /* Argument* scalar_arg(Param* p) { */ /* return new Argument(*p); */ /* } */ Argument* image_arg(ImageParam* img) { return new Argument(*img); } Argument* image_arg_float(ImageParam* p) { Argument* a = new Argument(*p); return a; } void delete_arg(Argument* a) { delete a; } /** Buffers ***********************************************************/ Realization* from_new_buffers(int32_t n, halide_buffer_t* buffer_ptr) { std::vector<Buffer<>> buffer_v; for (int i=0; i<n; i++) { buffer_v.push_back(Buffer<>(buffer_ptr[i])); } return new Realization(buffer_v); } /** Scheduling ********************************************************/ void parallel_func(Func* f, char* nm) { f->parallel(Var(nm)); } void vectorise_func(Func* f, char* nm, int32_t n) { f->vectorize(Var(nm), n); } /** Realizations ******************************************************/ Realization* from_buffers(int32_t n, int32_t* ts, buffer_t* buffer_ts) { std::vector<Buffer<>> buffer_v; for (int i = 0; i < n; i++) { int32_t t = ts[i]; Buffer<> b; switch (t) { case 0 : b = Buffer<uint8_t>(buffer_ts[i]); break; case 1 : b = Buffer<uint16_t>(buffer_ts[i]); break; case 2 : b = Buffer<uint32_t>(buffer_ts[i]); break; case 3 : b = Buffer<uint16_t>(buffer_ts[i]); break; case 4 : b = Buffer<int8_t>(buffer_ts[i]); break; case 5 : b = Buffer<int16_t>(buffer_ts[i]); break; case 6 : b = Buffer<int32_t>(buffer_ts[i]); break; case 7 : b = Buffer<int64_t>(buffer_ts[i]); break; case 8 : b = Buffer<float>(buffer_ts[i]); break; case 9 : b = Buffer<double>(buffer_ts[i]); break; default : b = Buffer<void*>(buffer_ts[i]); } buffer_v.push_back(b); } Realization* xs = new Realization(buffer_v); return xs; } void realize(Func* f, Realization* dst) { f->realize(*dst); } Var* new_var(char* var_name) { return new Var(var_name); } void delete_var(Var* var) { delete var; } /** Target ************************************************************/ /* Target* new_target */ /* (Target::OS o, */ /* Target::Arch a, */ /* int target_bits, */ /* int num_features, */ /* Target::Feature* features_ptr) { */ /* std::vector<Target::Feature> features_vector; */ /* for (int i = 0; i < num_features; i++) { */ /* features_vector.push_back(features_ptr[i]); */ /* } */ /* return new Target(o,a,target_bits,features_vector); */ /* } */ Target* new_target (Target::OS o, Target::Arch a, int b, uint64_t features) { std::vector<Target::Feature> features_vector; for (uint64_t i = 0; i <= Target::FeatureEnd; i++) { if (features & (1ull << i)) { Target::Feature f = static_cast<Target::Feature>(i); features_vector.push_back(f); } } return new Target(o,a,b,features_vector); } Target* target_from_string(char* target_string) { return new Target(target_string); } void target_string(Target* target, char* string_ptr) { strcpy(string_ptr, target->to_string().c_str()); } Target* host_target() { Target* t = new Target; *t = get_host_target(); return t; } Target* environment_target() { Target* t = new Target; *t = get_target_from_environment(); return t; } void from_target( Target* target, Target::OS* o_ptr, Target::Arch* a_ptr, int* bits_ptr, uint64_t* features_ptr) { *o_ptr = target->os; *a_ptr = target->arch; *bits_ptr = target->bits; uint64_t features = 0; for (int i = 0; i < Target::FeatureEnd; i ++) { Target::Feature f = static_cast<Target::Feature>(i); if (target->has_feature(f)) { features |= 1 << i; } } *features_ptr = features; } void delete_target(Target* target) { delete target; } /** Funcs *************************************************************/ Func* new_func_named(char* name) { Func* f = new Func(name); return f; } Func* new_func_unnamed() { Func* f = new Func(); return f; } void delete_func(Func* f) { delete f; } void to_assembly(Func* f, char* filepath, int n, Argument** args, char* name, Target* t) { f->compile_to_assembly(filepath, argvector(n,args), name, *t); } void to_object(Func* f, char* filepath, int n, Argument** args, char* name, Target* t) { f->compile_to_object(filepath, argvector(n,args), name, *t); } void to_bitcode(Func* f, char* filepath, int n, Argument** args, char* name, Target* t) { f->compile_to_bitcode(filepath, argvector(n,args), name, *t); } void to_lowered_stmt(Func* f, char* filepath, int n, Argument** args, Target* t) { f->compile_to_lowered_stmt(filepath, argvector(n,args), Text, *t); } void to_file(Func* f, char* filepath, int n, Argument** args, char* name, Target* t) { f->compile_to_file(filepath, argvector(n,args), name, *t); } } // extern "C"
[ "c.chalmers@me.com" ]
c.chalmers@me.com
e77159232d1919a121732d131eda47a4e2f94d3d
815491511402cb103fd1f6288d05e00a0c267fc2
/src/EnemyClass.cpp
14e2371ee07b8d843e4abd43fe0f63b818707d14
[]
no_license
nriobo/graphAdv
74a8135da18e1b43673d1727d8206fc065dbb51c
4d20b8b09c241c72a3502e728335a972af6d62b7
refs/heads/master
2021-01-10T05:49:06.251288
2015-10-22T10:38:32
2015-10-22T10:38:32
44,737,717
0
0
null
null
null
null
UTF-8
C++
false
false
1,498
cpp
//EnemyClass.cpp #include "EnemyClass.h" EnemyClass::EnemyClass() { speed = 1.2; frame = 0; dir = RIGHT; jumping = doubleJumping = false; falling = true; dying = false; jumpMax = 50; justKilledTime = 0; alive = true; loopAnimation = true; } void EnemyClass::Draw(BITMAP *buffer, BITMAP *sprite, float offsetX, float offsetY) { if ( dir == LEFT ) masked_blit(sprite, buffer, (int)frame*w, 0, x - offsetX, y - offsetY - correctY, w, h); else masked_blit(sprite, buffer, (int)frame*w, h, x - offsetX, y - offsetY - correctY, w, h); } void EnemyClass::DrawAnim(BITMAP *buffer, BITMAP *sprite, float offsetX, float offsetY, int animW, int animH, int framesAnim) { frames = framesAnim; if ( dir == LEFT ) masked_blit(sprite, buffer, (int)frame*w, 0, x - offsetX, y - offsetY - correctY, animW, animH); else masked_blit(sprite, buffer, (int)frame*w, animH, x - offsetX, y - offsetY - correctY, animW, animH); } void EnemyClass::Update() { // TBD } void EnemyClass::Move(int direction) { dir = direction; NextFrame(); if ( direction == LEFT && alive) { x -= speed; } else if ( direction == RIGHT && alive) { x += speed; } } void EnemyClass::NextFrame() { if (frame <= frames) { if (falling) frame = frames; else frame += 0.1; if ( frame > frames && loopAnimation) frame = 0; } }
[ "nriobo@ponticelli.org" ]
nriobo@ponticelli.org
fba80b30b90c50f4256e07092560069b0863cefa
c654bdb7ff47f8534d2c7eed1bc878bd6209825d
/src/sdchain/basics/impl/ResolverAsio.cpp
93f6b96b24df7558e19811de7717c5ef85f09563
[]
no_license
Gamma-Token/SDChain-Core
6c2884b65efc2e53a53a10656b101a335a2ec50b
88dc4cdd7c8f8c04144ffe9acd694958d34703a7
refs/heads/master
2020-06-18T06:37:12.570366
2019-04-29T05:27:18
2019-04-29T05:27:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,893
cpp
//------------------------------------------------------------------------------ /* This file is part of sdchaind: https://github.com/SDChain/SDChain-core Copyright (c) 2017, 2018 SDChain Alliance. */ //============================================================================== #include <BeastConfig.h> #include <sdchain/basics/ResolverAsio.h> #include <sdchain/basics/Log.h> #include <sdchain/beast/net/IPAddressConversion.h> #include <sdchain/beast/core/WaitableEvent.h> #include <boost/asio.hpp> #include <atomic> #include <cassert> #include <deque> #include <locale> #include <memory> namespace sdchain { /** Mix-in to track when all pending I/O is complete. Derived classes must be callable with this signature: void asyncHandlersComplete() */ template <class Derived> class AsyncObject { protected: AsyncObject () : m_pending (0) { } public: ~AsyncObject () { // Destroying the object with I/O pending? Not a clean exit! assert (m_pending.load () == 0); } /** RAII container that maintains the count of pending I/O. Bind this into the argument list of every handler passed to an initiating function. */ class CompletionCounter { public: explicit CompletionCounter (Derived* owner) : m_owner (owner) { ++m_owner->m_pending; } CompletionCounter (CompletionCounter const& other) : m_owner (other.m_owner) { ++m_owner->m_pending; } ~CompletionCounter () { if (--m_owner->m_pending == 0) m_owner->asyncHandlersComplete (); } CompletionCounter& operator= (CompletionCounter const&) = delete; private: Derived* m_owner; }; void addReference () { ++m_pending; } void removeReference () { if (--m_pending == 0) (static_cast<Derived*>(this))->asyncHandlersComplete(); } private: // The number of handlers pending. std::atomic <int> m_pending; }; class ResolverAsioImpl : public ResolverAsio , public AsyncObject <ResolverAsioImpl> { public: using HostAndPort = std::pair <std::string, std::string>; beast::Journal m_journal; boost::asio::io_service& m_io_service; boost::asio::io_service::strand m_strand; boost::asio::ip::tcp::resolver m_resolver; beast::WaitableEvent m_stop_complete; std::atomic <bool> m_stop_called; std::atomic <bool> m_stopped; // Represents a unit of work for the resolver to do struct Work { std::vector <std::string> names; HandlerType handler; template <class StringSequence> Work (StringSequence const& names_, HandlerType const& handler_) : handler (handler_) { names.reserve(names_.size ()); std::reverse_copy (names_.begin (), names_.end (), std::back_inserter (names)); } }; std::deque <Work> m_work; ResolverAsioImpl (boost::asio::io_service& io_service, beast::Journal journal) : m_journal (journal) , m_io_service (io_service) , m_strand (io_service) , m_resolver (io_service) , m_stop_complete (true, true) , m_stop_called (false) , m_stopped (true) { } ~ResolverAsioImpl () { assert (m_work.empty ()); assert (m_stopped); } //------------------------------------------------------------------------- // AsyncObject void asyncHandlersComplete() { m_stop_complete.signal (); } //-------------------------------------------------------------------------- // // Resolver // //-------------------------------------------------------------------------- void start () { assert (m_stopped == true); assert (m_stop_called == false); if (m_stopped.exchange (false) == true) { m_stop_complete.reset (); addReference (); } } void stop_async () { if (m_stop_called.exchange (true) == false) { m_io_service.dispatch (m_strand.wrap (std::bind ( &ResolverAsioImpl::do_stop, this, CompletionCounter (this)))); JLOG(m_journal.debug()) << "Queued a stop request"; } } void stop () { stop_async (); JLOG(m_journal.debug()) << "Waiting to stop"; m_stop_complete.wait(); JLOG(m_journal.debug()) << "Stopped"; } void resolve ( std::vector <std::string> const& names, HandlerType const& handler) { assert (m_stop_called == false); assert (m_stopped == true); assert (!names.empty()); // TODO NIKB use rvalue references to construct and move // reducing cost. m_io_service.dispatch (m_strand.wrap (std::bind ( &ResolverAsioImpl::do_resolve, this, names, handler, CompletionCounter (this)))); } //------------------------------------------------------------------------- // Resolver void do_stop (CompletionCounter) { assert (m_stop_called == true); if (m_stopped.exchange (true) == false) { m_work.clear (); m_resolver.cancel (); removeReference (); } } void do_finish ( std::string name, boost::system::error_code const& ec, HandlerType handler, boost::asio::ip::tcp::resolver::iterator iter, CompletionCounter) { if (ec == boost::asio::error::operation_aborted) return; std::vector <beast::IP::Endpoint> addresses; // If we get an error message back, we don't return any // results that we may have gotten. if (ec == 0) { while (iter != boost::asio::ip::tcp::resolver::iterator()) { addresses.push_back (beast::IPAddressConversion::from_asio (*iter)); ++iter; } } handler (name, addresses); m_io_service.post (m_strand.wrap (std::bind ( &ResolverAsioImpl::do_work, this, CompletionCounter (this)))); } HostAndPort parseName(std::string const& str) { // Attempt to find the first and last non-whitespace auto const find_whitespace = std::bind ( &std::isspace <std::string::value_type>, std::placeholders::_1, std::locale ()); auto host_first = std::find_if_not ( str.begin (), str.end (), find_whitespace); auto port_last = std::find_if_not ( str.rbegin (), str.rend(), find_whitespace).base(); // This should only happen for all-whitespace strings if (host_first >= port_last) return std::make_pair(std::string (), std::string ()); // Attempt to find the first and last valid port separators auto const find_port_separator = [](char const c) -> bool { if (std::isspace (c)) return true; if (c == ':') return true; return false; }; auto host_last = std::find_if ( host_first, port_last, find_port_separator); auto port_first = std::find_if_not ( host_last, port_last, find_port_separator); return make_pair ( std::string (host_first, host_last), std::string (port_first, port_last)); } void do_work (CompletionCounter) { if (m_stop_called == true) return; // We don't have any work to do at this time if (m_work.empty ()) return; std::string const name (m_work.front ().names.back()); HandlerType handler (m_work.front ().handler); m_work.front ().names.pop_back (); if (m_work.front ().names.empty ()) m_work.pop_front(); HostAndPort const hp (parseName (name)); if (hp.first.empty ()) { JLOG(m_journal.error()) << "Unable to parse '" << name << "'"; m_io_service.post (m_strand.wrap (std::bind ( &ResolverAsioImpl::do_work, this, CompletionCounter (this)))); return; } boost::asio::ip::tcp::resolver::query query ( hp.first, hp.second); m_resolver.async_resolve (query, std::bind ( &ResolverAsioImpl::do_finish, this, name, std::placeholders::_1, handler, std::placeholders::_2, CompletionCounter (this))); } void do_resolve (std::vector <std::string> const& names, HandlerType const& handler, CompletionCounter) { assert (! names.empty()); if (m_stop_called == false) { m_work.emplace_back (names, handler); JLOG(m_journal.debug()) << "Queued new job with " << names.size() << " tasks. " << m_work.size() << " jobs outstanding."; if (m_work.size() > 0) { m_io_service.post (m_strand.wrap (std::bind ( &ResolverAsioImpl::do_work, this, CompletionCounter (this)))); } } } }; //----------------------------------------------------------------------------- std::unique_ptr<ResolverAsio> ResolverAsio::New ( boost::asio::io_service& io_service, beast::Journal journal) { return std::make_unique<ResolverAsioImpl> (io_service, journal); } //----------------------------------------------------------------------------- Resolver::~Resolver () { } }
[ "developer@sdchain.io" ]
developer@sdchain.io
c0f6061f199ddb3d8b97ac51043d5688421eba65
30bdd8ab897e056f0fb2f9937dcf2f608c1fd06a
/CodesNew/4050.cpp
b4ea8bf5305bf837cd8e3388ac239c6714239439
[]
no_license
thegamer1907/Code_Analysis
0a2bb97a9fb5faf01d983c223d9715eb419b7519
48079e399321b585efc8a2c6a84c25e2e7a22a61
refs/heads/master
2020-05-27T01:20:55.921937
2019-11-20T11:15:11
2019-11-20T11:15:11
188,403,594
2
1
null
null
null
null
UTF-8
C++
false
false
723
cpp
#include <bits/stdc++.h> #define f first #define s second #define pb push_back #define mp make_pair using namespace std; typedef pair<int, int> pi; typedef long long ll; typedef pair<ll, ll> pll; const int maxn = 2e5+1; ll a[maxn], k[maxn], b[maxn]; int main() { int n, q; cin >> n >> q; for(int i = 0; i < n; i++) { cin >> a[i]; if(i == 0) b[i] = a[i]; else b[i] = b[i-1] + a[i]; } for(int i = 0; i < q; i++) cin >> k[i]; ll strela = 0; for(int i = 0; i < q; i++) { strela += k[i]; int ziv = upper_bound(b, b+n, strela) - b; if(ziv == n) cout << n << "\n", strela = 0; else cout << n - ziv << "\n"; } return 0; }
[ "harshitagar1907@gmail.com" ]
harshitagar1907@gmail.com
ce3aede1456c757c6b8c7bc7a9f40857fc060aa2
4b250da9813bd51979b7211778f720c0757eb82e
/codeforces/div2/316/A/A.cpp
6d3699f9bb3ae08cfbfebf82c1a9d1781635de1c
[ "MIT" ]
permissive
mathemage/CompetitiveProgramming
07f7d4c269cca0b89955518131b01d037a5a1597
11a1a57c6ed144201b58eaeb34248f560f18d250
refs/heads/master
2023-04-16T17:55:24.948628
2023-04-14T19:16:54
2023-04-14T19:16:54
26,391,626
2
0
null
null
null
null
UTF-8
C++
false
false
1,779
cpp
/* ======================================== * File Name : A.cpp * Creation Date : 13-08-2015 * Last Modified : Fri 14 Aug 2015 01:31:56 PM CEST * Created By : Karel Ha <mathemage@gmail.com> * URL : http://codeforces.com/contest/570/problem/A * Points Gained (in case of online contest) : 458 / 500 ==========================================*/ #include <bits/stdc++.h> using namespace std; #define REP(I,N) FOR(I,0,N) #define FOR(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) #define ALL(A) (A).begin(), (A).end() template <typename T> string NumberToString ( T Number ) { ostringstream ss; ss << Number; return ss.str(); } #define ERR(args...) { vector<string> _v = split(#args, ','); err(_v.begin(), args); } vector<string> split(const string& s, char c) { vector<string> v; stringstream ss(s); string x; while (getline(ss, x, c)) v.emplace_back(x); return move(v); } void err(vector<string>::iterator it) {} template<typename T, typename... Args> void err(vector<string>::iterator it, T a, Args... args) { cout << it -> substr((*it)[0] == ' ', it -> length()) << " = " << a << endl; err(++it, args...); } int main() { int n, m; cin >> n >> m; int x; vector<int> cities_max(m,0); vector<int> cities_victors(m,0); REP(i,m) { REP(j,n) { cin >> x; if (x > cities_max[i]) { cities_max[i] = x; cities_victors[i] = j; } } } vector<int> cand_cnt(n,0); REP(i,m) { cand_cnt[cities_victors[i]]++; } int victor = 0; int ma = 0; REP(j,n) { if (cand_cnt[j] > ma) { ma = cand_cnt[j]; victor = j; } } cout << victor+1 << endl; return 0; }
[ "mathemage@gmail.com" ]
mathemage@gmail.com
2b66a7a6842152319188746d7c056b620a7a6323
6aa2eedd7e52495ca18f990968008a1b93f762bd
/TD2/Personne.h
472a49d13771dc4ceb641121f331e4888980fe38
[]
no_license
PierreEngelstein/labC-Polytech
a42d55bd491a6b5cf357ff61153d61b5ad4cb119
8eb48fb185f9438813dcdd4368f6a51bc3b4ce08
refs/heads/master
2020-09-13T09:54:41.214154
2019-11-27T13:16:41
2019-11-27T13:16:41
222,733,500
0
0
null
null
null
null
UTF-8
C++
false
false
675
h
#pragma once #include<string> #include<iostream> namespace td2 { class Personne { public: Personne(); Personne(std::string nom, std::string prenom, int age); Personne(const Personne& p); std::string GetPrenom() const; std::string GetNom() const; unsigned int GetAge() const; void Set(const std::string & N,const std::string & P,unsigned int A); void Affiche(std::ostream & f) const; std::string ToString() const; Personne& operator=(const Personne& p); friend std::ostream& operator<<(std::ostream& os, const Personne& p); private: std::string _nom; std::string _prenom; unsigned int _age; }; }
[ "pier.engelstein@outlook.com" ]
pier.engelstein@outlook.com
db88224b42cafffd235b3338e1a297d5851215cf
f7eaf482eb2d163e73e83e8c583639e4067dbca6
/stator/symbolic/context.hpp
540ced1d5d2647a8c264f3e61c568508e3d939c3
[]
no_license
toastedcrumpets/stator
1ce16ec5b5e02820c3ab886efc72f22570918218
fdb35c587e1477df8bafc5291049fd4898f16ec2
refs/heads/master
2023-02-21T00:09:56.525742
2022-09-02T19:04:42
2022-09-02T19:04:42
34,253,133
17
1
null
null
null
null
UTF-8
C++
false
false
943
hpp
/* Copyright (C) 2021 Marcus N Campbell Bannerman <m.bannerman@gmail.com> This file is part of stator. stator 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. stator 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 stator. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #include <stator/symbolic/symbolic.hpp> namespace sym { class Context: { std::string name; std::vector<std::string> _parents; std::vector<> Dict<std::string, Expr> _substitutions; }; }
[ "m.bannerman@gmail.com" ]
m.bannerman@gmail.com
b108b2bad39f778a16189a0755d73a2538fcb0b2
c09c05ba71e630bda56d8afd07cd173c51051a46
/ex3/static.cpp
5022888979d57352ad42f2f0b5267f653b25d1ec
[]
no_license
Aumrudh/Cpp
4eded36e8a2046da01694eeb352e0f62307e1914
a4725270e54732becf14a198239a38fed1585262
refs/heads/master
2023-02-27T13:38:10.248711
2021-01-31T05:38:07
2021-01-31T05:38:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,796
cpp
//Ex 3 Pgm1 //Programed by AUMRUDH LAL KUMAR TJ //Pgm to calculate no of cars #include<iostream> #include<string> using namespace std; class car { public: int vehicleno; string cpname; string mdname; int yom; static int bmw; static int toyato; static int hyundai; static int honda; static int other; void readdetails(); void printdetails(); }; void car::readdetails() { cout<<"Enter vehicle number\n"; cin>>vehicleno; cout<<"Enter vehicle name\n"; cin>>cpname; cout<<"Enter model name\n"; cin>>mdname; cout<<"Enter date of manufacture\n"; cin>>yom; if(cpname=="bmw") { bmw++; } else if(cpname=="toyato") { toyato++; } else if(cpname=="hyundai") { hyundai++; } else if(cpname=="honda") { honda++; } else { other++; } } void car::printdetails() { cout<<"Vehicle no: "<<vehicleno<<"\n"; cout<<"Vehicle name: "<<cpname<<"\n"; cout<<"Model Name: "<<mdname<<"\n"; cout<<"Manfacture year: "<<yom<<"\n"; } int car::bmw; int car::toyato; int car::hyundai; int car::honda; int car::other; main() { car c[50]; int i,n; cout<<"Enter the no of cars\n"; cin>>n; for(i=0;i<n;i++) { c[i].readdetails(); } for(i=0;i<n;i++) { c[i].printdetails(); } cout<<"The total no of cars in bmw: "<<car::bmw<<"\n"; cout<<"The total no of cars in toyota: "<<car::toyato<<"\n"; cout<<"The total no of cars in hyndai: "<<car::hyundai<<"\n"; cout<<"The total no of cars in honda: "<<car::honda<<"\n"; cout<<"The total no of other cars: "<<car::other<<"\n"; }
[ "imaumrudh@gmail.com" ]
imaumrudh@gmail.com
e0219301ca03abd961321c94165209eabdb1a5de
72fd77dfb7adfdbdd762d11c5d00f1523be160f8
/swappingDataOfClasses.cpp
659812960cd8f64365ec0561082456ce4c8738cc
[]
no_license
Vino16491/C-Programming
31278b67d4e95645d02c0293e437984163cd55ce
bd0d3032cdea611ddaef066cea65a9c6d2b14600
refs/heads/master
2020-03-12T15:20:41.972779
2018-04-28T14:10:20
2018-04-28T14:10:20
130,687,948
0
0
null
null
null
null
UTF-8
C++
false
false
814
cpp
#include<iostream> using namespace std; class class_2; class class_1{ int value1; public: void intdata(int a){value1 = a;} void display(void){cout<< value1 << "\n";} friend void exchange(class_1 &, class_2 &); }; class class_2{ int value2; public: void intdata(int a){value2 = a;} void display(void){cout<< value2 << "\n";} friend void exchange(class_1 &, class_2 &); }; void exchange(class_1 &x, class_2 &y){ int temp = x.value1; x.value1 = y.value2; y.value2 = temp; } int main(){ class_1 C1; class_2 C2; C1.intdata(100); C2.intdata(200); cout<< "Values before exchange" <<"\n"; C1.display(); C2.display(); exchange(C1, C2); cout<<"Values after exchange" << "\n"; C1.display(); C2.display(); return 0; }
[ "vinodgchandaliya@gmail.com" ]
vinodgchandaliya@gmail.com
2944b2b7335bc0215a91b69c291ce70d7dc7fdc5
65f42b163c5724b9e3b07095907e2596c1e6fc60
/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
9c2914f5840211dab425093fa56af8026e6f69bd
[ "NCSA" ]
permissive
fbsd/old_lldb
6a7a4aefda6a0c7a8a78257e127ca2311bfe5729
71c0faf7c2d06c1d81bf8ce9c46f4084c6183797
refs/heads/master
2016-09-06T12:58:24.545605
2012-01-06T18:31:24
2012-01-06T18:31:24
null
0
0
null
null
null
null
UTF-8
C++
false
false
16,477
h
//===-- DWARFDebugInfoEntry.h -----------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef SymbolFileDWARF_DWARFDebugInfoEntry_h_ #define SymbolFileDWARF_DWARFDebugInfoEntry_h_ #include "SymbolFileDWARF.h" #include "llvm/ADT/SmallVector.h" #include "DWARFDebugAbbrev.h" #include "DWARFAbbreviationDeclaration.h" #include "DWARFDebugRanges.h" #include <vector> #include <map> #include <set> typedef std::map<const DWARFDebugInfoEntry*, dw_addr_t> DIEToAddressMap; typedef DIEToAddressMap::iterator DIEToAddressMapIter; typedef DIEToAddressMap::const_iterator DIEToAddressMapConstIter; typedef std::map<dw_addr_t, const DWARFDebugInfoEntry*> AddressToDIEMap; typedef AddressToDIEMap::iterator AddressToDIEMapIter; typedef AddressToDIEMap::const_iterator AddressToDIEMapConstIter; typedef std::map<dw_offset_t, dw_offset_t> DIEToDIEMap; typedef DIEToDIEMap::iterator DIEToDIEMapIter; typedef DIEToDIEMap::const_iterator DIEToDIEMapConstIter; typedef std::map<uint32_t, const DWARFDebugInfoEntry*> UInt32ToDIEMap; typedef UInt32ToDIEMap::iterator UInt32ToDIEMapIter; typedef UInt32ToDIEMap::const_iterator UInt32ToDIEMapConstIter; typedef std::multimap<uint32_t, const DWARFDebugInfoEntry*> UInt32ToDIEMMap; typedef UInt32ToDIEMMap::iterator UInt32ToDIEMMapIter; typedef UInt32ToDIEMMap::const_iterator UInt32ToDIEMMapConstIter; #define DIE_SIBLING_IDX_BITSIZE 31 #define DIE_ABBR_IDX_BITSIZE 15 class DWARFDebugInfoEntry { public: typedef std::vector<DWARFDebugInfoEntry> collection; typedef collection::iterator iterator; typedef collection::const_iterator const_iterator; typedef std::vector<dw_offset_t> offset_collection; typedef offset_collection::iterator offset_collection_iterator; typedef offset_collection::const_iterator offset_collection_const_iterator; class Attributes { public: Attributes(); ~Attributes(); void Append(const DWARFCompileUnit *cu, dw_offset_t attr_die_offset, dw_attr_t attr, dw_form_t form); const DWARFCompileUnit * CompileUnitAtIndex(uint32_t i) const { return m_infos[i].cu; } dw_offset_t DIEOffsetAtIndex(uint32_t i) const { return m_infos[i].die_offset; } dw_attr_t AttributeAtIndex(uint32_t i) const { return m_infos[i].attr; } dw_attr_t FormAtIndex(uint32_t i) const { return m_infos[i].form; } bool ExtractFormValueAtIndex (SymbolFileDWARF* dwarf2Data, uint32_t i, DWARFFormValue &form_value) const; uint64_t FormValueAsUnsignedAtIndex (SymbolFileDWARF* dwarf2Data, uint32_t i, uint64_t fail_value) const; uint64_t FormValueAsUnsigned (SymbolFileDWARF* dwarf2Data, dw_attr_t attr, uint64_t fail_value) const; uint32_t FindAttributeIndex(dw_attr_t attr) const; bool ContainsAttribute(dw_attr_t attr) const; bool RemoveAttribute(dw_attr_t attr); void Clear() { m_infos.clear(); } uint32_t Size() const { return m_infos.size(); } protected: struct Info { const DWARFCompileUnit *cu; // Keep the compile unit with each attribute in case we have DW_FORM_ref_addr values dw_offset_t die_offset; dw_attr_t attr; dw_form_t form; }; typedef llvm::SmallVector<Info, 32> collection; collection m_infos; }; struct CompareState { CompareState() : die_offset_pairs() { assert(sizeof(dw_offset_t)*2 == sizeof(uint64_t)); } bool AddTypePair(dw_offset_t a, dw_offset_t b) { uint64_t a_b_offsets = (uint64_t)a << 32 | (uint64_t)b; // Return true if this type was inserted, false otherwise return die_offset_pairs.insert(a_b_offsets).second; } std::set< uint64_t > die_offset_pairs; }; DWARFDebugInfoEntry(): m_offset (DW_INVALID_OFFSET), m_parent_idx (0), m_sibling_idx (0), m_empty_children(false), m_abbr_idx (0), m_has_children (false), m_tag (0) { } void Clear () { m_offset = DW_INVALID_OFFSET; m_parent_idx = 0; m_sibling_idx = 0; m_empty_children = false; m_abbr_idx = 0; m_has_children = false; m_tag = 0; } bool Contains (const DWARFDebugInfoEntry *die) const; void BuildAddressRangeTable( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, DWARFDebugAranges* debug_aranges) const; void BuildFunctionAddressRangeTable( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, DWARFDebugAranges* debug_aranges) const; bool FastExtract( const lldb_private::DataExtractor& debug_info_data, const DWARFCompileUnit* cu, const uint8_t *fixed_form_sizes, dw_offset_t* offset_ptr); bool Extract( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, dw_offset_t* offset_ptr); bool LookupAddress( const dw_addr_t address, SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, DWARFDebugInfoEntry** function_die, DWARFDebugInfoEntry** block_die); size_t GetAttributes( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const uint8_t *fixed_form_sizes, DWARFDebugInfoEntry::Attributes& attrs, uint32_t curr_depth = 0) const; // "curr_depth" for internal use only, don't set this yourself!!! dw_offset_t GetAttributeValue( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const dw_attr_t attr, DWARFFormValue& formValue, dw_offset_t* end_attr_offset_ptr = NULL) const; const char* GetAttributeValueAsString( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const dw_attr_t attr, const char* fail_value) const; uint64_t GetAttributeValueAsUnsigned( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const dw_attr_t attr, uint64_t fail_value) const; uint64_t GetAttributeValueAsReference( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const dw_attr_t attr, uint64_t fail_value) const; int64_t GetAttributeValueAsSigned( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const dw_attr_t attr, int64_t fail_value) const; dw_offset_t GetAttributeValueAsLocation( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const dw_attr_t attr, lldb_private::DataExtractor& data, uint32_t &block_size) const; const char* GetName( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu) const; const char* GetMangledName( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, bool substitute_name_allowed = true) const; const char* GetPubname( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu) const; static bool GetName( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const dw_offset_t die_offset, lldb_private::Stream &s); static bool AppendTypeName( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const dw_offset_t die_offset, lldb_private::Stream &s); const char * GetQualifiedName ( SymbolFileDWARF* dwarf2Data, DWARFCompileUnit* cu, std::string &storage) const; const char * GetQualifiedName ( SymbolFileDWARF* dwarf2Data, DWARFCompileUnit* cu, const DWARFDebugInfoEntry::Attributes& attributes, std::string &storage) const; // static int Compare( // SymbolFileDWARF* dwarf2Data, // dw_offset_t a_die_offset, // dw_offset_t b_die_offset, // CompareState &compare_state, // bool compare_siblings, // bool compare_children); // // static int Compare( // SymbolFileDWARF* dwarf2Data, // DWARFCompileUnit* a_cu, const DWARFDebugInfoEntry* a_die, // DWARFCompileUnit* b_cu, const DWARFDebugInfoEntry* b_die, // CompareState &compare_state, // bool compare_siblings, // bool compare_children); static bool OffsetLessThan ( const DWARFDebugInfoEntry& a, const DWARFDebugInfoEntry& b); void Dump( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, lldb_private::Stream &s, uint32_t recurse_depth) const; void DumpAncestry( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const DWARFDebugInfoEntry* oldest, lldb_private::Stream &s, uint32_t recurse_depth) const; static void DumpAttribute( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const lldb_private::DataExtractor& debug_info_data, uint32_t* offset_ptr, lldb_private::Stream &s, dw_attr_t attr, dw_form_t form); // This one dumps the comp unit name, objfile name and die offset for this die so the stream S. void DumpLocation( SymbolFileDWARF* dwarf2Data, DWARFCompileUnit* cu, lldb_private::Stream &s) const; bool GetDIENamesAndRanges( SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit* cu, const char * &name, const char * &mangled, DWARFDebugRanges::RangeList& rangeList, int& decl_file, int& decl_line, int& decl_column, int& call_file, int& call_line, int& call_column, lldb_private::DWARFExpression *frame_base = NULL) const; const DWARFAbbreviationDeclaration* GetAbbreviationDeclarationPtr (SymbolFileDWARF* dwarf2Data, const DWARFCompileUnit *cu, dw_offset_t &offset) const; dw_tag_t Tag () const { return m_tag; } bool IsNULL() const { return m_abbr_idx == 0; } dw_offset_t GetOffset () const { return m_offset; } void SetOffset (dw_offset_t offset) { m_offset = offset; } bool HasChildren () const { return m_has_children; } void SetHasChildren (bool b) { m_has_children = b; } // We know we are kept in a vector of contiguous entries, so we know // our parent will be some index behind "this". DWARFDebugInfoEntry* GetParent() { return m_parent_idx > 0 ? this - m_parent_idx : NULL; } const DWARFDebugInfoEntry* GetParent() const { return m_parent_idx > 0 ? this - m_parent_idx : NULL; } // We know we are kept in a vector of contiguous entries, so we know // our sibling will be some index after "this". DWARFDebugInfoEntry* GetSibling() { return m_sibling_idx > 0 ? this + m_sibling_idx : NULL; } const DWARFDebugInfoEntry* GetSibling() const { return m_sibling_idx > 0 ? this + m_sibling_idx : NULL; } // We know we are kept in a vector of contiguous entries, so we know // we don't need to store our child pointer, if we have a child it will // be the next entry in the list... DWARFDebugInfoEntry* GetFirstChild() { return (HasChildren() && !m_empty_children) ? this + 1 : NULL; } const DWARFDebugInfoEntry* GetFirstChild() const { return (HasChildren() && !m_empty_children) ? this + 1 : NULL; } const DWARFDebugInfoEntry* GetParentDeclContextDIE (SymbolFileDWARF* dwarf2Data, DWARFCompileUnit* cu) const; const DWARFDebugInfoEntry* GetParentDeclContextDIE (SymbolFileDWARF* dwarf2Data, DWARFCompileUnit* cu, const DWARFDebugInfoEntry::Attributes& attributes) const; void SetParent (DWARFDebugInfoEntry* parent) { if (parent) { // We know we are kept in a vector of contiguous entries, so we know // our parent will be some index behind "this". m_parent_idx = this - parent; } else m_parent_idx = 0; } void SetSibling (DWARFDebugInfoEntry* sibling) { if (sibling) { // We know we are kept in a vector of contiguous entries, so we know // our sibling will be some index after "this". m_sibling_idx = sibling - this; sibling->SetParent(GetParent()); } else m_sibling_idx = 0; } void SetSiblingIndex (uint32_t idx) { m_sibling_idx = idx; } void SetParentIndex (uint32_t idx) { m_parent_idx = idx; } bool GetEmptyChildren () const { return m_empty_children; } void SetEmptyChildren (bool b) { m_empty_children = b; } static void DumpDIECollection (lldb_private::Stream &strm, DWARFDebugInfoEntry::collection &die_collection); protected: dw_offset_t m_offset; // Offset within the .debug_info of the start of this entry uint32_t m_parent_idx; // How many to subtract from "this" to get the parent. If zero this die has no parent uint32_t m_sibling_idx:31, // How many to add to "this" to get the sibling. m_empty_children:1; // If a DIE says it had children, yet it just contained a NULL tag, this will be set. uint32_t m_abbr_idx:DIE_ABBR_IDX_BITSIZE, m_has_children:1, // Set to 1 if this DIE has children m_tag:16; // A copy of the DW_TAG value so we don't have to go through the compile unit abbrev table }; #endif // SymbolFileDWARF_DWARFDebugInfoEntry_h_
[ "mark@peek.org" ]
mark@peek.org
a17f3dec6275457c6011354abe610fb83835cf40
26c6b9e1204db5ae4a245a990f7df3bcd218b574
/deps/v8/src/arm/lithium-arm.cc
0392997f313bb8cda70f187bd8bfa9e96dc55589
[ "bzip2-1.0.6", "BSD-3-Clause", "Apache-2.0" ]
permissive
groundwater/runtime
54ac6d6ac4eb528ecc201ffb0c231572938c5802
dc90b2c835bbd70530a933b38c252215ef905831
refs/heads/master
2021-01-18T05:18:21.260974
2015-01-29T07:35:29
2015-01-29T07:35:29
21,312,682
1
2
null
2015-01-10T20:14:08
2014-06-28T23:06:10
C++
UTF-8
C++
false
false
87,226
cc
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/v8.h" #include "src/arm/lithium-arm.h" #include "src/arm/lithium-codegen-arm.h" #include "src/hydrogen-osr.h" #include "src/lithium-allocator-inl.h" namespace v8 { namespace internal { #define DEFINE_COMPILE(type) \ void L##type::CompileToNative(LCodeGen* generator) { \ generator->Do##type(this); \ } LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE) #undef DEFINE_COMPILE #ifdef DEBUG void LInstruction::VerifyCall() { // Call instructions can use only fixed registers as temporaries and // outputs because all registers are blocked by the calling convention. // Inputs operands must use a fixed register or use-at-start policy or // a non-register policy. ASSERT(Output() == NULL || LUnallocated::cast(Output())->HasFixedPolicy() || !LUnallocated::cast(Output())->HasRegisterPolicy()); for (UseIterator it(this); !it.Done(); it.Advance()) { LUnallocated* operand = LUnallocated::cast(it.Current()); ASSERT(operand->HasFixedPolicy() || operand->IsUsedAtStart()); } for (TempIterator it(this); !it.Done(); it.Advance()) { LUnallocated* operand = LUnallocated::cast(it.Current()); ASSERT(operand->HasFixedPolicy() ||!operand->HasRegisterPolicy()); } } #endif void LInstruction::PrintTo(StringStream* stream) { stream->Add("%s ", this->Mnemonic()); PrintOutputOperandTo(stream); PrintDataTo(stream); if (HasEnvironment()) { stream->Add(" "); environment()->PrintTo(stream); } if (HasPointerMap()) { stream->Add(" "); pointer_map()->PrintTo(stream); } } void LInstruction::PrintDataTo(StringStream* stream) { stream->Add("= "); for (int i = 0; i < InputCount(); i++) { if (i > 0) stream->Add(" "); if (InputAt(i) == NULL) { stream->Add("NULL"); } else { InputAt(i)->PrintTo(stream); } } } void LInstruction::PrintOutputOperandTo(StringStream* stream) { if (HasResult()) result()->PrintTo(stream); } void LLabel::PrintDataTo(StringStream* stream) { LGap::PrintDataTo(stream); LLabel* rep = replacement(); if (rep != NULL) { stream->Add(" Dead block replaced with B%d", rep->block_id()); } } bool LGap::IsRedundant() const { for (int i = 0; i < 4; i++) { if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) { return false; } } return true; } void LGap::PrintDataTo(StringStream* stream) { for (int i = 0; i < 4; i++) { stream->Add("("); if (parallel_moves_[i] != NULL) { parallel_moves_[i]->PrintDataTo(stream); } stream->Add(") "); } } const char* LArithmeticD::Mnemonic() const { switch (op()) { case Token::ADD: return "add-d"; case Token::SUB: return "sub-d"; case Token::MUL: return "mul-d"; case Token::DIV: return "div-d"; case Token::MOD: return "mod-d"; default: UNREACHABLE(); return NULL; } } const char* LArithmeticT::Mnemonic() const { switch (op()) { case Token::ADD: return "add-t"; case Token::SUB: return "sub-t"; case Token::MUL: return "mul-t"; case Token::MOD: return "mod-t"; case Token::DIV: return "div-t"; case Token::BIT_AND: return "bit-and-t"; case Token::BIT_OR: return "bit-or-t"; case Token::BIT_XOR: return "bit-xor-t"; case Token::ROR: return "ror-t"; case Token::SHL: return "shl-t"; case Token::SAR: return "sar-t"; case Token::SHR: return "shr-t"; default: UNREACHABLE(); return NULL; } } bool LGoto::HasInterestingComment(LCodeGen* gen) const { return !gen->IsNextEmittedBlock(block_id()); } void LGoto::PrintDataTo(StringStream* stream) { stream->Add("B%d", block_id()); } void LBranch::PrintDataTo(StringStream* stream) { stream->Add("B%d | B%d on ", true_block_id(), false_block_id()); value()->PrintTo(stream); } void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if "); left()->PrintTo(stream); stream->Add(" %s ", Token::String(op())); right()->PrintTo(stream); stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); } void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if is_object("); value()->PrintTo(stream); stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); } void LIsStringAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if is_string("); value()->PrintTo(stream); stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); } void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if is_smi("); value()->PrintTo(stream); stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); } void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if is_undetectable("); value()->PrintTo(stream); stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); } void LStringCompareAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if string_compare("); left()->PrintTo(stream); right()->PrintTo(stream); stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); } void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if has_instance_type("); value()->PrintTo(stream); stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); } void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if has_cached_array_index("); value()->PrintTo(stream); stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); } void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if class_of_test("); value()->PrintTo(stream); stream->Add(", \"%o\") then B%d else B%d", *hydrogen()->class_name(), true_block_id(), false_block_id()); } void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if typeof "); value()->PrintTo(stream); stream->Add(" == \"%s\" then B%d else B%d", hydrogen()->type_literal()->ToCString().get(), true_block_id(), false_block_id()); } void LStoreCodeEntry::PrintDataTo(StringStream* stream) { stream->Add(" = "); function()->PrintTo(stream); stream->Add(".code_entry = "); code_object()->PrintTo(stream); } void LInnerAllocatedObject::PrintDataTo(StringStream* stream) { stream->Add(" = "); base_object()->PrintTo(stream); stream->Add(" + "); offset()->PrintTo(stream); } void LCallJSFunction::PrintDataTo(StringStream* stream) { stream->Add("= "); function()->PrintTo(stream); stream->Add("#%d / ", arity()); } void LCallWithDescriptor::PrintDataTo(StringStream* stream) { for (int i = 0; i < InputCount(); i++) { InputAt(i)->PrintTo(stream); stream->Add(" "); } stream->Add("#%d / ", arity()); } void LLoadContextSlot::PrintDataTo(StringStream* stream) { context()->PrintTo(stream); stream->Add("[%d]", slot_index()); } void LStoreContextSlot::PrintDataTo(StringStream* stream) { context()->PrintTo(stream); stream->Add("[%d] <- ", slot_index()); value()->PrintTo(stream); } void LInvokeFunction::PrintDataTo(StringStream* stream) { stream->Add("= "); function()->PrintTo(stream); stream->Add(" #%d / ", arity()); } void LCallNew::PrintDataTo(StringStream* stream) { stream->Add("= "); constructor()->PrintTo(stream); stream->Add(" #%d / ", arity()); } void LCallNewArray::PrintDataTo(StringStream* stream) { stream->Add("= "); constructor()->PrintTo(stream); stream->Add(" #%d / ", arity()); ElementsKind kind = hydrogen()->elements_kind(); stream->Add(" (%s) ", ElementsKindToString(kind)); } void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { arguments()->PrintTo(stream); stream->Add(" length "); length()->PrintTo(stream); stream->Add(" index "); index()->PrintTo(stream); } void LStoreNamedField::PrintDataTo(StringStream* stream) { object()->PrintTo(stream); hydrogen()->access().PrintTo(stream); stream->Add(" <- "); value()->PrintTo(stream); } void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { object()->PrintTo(stream); stream->Add("."); stream->Add(String::cast(*name())->ToCString().get()); stream->Add(" <- "); value()->PrintTo(stream); } void LLoadKeyed::PrintDataTo(StringStream* stream) { elements()->PrintTo(stream); stream->Add("["); key()->PrintTo(stream); if (hydrogen()->IsDehoisted()) { stream->Add(" + %d]", base_offset()); } else { stream->Add("]"); } } void LStoreKeyed::PrintDataTo(StringStream* stream) { elements()->PrintTo(stream); stream->Add("["); key()->PrintTo(stream); if (hydrogen()->IsDehoisted()) { stream->Add(" + %d] <-", base_offset()); } else { stream->Add("] <- "); } if (value() == NULL) { ASSERT(hydrogen()->IsConstantHoleStore() && hydrogen()->value()->representation().IsDouble()); stream->Add("<the hole(nan)>"); } else { value()->PrintTo(stream); } } void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { object()->PrintTo(stream); stream->Add("["); key()->PrintTo(stream); stream->Add("] <- "); value()->PrintTo(stream); } void LTransitionElementsKind::PrintDataTo(StringStream* stream) { object()->PrintTo(stream); stream->Add(" %p -> %p", *original_map(), *transitioned_map()); } int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { // Skip a slot if for a double-width slot. if (kind == DOUBLE_REGISTERS) spill_slot_count_++; return spill_slot_count_++; } LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { int index = GetNextSpillIndex(kind); if (kind == DOUBLE_REGISTERS) { return LDoubleStackSlot::Create(index, zone()); } else { ASSERT(kind == GENERAL_REGISTERS); return LStackSlot::Create(index, zone()); } } LPlatformChunk* LChunkBuilder::Build() { ASSERT(is_unused()); chunk_ = new(zone()) LPlatformChunk(info(), graph()); LPhase phase("L_Building chunk", chunk_); status_ = BUILDING; // If compiling for OSR, reserve space for the unoptimized frame, // which will be subsumed into this frame. if (graph()->has_osr()) { for (int i = graph()->osr()->UnoptimizedFrameSlots(); i > 0; i--) { chunk_->GetNextSpillIndex(GENERAL_REGISTERS); } } const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); for (int i = 0; i < blocks->length(); i++) { HBasicBlock* next = NULL; if (i < blocks->length() - 1) next = blocks->at(i + 1); DoBasicBlock(blocks->at(i), next); if (is_aborted()) return NULL; } status_ = DONE; return chunk_; } void LChunkBuilder::Abort(BailoutReason reason) { info()->set_bailout_reason(reason); status_ = ABORTED; } LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, Register::ToAllocationIndex(reg)); } LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) { return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, DoubleRegister::ToAllocationIndex(reg)); } LOperand* LChunkBuilder::UseFixed(HValue* value, Register fixed_register) { return Use(value, ToUnallocated(fixed_register)); } LOperand* LChunkBuilder::UseFixedDouble(HValue* value, DoubleRegister reg) { return Use(value, ToUnallocated(reg)); } LOperand* LChunkBuilder::UseRegister(HValue* value) { return Use(value, new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER)); } LOperand* LChunkBuilder::UseRegisterAtStart(HValue* value) { return Use(value, new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER, LUnallocated::USED_AT_START)); } LOperand* LChunkBuilder::UseTempRegister(HValue* value) { return Use(value, new(zone()) LUnallocated(LUnallocated::WRITABLE_REGISTER)); } LOperand* LChunkBuilder::Use(HValue* value) { return Use(value, new(zone()) LUnallocated(LUnallocated::NONE)); } LOperand* LChunkBuilder::UseAtStart(HValue* value) { return Use(value, new(zone()) LUnallocated(LUnallocated::NONE, LUnallocated::USED_AT_START)); } LOperand* LChunkBuilder::UseOrConstant(HValue* value) { return value->IsConstant() ? chunk_->DefineConstantOperand(HConstant::cast(value)) : Use(value); } LOperand* LChunkBuilder::UseOrConstantAtStart(HValue* value) { return value->IsConstant() ? chunk_->DefineConstantOperand(HConstant::cast(value)) : UseAtStart(value); } LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) { return value->IsConstant() ? chunk_->DefineConstantOperand(HConstant::cast(value)) : UseRegister(value); } LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) { return value->IsConstant() ? chunk_->DefineConstantOperand(HConstant::cast(value)) : UseRegisterAtStart(value); } LOperand* LChunkBuilder::UseConstant(HValue* value) { return chunk_->DefineConstantOperand(HConstant::cast(value)); } LOperand* LChunkBuilder::UseAny(HValue* value) { return value->IsConstant() ? chunk_->DefineConstantOperand(HConstant::cast(value)) : Use(value, new(zone()) LUnallocated(LUnallocated::ANY)); } LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) { if (value->EmitAtUses()) { HInstruction* instr = HInstruction::cast(value); VisitInstruction(instr); } operand->set_virtual_register(value->id()); return operand; } LInstruction* LChunkBuilder::Define(LTemplateResultInstruction<1>* instr, LUnallocated* result) { result->set_virtual_register(current_instruction_->id()); instr->set_result(result); return instr; } LInstruction* LChunkBuilder::DefineAsRegister( LTemplateResultInstruction<1>* instr) { return Define(instr, new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER)); } LInstruction* LChunkBuilder::DefineAsSpilled( LTemplateResultInstruction<1>* instr, int index) { return Define(instr, new(zone()) LUnallocated(LUnallocated::FIXED_SLOT, index)); } LInstruction* LChunkBuilder::DefineSameAsFirst( LTemplateResultInstruction<1>* instr) { return Define(instr, new(zone()) LUnallocated(LUnallocated::SAME_AS_FIRST_INPUT)); } LInstruction* LChunkBuilder::DefineFixed( LTemplateResultInstruction<1>* instr, Register reg) { return Define(instr, ToUnallocated(reg)); } LInstruction* LChunkBuilder::DefineFixedDouble( LTemplateResultInstruction<1>* instr, DoubleRegister reg) { return Define(instr, ToUnallocated(reg)); } LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { HEnvironment* hydrogen_env = current_block_->last_environment(); int argument_index_accumulator = 0; ZoneList<HValue*> objects_to_materialize(0, zone()); instr->set_environment(CreateEnvironment(hydrogen_env, &argument_index_accumulator, &objects_to_materialize)); return instr; } LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, HInstruction* hinstr, CanDeoptimize can_deoptimize) { info()->MarkAsNonDeferredCalling(); #ifdef DEBUG instr->VerifyCall(); #endif instr->MarkAsCall(); instr = AssignPointerMap(instr); // If instruction does not have side-effects lazy deoptimization // after the call will try to deoptimize to the point before the call. // Thus we still need to attach environment to this call even if // call sequence can not deoptimize eagerly. bool needs_environment = (can_deoptimize == CAN_DEOPTIMIZE_EAGERLY) || !hinstr->HasObservableSideEffects(); if (needs_environment && !instr->HasEnvironment()) { instr = AssignEnvironment(instr); // We can't really figure out if the environment is needed or not. instr->environment()->set_has_been_used(); } return instr; } LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { ASSERT(!instr->HasPointerMap()); instr->set_pointer_map(new(zone()) LPointerMap(zone())); return instr; } LUnallocated* LChunkBuilder::TempRegister() { LUnallocated* operand = new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER); int vreg = allocator_->GetVirtualRegister(); if (!allocator_->AllocationOk()) { Abort(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister); vreg = 0; } operand->set_virtual_register(vreg); return operand; } LUnallocated* LChunkBuilder::TempDoubleRegister() { LUnallocated* operand = new(zone()) LUnallocated(LUnallocated::MUST_HAVE_DOUBLE_REGISTER); int vreg = allocator_->GetVirtualRegister(); if (!allocator_->AllocationOk()) { Abort(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister); vreg = 0; } operand->set_virtual_register(vreg); return operand; } LOperand* LChunkBuilder::FixedTemp(Register reg) { LUnallocated* operand = ToUnallocated(reg); ASSERT(operand->HasFixedPolicy()); return operand; } LOperand* LChunkBuilder::FixedTemp(DoubleRegister reg) { LUnallocated* operand = ToUnallocated(reg); ASSERT(operand->HasFixedPolicy()); return operand; } LInstruction* LChunkBuilder::DoBlockEntry(HBlockEntry* instr) { return new(zone()) LLabel(instr->block()); } LInstruction* LChunkBuilder::DoDummyUse(HDummyUse* instr) { return DefineAsRegister(new(zone()) LDummyUse(UseAny(instr->value()))); } LInstruction* LChunkBuilder::DoEnvironmentMarker(HEnvironmentMarker* instr) { UNREACHABLE(); return NULL; } LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) { return AssignEnvironment(new(zone()) LDeoptimize); } LInstruction* LChunkBuilder::DoShift(Token::Value op, HBitwiseBinaryOperation* instr) { if (instr->representation().IsSmiOrInteger32()) { ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); LOperand* left = UseRegisterAtStart(instr->left()); HValue* right_value = instr->right(); LOperand* right = NULL; int constant_value = 0; bool does_deopt = false; if (right_value->IsConstant()) { HConstant* constant = HConstant::cast(right_value); right = chunk_->DefineConstantOperand(constant); constant_value = constant->Integer32Value() & 0x1f; // Left shifts can deoptimize if we shift by > 0 and the result cannot be // truncated to smi. if (instr->representation().IsSmi() && constant_value > 0) { does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToSmi); } } else { right = UseRegisterAtStart(right_value); } // Shift operations can only deoptimize if we do a logical shift // by 0 and the result cannot be truncated to int32. if (op == Token::SHR && constant_value == 0) { if (FLAG_opt_safe_uint32_operations) { does_deopt = !instr->CheckFlag(HInstruction::kUint32); } else { does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32); } } LInstruction* result = DefineAsRegister(new(zone()) LShiftI(op, left, right, does_deopt)); return does_deopt ? AssignEnvironment(result) : result; } else { return DoArithmeticT(op, instr); } } LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, HArithmeticBinaryOperation* instr) { ASSERT(instr->representation().IsDouble()); ASSERT(instr->left()->representation().IsDouble()); ASSERT(instr->right()->representation().IsDouble()); if (op == Token::MOD) { LOperand* left = UseFixedDouble(instr->left(), d0); LOperand* right = UseFixedDouble(instr->right(), d1); LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); return MarkAsCall(DefineFixedDouble(result, d0), instr); } else { LOperand* left = UseRegisterAtStart(instr->left()); LOperand* right = UseRegisterAtStart(instr->right()); LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); return DefineAsRegister(result); } } LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, HBinaryOperation* instr) { HValue* left = instr->left(); HValue* right = instr->right(); ASSERT(left->representation().IsTagged()); ASSERT(right->representation().IsTagged()); LOperand* context = UseFixed(instr->context(), cp); LOperand* left_operand = UseFixed(left, r1); LOperand* right_operand = UseFixed(right, r0); LArithmeticT* result = new(zone()) LArithmeticT(op, context, left_operand, right_operand); return MarkAsCall(DefineFixed(result, r0), instr); } void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) { ASSERT(is_building()); current_block_ = block; next_block_ = next_block; if (block->IsStartBlock()) { block->UpdateEnvironment(graph_->start_environment()); argument_count_ = 0; } else if (block->predecessors()->length() == 1) { // We have a single predecessor => copy environment and outgoing // argument count from the predecessor. ASSERT(block->phis()->length() == 0); HBasicBlock* pred = block->predecessors()->at(0); HEnvironment* last_environment = pred->last_environment(); ASSERT(last_environment != NULL); // Only copy the environment, if it is later used again. if (pred->end()->SecondSuccessor() == NULL) { ASSERT(pred->end()->FirstSuccessor() == block); } else { if (pred->end()->FirstSuccessor()->block_id() > block->block_id() || pred->end()->SecondSuccessor()->block_id() > block->block_id()) { last_environment = last_environment->Copy(); } } block->UpdateEnvironment(last_environment); ASSERT(pred->argument_count() >= 0); argument_count_ = pred->argument_count(); } else { // We are at a state join => process phis. HBasicBlock* pred = block->predecessors()->at(0); // No need to copy the environment, it cannot be used later. HEnvironment* last_environment = pred->last_environment(); for (int i = 0; i < block->phis()->length(); ++i) { HPhi* phi = block->phis()->at(i); if (phi->HasMergedIndex()) { last_environment->SetValueAt(phi->merged_index(), phi); } } for (int i = 0; i < block->deleted_phis()->length(); ++i) { if (block->deleted_phis()->at(i) < last_environment->length()) { last_environment->SetValueAt(block->deleted_phis()->at(i), graph_->GetConstantUndefined()); } } block->UpdateEnvironment(last_environment); // Pick up the outgoing argument count of one of the predecessors. argument_count_ = pred->argument_count(); } HInstruction* current = block->first(); int start = chunk_->instructions()->length(); while (current != NULL && !is_aborted()) { // Code for constants in registers is generated lazily. if (!current->EmitAtUses()) { VisitInstruction(current); } current = current->next(); } int end = chunk_->instructions()->length() - 1; if (end >= start) { block->set_first_instruction_index(start); block->set_last_instruction_index(end); } block->set_argument_count(argument_count_); next_block_ = NULL; current_block_ = NULL; } void LChunkBuilder::VisitInstruction(HInstruction* current) { HInstruction* old_current = current_instruction_; current_instruction_ = current; LInstruction* instr = NULL; if (current->CanReplaceWithDummyUses()) { if (current->OperandCount() == 0) { instr = DefineAsRegister(new(zone()) LDummy()); } else { ASSERT(!current->OperandAt(0)->IsControlInstruction()); instr = DefineAsRegister(new(zone()) LDummyUse(UseAny(current->OperandAt(0)))); } for (int i = 1; i < current->OperandCount(); ++i) { if (current->OperandAt(i)->IsControlInstruction()) continue; LInstruction* dummy = new(zone()) LDummyUse(UseAny(current->OperandAt(i))); dummy->set_hydrogen_value(current); chunk_->AddInstruction(dummy, current_block_); } } else { HBasicBlock* successor; if (current->IsControlInstruction() && HControlInstruction::cast(current)->KnownSuccessorBlock(&successor) && successor != NULL) { instr = new(zone()) LGoto(successor); } else { instr = current->CompileToLithium(this); } } argument_count_ += current->argument_delta(); ASSERT(argument_count_ >= 0); if (instr != NULL) { AddInstruction(instr, current); } current_instruction_ = old_current; } void LChunkBuilder::AddInstruction(LInstruction* instr, HInstruction* hydrogen_val) { // Associate the hydrogen instruction first, since we may need it for // the ClobbersRegisters() or ClobbersDoubleRegisters() calls below. instr->set_hydrogen_value(hydrogen_val); #if DEBUG // Make sure that the lithium instruction has either no fixed register // constraints in temps or the result OR no uses that are only used at // start. If this invariant doesn't hold, the register allocator can decide // to insert a split of a range immediately before the instruction due to an // already allocated register needing to be used for the instruction's fixed // register constraint. In this case, The register allocator won't see an // interference between the split child and the use-at-start (it would if // the it was just a plain use), so it is free to move the split child into // the same register that is used for the use-at-start. // See https://code.google.com/p/chromium/issues/detail?id=201590 if (!(instr->ClobbersRegisters() && instr->ClobbersDoubleRegisters(isolate()))) { int fixed = 0; int used_at_start = 0; for (UseIterator it(instr); !it.Done(); it.Advance()) { LUnallocated* operand = LUnallocated::cast(it.Current()); if (operand->IsUsedAtStart()) ++used_at_start; } if (instr->Output() != NULL) { if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed; } for (TempIterator it(instr); !it.Done(); it.Advance()) { LUnallocated* operand = LUnallocated::cast(it.Current()); if (operand->HasFixedPolicy()) ++fixed; } ASSERT(fixed == 0 || used_at_start == 0); } #endif if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { instr = AssignPointerMap(instr); } if (FLAG_stress_environments && !instr->HasEnvironment()) { instr = AssignEnvironment(instr); } chunk_->AddInstruction(instr, current_block_); if (instr->IsCall()) { HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; LInstruction* instruction_needing_environment = NULL; if (hydrogen_val->HasObservableSideEffects()) { HSimulate* sim = HSimulate::cast(hydrogen_val->next()); instruction_needing_environment = instr; sim->ReplayEnvironment(current_block_->last_environment()); hydrogen_value_for_lazy_bailout = sim; } LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); chunk_->AddInstruction(bailout, current_block_); if (instruction_needing_environment != NULL) { // Store the lazy deopt environment with the instruction if needed. // Right now it is only used for LInstanceOfKnownGlobal. instruction_needing_environment-> SetDeferredLazyDeoptimizationEnvironment(bailout->environment()); } } } LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { return new(zone()) LGoto(instr->FirstSuccessor()); } LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { HValue* value = instr->value(); Representation r = value->representation(); HType type = value->type(); ToBooleanStub::Types expected = instr->expected_input_types(); if (expected.IsEmpty()) expected = ToBooleanStub::Types::Generic(); bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || type.IsJSArray() || type.IsHeapNumber() || type.IsString(); LInstruction* branch = new(zone()) LBranch(UseRegister(value)); if (!easy_case && ((!expected.Contains(ToBooleanStub::SMI) && expected.NeedsMap()) || !expected.IsGeneric())) { branch = AssignEnvironment(branch); } return branch; } LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { return new(zone()) LDebugBreak(); } LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { ASSERT(instr->value()->representation().IsTagged()); LOperand* value = UseRegisterAtStart(instr->value()); LOperand* temp = TempRegister(); return new(zone()) LCmpMapAndBranch(value, temp); } LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* instr) { info()->MarkAsRequiresFrame(); LOperand* value = UseRegister(instr->value()); return DefineAsRegister(new(zone()) LArgumentsLength(value)); } LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) { info()->MarkAsRequiresFrame(); return DefineAsRegister(new(zone()) LArgumentsElements); } LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) { LOperand* context = UseFixed(instr->context(), cp); LInstanceOf* result = new(zone()) LInstanceOf(context, UseFixed(instr->left(), r0), UseFixed(instr->right(), r1)); return MarkAsCall(DefineFixed(result, r0), instr); } LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal( HInstanceOfKnownGlobal* instr) { LInstanceOfKnownGlobal* result = new(zone()) LInstanceOfKnownGlobal( UseFixed(instr->context(), cp), UseFixed(instr->left(), r0), FixedTemp(r4)); return MarkAsCall(DefineFixed(result, r0), instr); } LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { LOperand* receiver = UseRegisterAtStart(instr->receiver()); LOperand* function = UseRegisterAtStart(instr->function()); LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); return AssignEnvironment(DefineAsRegister(result)); } LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { LOperand* function = UseFixed(instr->function(), r1); LOperand* receiver = UseFixed(instr->receiver(), r0); LOperand* length = UseFixed(instr->length(), r2); LOperand* elements = UseFixed(instr->elements(), r3); LApplyArguments* result = new(zone()) LApplyArguments(function, receiver, length, elements); return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY); } LInstruction* LChunkBuilder::DoPushArguments(HPushArguments* instr) { int argc = instr->OperandCount(); for (int i = 0; i < argc; ++i) { LOperand* argument = Use(instr->argument(i)); AddInstruction(new(zone()) LPushArgument(argument), instr); } return NULL; } LInstruction* LChunkBuilder::DoStoreCodeEntry( HStoreCodeEntry* store_code_entry) { LOperand* function = UseRegister(store_code_entry->function()); LOperand* code_object = UseTempRegister(store_code_entry->code_object()); return new(zone()) LStoreCodeEntry(function, code_object); } LInstruction* LChunkBuilder::DoInnerAllocatedObject( HInnerAllocatedObject* instr) { LOperand* base_object = UseRegisterAtStart(instr->base_object()); LOperand* offset = UseRegisterOrConstantAtStart(instr->offset()); return DefineAsRegister( new(zone()) LInnerAllocatedObject(base_object, offset)); } LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { return instr->HasNoUses() ? NULL : DefineAsRegister(new(zone()) LThisFunction); } LInstruction* LChunkBuilder::DoContext(HContext* instr) { if (instr->HasNoUses()) return NULL; if (info()->IsStub()) { return DefineFixed(new(zone()) LContext, cp); } return DefineAsRegister(new(zone()) LContext); } LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) { LOperand* context = UseFixed(instr->context(), cp); return MarkAsCall(new(zone()) LDeclareGlobals(context), instr); } LInstruction* LChunkBuilder::DoCallJSFunction( HCallJSFunction* instr) { LOperand* function = UseFixed(instr->function(), r1); LCallJSFunction* result = new(zone()) LCallJSFunction(function); return MarkAsCall(DefineFixed(result, r0), instr); } LInstruction* LChunkBuilder::DoCallWithDescriptor( HCallWithDescriptor* instr) { const CallInterfaceDescriptor* descriptor = instr->descriptor(); LOperand* target = UseRegisterOrConstantAtStart(instr->target()); ZoneList<LOperand*> ops(instr->OperandCount(), zone()); ops.Add(target, zone()); for (int i = 1; i < instr->OperandCount(); i++) { LOperand* op = UseFixed(instr->OperandAt(i), descriptor->GetParameterRegister(i - 1)); ops.Add(op, zone()); } LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( descriptor, ops, zone()); return MarkAsCall(DefineFixed(result, r0), instr); } LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* function = UseFixed(instr->function(), r1); LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); return MarkAsCall(DefineFixed(result, r0), instr, CANNOT_DEOPTIMIZE_EAGERLY); } LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { switch (instr->op()) { case kMathFloor: return DoMathFloor(instr); case kMathRound: return DoMathRound(instr); case kMathAbs: return DoMathAbs(instr); case kMathLog: return DoMathLog(instr); case kMathExp: return DoMathExp(instr); case kMathSqrt: return DoMathSqrt(instr); case kMathPowHalf: return DoMathPowHalf(instr); case kMathClz32: return DoMathClz32(instr); default: UNREACHABLE(); return NULL; } } LInstruction* LChunkBuilder::DoMathFloor(HUnaryMathOperation* instr) { LOperand* input = UseRegister(instr->value()); LMathFloor* result = new(zone()) LMathFloor(input); return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); } LInstruction* LChunkBuilder::DoMathRound(HUnaryMathOperation* instr) { LOperand* input = UseRegister(instr->value()); LOperand* temp = TempDoubleRegister(); LMathRound* result = new(zone()) LMathRound(input, temp); return AssignEnvironment(DefineAsRegister(result)); } LInstruction* LChunkBuilder::DoMathAbs(HUnaryMathOperation* instr) { Representation r = instr->value()->representation(); LOperand* context = (r.IsDouble() || r.IsSmiOrInteger32()) ? NULL : UseFixed(instr->context(), cp); LOperand* input = UseRegister(instr->value()); LInstruction* result = DefineAsRegister(new(zone()) LMathAbs(context, input)); if (!r.IsDouble() && !r.IsSmiOrInteger32()) result = AssignPointerMap(result); if (!r.IsDouble()) result = AssignEnvironment(result); return result; } LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) { ASSERT(instr->representation().IsDouble()); ASSERT(instr->value()->representation().IsDouble()); LOperand* input = UseFixedDouble(instr->value(), d0); return MarkAsCall(DefineFixedDouble(new(zone()) LMathLog(input), d0), instr); } LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) { LOperand* input = UseRegisterAtStart(instr->value()); LMathClz32* result = new(zone()) LMathClz32(input); return DefineAsRegister(result); } LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { ASSERT(instr->representation().IsDouble()); ASSERT(instr->value()->representation().IsDouble()); LOperand* input = UseRegister(instr->value()); LOperand* temp1 = TempRegister(); LOperand* temp2 = TempRegister(); LOperand* double_temp = TempDoubleRegister(); LMathExp* result = new(zone()) LMathExp(input, double_temp, temp1, temp2); return DefineAsRegister(result); } LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { LOperand* input = UseRegisterAtStart(instr->value()); LMathSqrt* result = new(zone()) LMathSqrt(input); return DefineAsRegister(result); } LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) { LOperand* input = UseRegisterAtStart(instr->value()); LMathPowHalf* result = new(zone()) LMathPowHalf(input); return DefineAsRegister(result); } LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* constructor = UseFixed(instr->constructor(), r1); LCallNew* result = new(zone()) LCallNew(context, constructor); return MarkAsCall(DefineFixed(result, r0), instr); } LInstruction* LChunkBuilder::DoCallNewArray(HCallNewArray* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* constructor = UseFixed(instr->constructor(), r1); LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); return MarkAsCall(DefineFixed(result, r0), instr); } LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* function = UseFixed(instr->function(), r1); LCallFunction* call = new(zone()) LCallFunction(context, function); return MarkAsCall(DefineFixed(call, r0), instr); } LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { LOperand* context = UseFixed(instr->context(), cp); return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), r0), instr); } LInstruction* LChunkBuilder::DoRor(HRor* instr) { return DoShift(Token::ROR, instr); } LInstruction* LChunkBuilder::DoShr(HShr* instr) { return DoShift(Token::SHR, instr); } LInstruction* LChunkBuilder::DoSar(HSar* instr) { return DoShift(Token::SAR, instr); } LInstruction* LChunkBuilder::DoShl(HShl* instr) { return DoShift(Token::SHL, instr); } LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { if (instr->representation().IsSmiOrInteger32()) { ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); ASSERT(instr->CheckFlag(HValue::kTruncatingToInt32)); LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); LOperand* right = UseOrConstantAtStart(instr->BetterRightOperand()); return DefineAsRegister(new(zone()) LBitI(left, right)); } else { return DoArithmeticT(instr->op(), instr); } } LInstruction* LChunkBuilder::DoDivByPowerOf2I(HDiv* instr) { ASSERT(instr->representation().IsSmiOrInteger32()); ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); LOperand* dividend = UseRegister(instr->left()); int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineAsRegister(new(zone()) LDivByPowerOf2I( dividend, divisor)); if ((instr->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) || (instr->CheckFlag(HValue::kCanOverflow) && divisor == -1) || (!instr->CheckFlag(HInstruction::kAllUsesTruncatingToInt32) && divisor != 1 && divisor != -1)) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoDivByConstI(HDiv* instr) { ASSERT(instr->representation().IsInteger32()); ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); LOperand* dividend = UseRegister(instr->left()); int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineAsRegister(new(zone()) LDivByConstI( dividend, divisor)); if (divisor == 0 || (instr->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) || !instr->CheckFlag(HInstruction::kAllUsesTruncatingToInt32)) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoDivI(HDiv* instr) { ASSERT(instr->representation().IsSmiOrInteger32()); ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); LOperand* dividend = UseRegister(instr->left()); LOperand* divisor = UseRegister(instr->right()); LOperand* temp = CpuFeatures::IsSupported(SUDIV) ? NULL : TempDoubleRegister(); LInstruction* result = DefineAsRegister(new(zone()) LDivI(dividend, divisor, temp)); if (instr->CheckFlag(HValue::kCanBeDivByZero) || instr->CheckFlag(HValue::kBailoutOnMinusZero) || (instr->CheckFlag(HValue::kCanOverflow) && (!CpuFeatures::IsSupported(SUDIV) || !instr->CheckFlag(HValue::kAllUsesTruncatingToInt32))) || (!instr->IsMathFloorOfDiv() && !instr->CheckFlag(HValue::kAllUsesTruncatingToInt32))) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { if (instr->representation().IsSmiOrInteger32()) { if (instr->RightIsPowerOf2()) { return DoDivByPowerOf2I(instr); } else if (instr->right()->IsConstant()) { return DoDivByConstI(instr); } else { return DoDivI(instr); } } else if (instr->representation().IsDouble()) { return DoArithmeticD(Token::DIV, instr); } else { return DoArithmeticT(Token::DIV, instr); } } LInstruction* LChunkBuilder::DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr) { LOperand* dividend = UseRegisterAtStart(instr->left()); int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineAsRegister(new(zone()) LFlooringDivByPowerOf2I( dividend, divisor)); if ((instr->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) || (instr->CheckFlag(HValue::kLeftCanBeMinInt) && divisor == -1)) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoFlooringDivByConstI(HMathFloorOfDiv* instr) { ASSERT(instr->representation().IsInteger32()); ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); LOperand* dividend = UseRegister(instr->left()); int32_t divisor = instr->right()->GetInteger32Constant(); LOperand* temp = ((divisor > 0 && !instr->CheckFlag(HValue::kLeftCanBeNegative)) || (divisor < 0 && !instr->CheckFlag(HValue::kLeftCanBePositive))) ? NULL : TempRegister(); LInstruction* result = DefineAsRegister( new(zone()) LFlooringDivByConstI(dividend, divisor, temp)); if (divisor == 0 || (instr->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0)) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoFlooringDivI(HMathFloorOfDiv* instr) { ASSERT(instr->representation().IsSmiOrInteger32()); ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); LOperand* dividend = UseRegister(instr->left()); LOperand* divisor = UseRegister(instr->right()); LOperand* temp = CpuFeatures::IsSupported(SUDIV) ? NULL : TempDoubleRegister(); LFlooringDivI* div = new(zone()) LFlooringDivI(dividend, divisor, temp); return AssignEnvironment(DefineAsRegister(div)); } LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) { if (instr->RightIsPowerOf2()) { return DoFlooringDivByPowerOf2I(instr); } else if (instr->right()->IsConstant()) { return DoFlooringDivByConstI(instr); } else { return DoFlooringDivI(instr); } } LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) { ASSERT(instr->representation().IsSmiOrInteger32()); ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); LOperand* dividend = UseRegisterAtStart(instr->left()); int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I( dividend, divisor)); if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) { ASSERT(instr->representation().IsSmiOrInteger32()); ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); LOperand* dividend = UseRegister(instr->left()); int32_t divisor = instr->right()->GetInteger32Constant(); LInstruction* result = DefineAsRegister(new(zone()) LModByConstI( dividend, divisor)); if (divisor == 0 || instr->CheckFlag(HValue::kBailoutOnMinusZero)) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoModI(HMod* instr) { ASSERT(instr->representation().IsSmiOrInteger32()); ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); LOperand* dividend = UseRegister(instr->left()); LOperand* divisor = UseRegister(instr->right()); LOperand* temp = CpuFeatures::IsSupported(SUDIV) ? NULL : TempDoubleRegister(); LOperand* temp2 = CpuFeatures::IsSupported(SUDIV) ? NULL : TempDoubleRegister(); LInstruction* result = DefineAsRegister(new(zone()) LModI( dividend, divisor, temp, temp2)); if (instr->CheckFlag(HValue::kCanBeDivByZero) || instr->CheckFlag(HValue::kBailoutOnMinusZero)) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoMod(HMod* instr) { if (instr->representation().IsSmiOrInteger32()) { if (instr->RightIsPowerOf2()) { return DoModByPowerOf2I(instr); } else if (instr->right()->IsConstant()) { return DoModByConstI(instr); } else { return DoModI(instr); } } else if (instr->representation().IsDouble()) { return DoArithmeticD(Token::MOD, instr); } else { return DoArithmeticT(Token::MOD, instr); } } LInstruction* LChunkBuilder::DoMul(HMul* instr) { if (instr->representation().IsSmiOrInteger32()) { ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); HValue* left = instr->BetterLeftOperand(); HValue* right = instr->BetterRightOperand(); LOperand* left_op; LOperand* right_op; bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); bool bailout_on_minus_zero = instr->CheckFlag(HValue::kBailoutOnMinusZero); if (right->IsConstant()) { HConstant* constant = HConstant::cast(right); int32_t constant_value = constant->Integer32Value(); // Constants -1, 0 and 1 can be optimized if the result can overflow. // For other constants, it can be optimized only without overflow. if (!can_overflow || ((constant_value >= -1) && (constant_value <= 1))) { left_op = UseRegisterAtStart(left); right_op = UseConstant(right); } else { if (bailout_on_minus_zero) { left_op = UseRegister(left); } else { left_op = UseRegisterAtStart(left); } right_op = UseRegister(right); } } else { if (bailout_on_minus_zero) { left_op = UseRegister(left); } else { left_op = UseRegisterAtStart(left); } right_op = UseRegister(right); } LMulI* mul = new(zone()) LMulI(left_op, right_op); if (can_overflow || bailout_on_minus_zero) { AssignEnvironment(mul); } return DefineAsRegister(mul); } else if (instr->representation().IsDouble()) { if (instr->HasOneUse() && (instr->uses().value()->IsAdd() || instr->uses().value()->IsSub())) { HBinaryOperation* use = HBinaryOperation::cast(instr->uses().value()); if (use->IsAdd() && instr == use->left()) { // This mul is the lhs of an add. The add and mul will be folded into a // multiply-add in DoAdd. return NULL; } if (instr == use->right() && use->IsAdd() && !use->left()->IsMul()) { // This mul is the rhs of an add, where the lhs is not another mul. // The add and mul will be folded into a multiply-add in DoAdd. return NULL; } if (instr == use->right() && use->IsSub()) { // This mul is the rhs of a sub. The sub and mul will be folded into a // multiply-sub in DoSub. return NULL; } } return DoArithmeticD(Token::MUL, instr); } else { return DoArithmeticT(Token::MUL, instr); } } LInstruction* LChunkBuilder::DoSub(HSub* instr) { if (instr->representation().IsSmiOrInteger32()) { ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); if (instr->left()->IsConstant()) { // If lhs is constant, do reverse subtraction instead. return DoRSub(instr); } LOperand* left = UseRegisterAtStart(instr->left()); LOperand* right = UseOrConstantAtStart(instr->right()); LSubI* sub = new(zone()) LSubI(left, right); LInstruction* result = DefineAsRegister(sub); if (instr->CheckFlag(HValue::kCanOverflow)) { result = AssignEnvironment(result); } return result; } else if (instr->representation().IsDouble()) { if (instr->right()->IsMul() && instr->right()->HasOneUse()) { return DoMultiplySub(instr->left(), HMul::cast(instr->right())); } return DoArithmeticD(Token::SUB, instr); } else { return DoArithmeticT(Token::SUB, instr); } } LInstruction* LChunkBuilder::DoRSub(HSub* instr) { ASSERT(instr->representation().IsSmiOrInteger32()); ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); // Note: The lhs of the subtraction becomes the rhs of the // reverse-subtraction. LOperand* left = UseRegisterAtStart(instr->right()); LOperand* right = UseOrConstantAtStart(instr->left()); LRSubI* rsb = new(zone()) LRSubI(left, right); LInstruction* result = DefineAsRegister(rsb); if (instr->CheckFlag(HValue::kCanOverflow)) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoMultiplyAdd(HMul* mul, HValue* addend) { LOperand* multiplier_op = UseRegisterAtStart(mul->left()); LOperand* multiplicand_op = UseRegisterAtStart(mul->right()); LOperand* addend_op = UseRegisterAtStart(addend); return DefineSameAsFirst(new(zone()) LMultiplyAddD(addend_op, multiplier_op, multiplicand_op)); } LInstruction* LChunkBuilder::DoMultiplySub(HValue* minuend, HMul* mul) { LOperand* minuend_op = UseRegisterAtStart(minuend); LOperand* multiplier_op = UseRegisterAtStart(mul->left()); LOperand* multiplicand_op = UseRegisterAtStart(mul->right()); return DefineSameAsFirst(new(zone()) LMultiplySubD(minuend_op, multiplier_op, multiplicand_op)); } LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { if (instr->representation().IsSmiOrInteger32()) { ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); LOperand* right = UseOrConstantAtStart(instr->BetterRightOperand()); LAddI* add = new(zone()) LAddI(left, right); LInstruction* result = DefineAsRegister(add); if (instr->CheckFlag(HValue::kCanOverflow)) { result = AssignEnvironment(result); } return result; } else if (instr->representation().IsExternal()) { ASSERT(instr->left()->representation().IsExternal()); ASSERT(instr->right()->representation().IsInteger32()); ASSERT(!instr->CheckFlag(HValue::kCanOverflow)); LOperand* left = UseRegisterAtStart(instr->left()); LOperand* right = UseOrConstantAtStart(instr->right()); LAddI* add = new(zone()) LAddI(left, right); LInstruction* result = DefineAsRegister(add); return result; } else if (instr->representation().IsDouble()) { if (instr->left()->IsMul() && instr->left()->HasOneUse()) { return DoMultiplyAdd(HMul::cast(instr->left()), instr->right()); } if (instr->right()->IsMul() && instr->right()->HasOneUse()) { ASSERT(!instr->left()->IsMul() || !instr->left()->HasOneUse()); return DoMultiplyAdd(HMul::cast(instr->right()), instr->left()); } return DoArithmeticD(Token::ADD, instr); } else { return DoArithmeticT(Token::ADD, instr); } } LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { LOperand* left = NULL; LOperand* right = NULL; if (instr->representation().IsSmiOrInteger32()) { ASSERT(instr->left()->representation().Equals(instr->representation())); ASSERT(instr->right()->representation().Equals(instr->representation())); left = UseRegisterAtStart(instr->BetterLeftOperand()); right = UseOrConstantAtStart(instr->BetterRightOperand()); } else { ASSERT(instr->representation().IsDouble()); ASSERT(instr->left()->representation().IsDouble()); ASSERT(instr->right()->representation().IsDouble()); left = UseRegisterAtStart(instr->left()); right = UseRegisterAtStart(instr->right()); } return DefineAsRegister(new(zone()) LMathMinMax(left, right)); } LInstruction* LChunkBuilder::DoPower(HPower* instr) { ASSERT(instr->representation().IsDouble()); // We call a C function for double power. It can't trigger a GC. // We need to use fixed result register for the call. Representation exponent_type = instr->right()->representation(); ASSERT(instr->left()->representation().IsDouble()); LOperand* left = UseFixedDouble(instr->left(), d0); LOperand* right = exponent_type.IsDouble() ? UseFixedDouble(instr->right(), d1) : UseFixed(instr->right(), r2); LPower* result = new(zone()) LPower(left, right); return MarkAsCall(DefineFixedDouble(result, d2), instr, CAN_DEOPTIMIZE_EAGERLY); } LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { ASSERT(instr->left()->representation().IsTagged()); ASSERT(instr->right()->representation().IsTagged()); LOperand* context = UseFixed(instr->context(), cp); LOperand* left = UseFixed(instr->left(), r1); LOperand* right = UseFixed(instr->right(), r0); LCmpT* result = new(zone()) LCmpT(context, left, right); return MarkAsCall(DefineFixed(result, r0), instr); } LInstruction* LChunkBuilder::DoCompareNumericAndBranch( HCompareNumericAndBranch* instr) { Representation r = instr->representation(); if (r.IsSmiOrInteger32()) { ASSERT(instr->left()->representation().Equals(r)); ASSERT(instr->right()->representation().Equals(r)); LOperand* left = UseRegisterOrConstantAtStart(instr->left()); LOperand* right = UseRegisterOrConstantAtStart(instr->right()); return new(zone()) LCompareNumericAndBranch(left, right); } else { ASSERT(r.IsDouble()); ASSERT(instr->left()->representation().IsDouble()); ASSERT(instr->right()->representation().IsDouble()); LOperand* left = UseRegisterAtStart(instr->left()); LOperand* right = UseRegisterAtStart(instr->right()); return new(zone()) LCompareNumericAndBranch(left, right); } } LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( HCompareObjectEqAndBranch* instr) { LOperand* left = UseRegisterAtStart(instr->left()); LOperand* right = UseRegisterAtStart(instr->right()); return new(zone()) LCmpObjectEqAndBranch(left, right); } LInstruction* LChunkBuilder::DoCompareHoleAndBranch( HCompareHoleAndBranch* instr) { LOperand* value = UseRegisterAtStart(instr->value()); return new(zone()) LCmpHoleAndBranch(value); } LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( HCompareMinusZeroAndBranch* instr) { LOperand* value = UseRegister(instr->value()); LOperand* scratch = TempRegister(); return new(zone()) LCompareMinusZeroAndBranch(value, scratch); } LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { ASSERT(instr->value()->representation().IsTagged()); LOperand* value = UseRegisterAtStart(instr->value()); LOperand* temp = TempRegister(); return new(zone()) LIsObjectAndBranch(value, temp); } LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { ASSERT(instr->value()->representation().IsTagged()); LOperand* value = UseRegisterAtStart(instr->value()); LOperand* temp = TempRegister(); return new(zone()) LIsStringAndBranch(value, temp); } LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { ASSERT(instr->value()->representation().IsTagged()); return new(zone()) LIsSmiAndBranch(Use(instr->value())); } LInstruction* LChunkBuilder::DoIsUndetectableAndBranch( HIsUndetectableAndBranch* instr) { ASSERT(instr->value()->representation().IsTagged()); LOperand* value = UseRegisterAtStart(instr->value()); return new(zone()) LIsUndetectableAndBranch(value, TempRegister()); } LInstruction* LChunkBuilder::DoStringCompareAndBranch( HStringCompareAndBranch* instr) { ASSERT(instr->left()->representation().IsTagged()); ASSERT(instr->right()->representation().IsTagged()); LOperand* context = UseFixed(instr->context(), cp); LOperand* left = UseFixed(instr->left(), r1); LOperand* right = UseFixed(instr->right(), r0); LStringCompareAndBranch* result = new(zone()) LStringCompareAndBranch(context, left, right); return MarkAsCall(result, instr); } LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( HHasInstanceTypeAndBranch* instr) { ASSERT(instr->value()->representation().IsTagged()); LOperand* value = UseRegisterAtStart(instr->value()); return new(zone()) LHasInstanceTypeAndBranch(value); } LInstruction* LChunkBuilder::DoGetCachedArrayIndex( HGetCachedArrayIndex* instr) { ASSERT(instr->value()->representation().IsTagged()); LOperand* value = UseRegisterAtStart(instr->value()); return DefineAsRegister(new(zone()) LGetCachedArrayIndex(value)); } LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch( HHasCachedArrayIndexAndBranch* instr) { ASSERT(instr->value()->representation().IsTagged()); return new(zone()) LHasCachedArrayIndexAndBranch( UseRegisterAtStart(instr->value())); } LInstruction* LChunkBuilder::DoClassOfTestAndBranch( HClassOfTestAndBranch* instr) { ASSERT(instr->value()->representation().IsTagged()); LOperand* value = UseRegister(instr->value()); return new(zone()) LClassOfTestAndBranch(value, TempRegister()); } LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) { LOperand* map = UseRegisterAtStart(instr->value()); return DefineAsRegister(new(zone()) LMapEnumLength(map)); } LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { LOperand* object = UseFixed(instr->value(), r0); LDateField* result = new(zone()) LDateField(object, FixedTemp(r1), instr->index()); return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY); } LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { LOperand* string = UseRegisterAtStart(instr->string()); LOperand* index = UseRegisterOrConstantAtStart(instr->index()); return DefineAsRegister(new(zone()) LSeqStringGetChar(string, index)); } LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) { LOperand* string = UseRegisterAtStart(instr->string()); LOperand* index = FLAG_debug_code ? UseRegisterAtStart(instr->index()) : UseRegisterOrConstantAtStart(instr->index()); LOperand* value = UseRegisterAtStart(instr->value()); LOperand* context = FLAG_debug_code ? UseFixed(instr->context(), cp) : NULL; return new(zone()) LSeqStringSetChar(context, string, index, value); } LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { if (!FLAG_debug_code && instr->skip_check()) return NULL; LOperand* index = UseRegisterOrConstantAtStart(instr->index()); LOperand* length = !index->IsConstantOperand() ? UseRegisterOrConstantAtStart(instr->length()) : UseRegisterAtStart(instr->length()); LInstruction* result = new(zone()) LBoundsCheck(index, length); if (!FLAG_debug_code || !instr->skip_check()) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoBoundsCheckBaseIndexInformation( HBoundsCheckBaseIndexInformation* instr) { UNREACHABLE(); return NULL; } LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { // The control instruction marking the end of a block that completed // abruptly (e.g., threw an exception). There is nothing specific to do. return NULL; } LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { return NULL; } LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) { // All HForceRepresentation instructions should be eliminated in the // representation change phase of Hydrogen. UNREACHABLE(); return NULL; } LInstruction* LChunkBuilder::DoChange(HChange* instr) { Representation from = instr->from(); Representation to = instr->to(); HValue* val = instr->value(); if (from.IsSmi()) { if (to.IsTagged()) { LOperand* value = UseRegister(val); return DefineSameAsFirst(new(zone()) LDummyUse(value)); } from = Representation::Tagged(); } if (from.IsTagged()) { if (to.IsDouble()) { LOperand* value = UseRegister(val); LInstruction* result = DefineAsRegister(new(zone()) LNumberUntagD(value)); if (!val->representation().IsSmi()) result = AssignEnvironment(result); return result; } else if (to.IsSmi()) { LOperand* value = UseRegister(val); if (val->type().IsSmi()) { return DefineSameAsFirst(new(zone()) LDummyUse(value)); } return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value))); } else { ASSERT(to.IsInteger32()); if (val->type().IsSmi() || val->representation().IsSmi()) { LOperand* value = UseRegisterAtStart(val); return DefineAsRegister(new(zone()) LSmiUntag(value, false)); } else { LOperand* value = UseRegister(val); LOperand* temp1 = TempRegister(); LOperand* temp2 = TempDoubleRegister(); LInstruction* result = DefineSameAsFirst(new(zone()) LTaggedToI(value, temp1, temp2)); if (!val->representation().IsSmi()) result = AssignEnvironment(result); return result; } } } else if (from.IsDouble()) { if (to.IsTagged()) { info()->MarkAsDeferredCalling(); LOperand* value = UseRegister(val); LOperand* temp1 = TempRegister(); LOperand* temp2 = TempRegister(); LUnallocated* result_temp = TempRegister(); LNumberTagD* result = new(zone()) LNumberTagD(value, temp1, temp2); return AssignPointerMap(Define(result, result_temp)); } else if (to.IsSmi()) { LOperand* value = UseRegister(val); return AssignEnvironment( DefineAsRegister(new(zone()) LDoubleToSmi(value))); } else { ASSERT(to.IsInteger32()); LOperand* value = UseRegister(val); LInstruction* result = DefineAsRegister(new(zone()) LDoubleToI(value)); if (!instr->CanTruncateToInt32()) result = AssignEnvironment(result); return result; } } else if (from.IsInteger32()) { info()->MarkAsDeferredCalling(); if (to.IsTagged()) { if (!instr->CheckFlag(HValue::kCanOverflow)) { LOperand* value = UseRegisterAtStart(val); return DefineAsRegister(new(zone()) LSmiTag(value)); } else if (val->CheckFlag(HInstruction::kUint32)) { LOperand* value = UseRegisterAtStart(val); LOperand* temp1 = TempRegister(); LOperand* temp2 = TempRegister(); LNumberTagU* result = new(zone()) LNumberTagU(value, temp1, temp2); return AssignPointerMap(DefineAsRegister(result)); } else { LOperand* value = UseRegisterAtStart(val); LOperand* temp1 = TempRegister(); LOperand* temp2 = TempRegister(); LNumberTagI* result = new(zone()) LNumberTagI(value, temp1, temp2); return AssignPointerMap(DefineAsRegister(result)); } } else if (to.IsSmi()) { LOperand* value = UseRegister(val); LInstruction* result = DefineAsRegister(new(zone()) LSmiTag(value)); if (instr->CheckFlag(HValue::kCanOverflow)) { result = AssignEnvironment(result); } return result; } else { ASSERT(to.IsDouble()); if (val->CheckFlag(HInstruction::kUint32)) { return DefineAsRegister(new(zone()) LUint32ToDouble(UseRegister(val))); } else { return DefineAsRegister(new(zone()) LInteger32ToDouble(Use(val))); } } } UNREACHABLE(); return NULL; } LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) { LOperand* value = UseRegisterAtStart(instr->value()); LInstruction* result = new(zone()) LCheckNonSmi(value); if (!instr->value()->type().IsHeapObject()) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { LOperand* value = UseRegisterAtStart(instr->value()); return AssignEnvironment(new(zone()) LCheckSmi(value)); } LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { LOperand* value = UseRegisterAtStart(instr->value()); LInstruction* result = new(zone()) LCheckInstanceType(value); return AssignEnvironment(result); } LInstruction* LChunkBuilder::DoCheckValue(HCheckValue* instr) { LOperand* value = UseRegisterAtStart(instr->value()); return AssignEnvironment(new(zone()) LCheckValue(value)); } LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { if (instr->IsStabilityCheck()) return new(zone()) LCheckMaps; LOperand* value = UseRegisterAtStart(instr->value()); LInstruction* result = AssignEnvironment(new(zone()) LCheckMaps(value)); if (instr->HasMigrationTarget()) { info()->MarkAsDeferredCalling(); result = AssignPointerMap(result); } return result; } LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { HValue* value = instr->value(); Representation input_rep = value->representation(); LOperand* reg = UseRegister(value); if (input_rep.IsDouble()) { return DefineAsRegister(new(zone()) LClampDToUint8(reg)); } else if (input_rep.IsInteger32()) { return DefineAsRegister(new(zone()) LClampIToUint8(reg)); } else { ASSERT(input_rep.IsSmiOrTagged()); // Register allocator doesn't (yet) support allocation of double // temps. Reserve d1 explicitly. LClampTToUint8* result = new(zone()) LClampTToUint8(reg, TempDoubleRegister()); return AssignEnvironment(DefineAsRegister(result)); } } LInstruction* LChunkBuilder::DoDoubleBits(HDoubleBits* instr) { HValue* value = instr->value(); ASSERT(value->representation().IsDouble()); return DefineAsRegister(new(zone()) LDoubleBits(UseRegister(value))); } LInstruction* LChunkBuilder::DoConstructDouble(HConstructDouble* instr) { LOperand* lo = UseRegister(instr->lo()); LOperand* hi = UseRegister(instr->hi()); return DefineAsRegister(new(zone()) LConstructDouble(hi, lo)); } LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { LOperand* context = info()->IsStub() ? UseFixed(instr->context(), cp) : NULL; LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); return new(zone()) LReturn(UseFixed(instr->value(), r0), context, parameter_count); } LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { Representation r = instr->representation(); if (r.IsSmi()) { return DefineAsRegister(new(zone()) LConstantS); } else if (r.IsInteger32()) { return DefineAsRegister(new(zone()) LConstantI); } else if (r.IsDouble()) { return DefineAsRegister(new(zone()) LConstantD); } else if (r.IsExternal()) { return DefineAsRegister(new(zone()) LConstantE); } else if (r.IsTagged()) { return DefineAsRegister(new(zone()) LConstantT); } else { UNREACHABLE(); return NULL; } } LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; return instr->RequiresHoleCheck() ? AssignEnvironment(DefineAsRegister(result)) : DefineAsRegister(result); } LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* global_object = UseFixed(instr->global_object(), r0); LLoadGlobalGeneric* result = new(zone()) LLoadGlobalGeneric(context, global_object); return MarkAsCall(DefineFixed(result, r0), instr); } LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { LOperand* value = UseRegister(instr->value()); // Use a temp to check the value in the cell in the case where we perform // a hole check. return instr->RequiresHoleCheck() ? AssignEnvironment(new(zone()) LStoreGlobalCell(value, TempRegister())) : new(zone()) LStoreGlobalCell(value, NULL); } LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { LOperand* context = UseRegisterAtStart(instr->value()); LInstruction* result = DefineAsRegister(new(zone()) LLoadContextSlot(context)); if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { LOperand* context; LOperand* value; if (instr->NeedsWriteBarrier()) { context = UseTempRegister(instr->context()); value = UseTempRegister(instr->value()); } else { context = UseRegister(instr->context()); value = UseRegister(instr->value()); } LInstruction* result = new(zone()) LStoreContextSlot(context, value); if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { LOperand* obj = UseRegisterAtStart(instr->object()); return DefineAsRegister(new(zone()) LLoadNamedField(obj)); } LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* object = UseFixed(instr->object(), r0); LInstruction* result = DefineFixed(new(zone()) LLoadNamedGeneric(context, object), r0); return MarkAsCall(result, instr); } LInstruction* LChunkBuilder::DoLoadFunctionPrototype( HLoadFunctionPrototype* instr) { return AssignEnvironment(DefineAsRegister( new(zone()) LLoadFunctionPrototype(UseRegister(instr->function())))); } LInstruction* LChunkBuilder::DoLoadRoot(HLoadRoot* instr) { return DefineAsRegister(new(zone()) LLoadRoot); } LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { ASSERT(instr->key()->representation().IsSmiOrInteger32()); ElementsKind elements_kind = instr->elements_kind(); LOperand* key = UseRegisterOrConstantAtStart(instr->key()); LInstruction* result = NULL; if (!instr->is_typed_elements()) { LOperand* obj = NULL; if (instr->representation().IsDouble()) { obj = UseRegister(instr->elements()); } else { ASSERT(instr->representation().IsSmiOrTagged()); obj = UseRegisterAtStart(instr->elements()); } result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key)); } else { ASSERT( (instr->representation().IsInteger32() && !IsDoubleOrFloatElementsKind(elements_kind)) || (instr->representation().IsDouble() && IsDoubleOrFloatElementsKind(elements_kind))); LOperand* backing_store = UseRegister(instr->elements()); result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); } if ((instr->is_external() || instr->is_fixed_typed_array()) ? // see LCodeGen::DoLoadKeyedExternalArray ((elements_kind == EXTERNAL_UINT32_ELEMENTS || elements_kind == UINT32_ELEMENTS) && !instr->CheckFlag(HInstruction::kUint32)) : // see LCodeGen::DoLoadKeyedFixedDoubleArray and // LCodeGen::DoLoadKeyedFixedArray instr->RequiresHoleCheck()) { result = AssignEnvironment(result); } return result; } LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* object = UseFixed(instr->object(), r1); LOperand* key = UseFixed(instr->key(), r0); LInstruction* result = DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key), r0); return MarkAsCall(result, instr); } LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { if (!instr->is_typed_elements()) { ASSERT(instr->elements()->representation().IsTagged()); bool needs_write_barrier = instr->NeedsWriteBarrier(); LOperand* object = NULL; LOperand* key = NULL; LOperand* val = NULL; if (instr->value()->representation().IsDouble()) { object = UseRegisterAtStart(instr->elements()); val = UseRegister(instr->value()); key = UseRegisterOrConstantAtStart(instr->key()); } else { ASSERT(instr->value()->representation().IsSmiOrTagged()); if (needs_write_barrier) { object = UseTempRegister(instr->elements()); val = UseTempRegister(instr->value()); key = UseTempRegister(instr->key()); } else { object = UseRegisterAtStart(instr->elements()); val = UseRegisterAtStart(instr->value()); key = UseRegisterOrConstantAtStart(instr->key()); } } return new(zone()) LStoreKeyed(object, key, val); } ASSERT( (instr->value()->representation().IsInteger32() && !IsDoubleOrFloatElementsKind(instr->elements_kind())) || (instr->value()->representation().IsDouble() && IsDoubleOrFloatElementsKind(instr->elements_kind()))); ASSERT((instr->is_fixed_typed_array() && instr->elements()->representation().IsTagged()) || (instr->is_external() && instr->elements()->representation().IsExternal())); LOperand* val = UseRegister(instr->value()); LOperand* key = UseRegisterOrConstantAtStart(instr->key()); LOperand* backing_store = UseRegister(instr->elements()); return new(zone()) LStoreKeyed(backing_store, key, val); } LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* obj = UseFixed(instr->object(), r2); LOperand* key = UseFixed(instr->key(), r1); LOperand* val = UseFixed(instr->value(), r0); ASSERT(instr->object()->representation().IsTagged()); ASSERT(instr->key()->representation().IsTagged()); ASSERT(instr->value()->representation().IsTagged()); return MarkAsCall( new(zone()) LStoreKeyedGeneric(context, obj, key, val), instr); } LInstruction* LChunkBuilder::DoTransitionElementsKind( HTransitionElementsKind* instr) { if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { LOperand* object = UseRegister(instr->object()); LOperand* new_map_reg = TempRegister(); LTransitionElementsKind* result = new(zone()) LTransitionElementsKind(object, NULL, new_map_reg); return result; } else { LOperand* object = UseFixed(instr->object(), r0); LOperand* context = UseFixed(instr->context(), cp); LTransitionElementsKind* result = new(zone()) LTransitionElementsKind(object, context, NULL); return MarkAsCall(result, instr); } } LInstruction* LChunkBuilder::DoTrapAllocationMemento( HTrapAllocationMemento* instr) { LOperand* object = UseRegister(instr->object()); LOperand* temp = TempRegister(); LTrapAllocationMemento* result = new(zone()) LTrapAllocationMemento(object, temp); return AssignEnvironment(result); } LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { bool is_in_object = instr->access().IsInobject(); bool needs_write_barrier = instr->NeedsWriteBarrier(); bool needs_write_barrier_for_map = instr->has_transition() && instr->NeedsWriteBarrierForMap(); LOperand* obj; if (needs_write_barrier) { obj = is_in_object ? UseRegister(instr->object()) : UseTempRegister(instr->object()); } else { obj = needs_write_barrier_for_map ? UseRegister(instr->object()) : UseRegisterAtStart(instr->object()); } LOperand* val; if (needs_write_barrier || instr->field_representation().IsSmi()) { val = UseTempRegister(instr->value()); } else if (instr->field_representation().IsDouble()) { val = UseRegisterAtStart(instr->value()); } else { val = UseRegister(instr->value()); } // We need a temporary register for write barrier of the map field. LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; return new(zone()) LStoreNamedField(obj, val, temp); } LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* obj = UseFixed(instr->object(), r1); LOperand* val = UseFixed(instr->value(), r0); LInstruction* result = new(zone()) LStoreNamedGeneric(context, obj, val); return MarkAsCall(result, instr); } LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* left = UseFixed(instr->left(), r1); LOperand* right = UseFixed(instr->right(), r0); return MarkAsCall( DefineFixed(new(zone()) LStringAdd(context, left, right), r0), instr); } LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { LOperand* string = UseTempRegister(instr->string()); LOperand* index = UseTempRegister(instr->index()); LOperand* context = UseAny(instr->context()); LStringCharCodeAt* result = new(zone()) LStringCharCodeAt(context, string, index); return AssignPointerMap(DefineAsRegister(result)); } LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { LOperand* char_code = UseRegister(instr->value()); LOperand* context = UseAny(instr->context()); LStringCharFromCode* result = new(zone()) LStringCharFromCode(context, char_code); return AssignPointerMap(DefineAsRegister(result)); } LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { info()->MarkAsDeferredCalling(); LOperand* context = UseAny(instr->context()); LOperand* size = UseRegisterOrConstant(instr->size()); LOperand* temp1 = TempRegister(); LOperand* temp2 = TempRegister(); LAllocate* result = new(zone()) LAllocate(context, size, temp1, temp2); return AssignPointerMap(DefineAsRegister(result)); } LInstruction* LChunkBuilder::DoRegExpLiteral(HRegExpLiteral* instr) { LOperand* context = UseFixed(instr->context(), cp); return MarkAsCall( DefineFixed(new(zone()) LRegExpLiteral(context), r0), instr); } LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { LOperand* context = UseFixed(instr->context(), cp); return MarkAsCall( DefineFixed(new(zone()) LFunctionLiteral(context), r0), instr); } LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { ASSERT(argument_count_ == 0); allocator_->MarkAsOsrEntry(); current_block_->last_environment()->set_ast_id(instr->ast_id()); return AssignEnvironment(new(zone()) LOsrEntry); } LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { LParameter* result = new(zone()) LParameter; if (instr->kind() == HParameter::STACK_PARAMETER) { int spill_index = chunk()->GetParameterStackSlot(instr->index()); return DefineAsSpilled(result, spill_index); } else { ASSERT(info()->IsStub()); CodeStubInterfaceDescriptor* descriptor = info()->code_stub()->GetInterfaceDescriptor(); int index = static_cast<int>(instr->index()); Register reg = descriptor->GetParameterRegister(index); return DefineFixed(result, reg); } } LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { // Use an index that corresponds to the location in the unoptimized frame, // which the optimized frame will subsume. int env_index = instr->index(); int spill_index = 0; if (instr->environment()->is_parameter_index(env_index)) { spill_index = chunk()->GetParameterStackSlot(env_index); } else { spill_index = env_index - instr->environment()->first_local_index(); if (spill_index > LUnallocated::kMaxFixedSlotIndex) { Abort(kTooManySpillSlotsNeededForOSR); spill_index = 0; } } return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); } LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) { LOperand* context = UseFixed(instr->context(), cp); return MarkAsCall(DefineFixed(new(zone()) LCallStub(context), r0), instr); } LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { // There are no real uses of the arguments object. // arguments.length and element access are supported directly on // stack arguments, and any real arguments object use causes a bailout. // So this value is never used. return NULL; } LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) { instr->ReplayEnvironment(current_block_->last_environment()); // There are no real uses of a captured object. return NULL; } LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { info()->MarkAsRequiresFrame(); LOperand* args = UseRegister(instr->arguments()); LOperand* length = UseRegisterOrConstantAtStart(instr->length()); LOperand* index = UseRegisterOrConstantAtStart(instr->index()); return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index)); } LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { LOperand* object = UseFixed(instr->value(), r0); LToFastProperties* result = new(zone()) LToFastProperties(object); return MarkAsCall(DefineFixed(result, r0), instr); } LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { LOperand* context = UseFixed(instr->context(), cp); LTypeof* result = new(zone()) LTypeof(context, UseFixed(instr->value(), r0)); return MarkAsCall(DefineFixed(result, r0), instr); } LInstruction* LChunkBuilder::DoTypeofIsAndBranch(HTypeofIsAndBranch* instr) { return new(zone()) LTypeofIsAndBranch(UseRegister(instr->value())); } LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( HIsConstructCallAndBranch* instr) { return new(zone()) LIsConstructCallAndBranch(TempRegister()); } LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { instr->ReplayEnvironment(current_block_->last_environment()); return NULL; } LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { if (instr->is_function_entry()) { LOperand* context = UseFixed(instr->context(), cp); return MarkAsCall(new(zone()) LStackCheck(context), instr); } else { ASSERT(instr->is_backwards_branch()); LOperand* context = UseAny(instr->context()); return AssignEnvironment( AssignPointerMap(new(zone()) LStackCheck(context))); } } LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { HEnvironment* outer = current_block_->last_environment(); outer->set_ast_id(instr->ReturnId()); HConstant* undefined = graph()->GetConstantUndefined(); HEnvironment* inner = outer->CopyForInlining(instr->closure(), instr->arguments_count(), instr->function(), undefined, instr->inlining_kind()); // Only replay binding of arguments object if it wasn't removed from graph. if (instr->arguments_var() != NULL && instr->arguments_object()->IsLinked()) { inner->Bind(instr->arguments_var(), instr->arguments_object()); } inner->set_entry(instr); current_block_->UpdateEnvironment(inner); chunk_->AddInlinedClosure(instr->closure()); return NULL; } LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { LInstruction* pop = NULL; HEnvironment* env = current_block_->last_environment(); if (env->entry()->arguments_pushed()) { int argument_count = env->arguments_environment()->parameter_count(); pop = new(zone()) LDrop(argument_count); ASSERT(instr->argument_delta() == -argument_count); } HEnvironment* outer = current_block_->last_environment()-> DiscardInlined(false); current_block_->UpdateEnvironment(outer); return pop; } LInstruction* LChunkBuilder::DoForInPrepareMap(HForInPrepareMap* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* object = UseFixed(instr->enumerable(), r0); LForInPrepareMap* result = new(zone()) LForInPrepareMap(context, object); return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY); } LInstruction* LChunkBuilder::DoForInCacheArray(HForInCacheArray* instr) { LOperand* map = UseRegister(instr->map()); return AssignEnvironment(DefineAsRegister(new(zone()) LForInCacheArray(map))); } LInstruction* LChunkBuilder::DoCheckMapValue(HCheckMapValue* instr) { LOperand* value = UseRegisterAtStart(instr->value()); LOperand* map = UseRegisterAtStart(instr->map()); return AssignEnvironment(new(zone()) LCheckMapValue(value, map)); } LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { LOperand* object = UseRegister(instr->object()); LOperand* index = UseTempRegister(instr->index()); LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); LInstruction* result = DefineSameAsFirst(load); return AssignPointerMap(result); } LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { LOperand* context = UseRegisterAtStart(instr->context()); return new(zone()) LStoreFrameContext(context); } LInstruction* LChunkBuilder::DoAllocateBlockContext( HAllocateBlockContext* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* function = UseRegisterAtStart(instr->function()); LAllocateBlockContext* result = new(zone()) LAllocateBlockContext(context, function); return MarkAsCall(DefineFixed(result, cp), instr); } } } // namespace v8::internal
[ "iefserge@runtimejs.org" ]
iefserge@runtimejs.org
70a8fbffd34f6cf94d6e7347b5a274ead9901883
2742aef0f07ae6eaba99c62f98add31b291336ab
/Comando versión definitiva/Main.cpp
162fa0ef3460c101b42d85af0621750d41b66a46
[]
no_license
carlosgabe1998/Commando-Paralelo
a7ea45f9ecf7e6cb998733bb7a0eaf77a007b28b
e8669a267f963f24414df7d8c13621eaede23b13
refs/heads/master
2021-01-21T16:22:22.490277
2017-06-04T12:01:39
2017-06-04T12:01:39
91,886,154
0
0
null
null
null
null
UTF-8
C++
false
false
1,559
cpp
#include <stdlib.h> #include "Application.h" #include "Globals.h" #include "MemLeaks.h" #include "SDL/include/SDL.h" #pragma comment( lib, "SDL/libx86/SDL2.lib" ) #pragma comment( lib, "SDL/libx86/SDL2main.lib" ) enum main_states { MAIN_CREATION, MAIN_START, MAIN_UPDATE, MAIN_FINISH, MAIN_EXIT }; Application* App = nullptr; int main(int argc, char* argv[]) { ReportMemoryLeaks(); int main_return = EXIT_FAILURE; main_states state = MAIN_CREATION; while (state != MAIN_EXIT) { switch (state) { case MAIN_CREATION: { LOG("Application Creation --------------"); App = new Application(); state = MAIN_START; } break; case MAIN_START: { LOG("Application Init --------------"); if(App->Init() == false) { LOG("Application Init exits with error -----"); state = MAIN_EXIT; } else { state = MAIN_UPDATE; LOG("Application Update --------------"); } } break; case MAIN_UPDATE: { int update_return = App->Update(); if (update_return == UPDATE_ERROR) { LOG("Application Update exits with error -----"); state = MAIN_EXIT; } else if (update_return == UPDATE_STOP) state = MAIN_FINISH; } break; case MAIN_FINISH: { LOG("Application CleanUp --------------"); if(App->CleanUp() == false) { LOG("Application CleanUp exits with error -----"); } else main_return = EXIT_SUCCESS; state = MAIN_EXIT; } break; } } delete App; App = nullptr; LOG("Bye :)\n"); return main_return; }
[ "carlosgabe1998@gmail.com" ]
carlosgabe1998@gmail.com
b4efe005b8bb6291f030fa233890646249b80849
9bede9ef7b7fc6c90d5d97da3e996650be24b1dd
/buoi14/buoi14_tl/buoi14_tl/phanso.cpp
f18e8ed638be2fb866f6b6470c77cc8980036cae
[]
no_license
damvanduong1998/BTVN_C
2b78c03755bb44fde91a66ff9200589533e1585a
18b82fa51dcc6920ef2589e944300685dced7ce1
refs/heads/master
2022-12-30T11:01:17.588391
2020-10-10T17:15:41
2020-10-10T17:15:41
287,755,577
0
2
null
2020-08-28T09:59:17
2020-08-15T13:50:16
C
UTF-8
C++
false
false
451
cpp
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include"phanso.h" phanso::phanso() { tu = 1; mau = 0; printf("ham tao khong truyen doi so\r\n"); } phanso::phanso(int tu, int mau) { this->tu = tu; this->mau = mau; printf("ham tao co truyen doi so\r\n"); } phanso phanso::operator*(phanso b) { phanso kq; kq.tu = this->tu*b.tu; kq.mau = this->mau*b.mau; return kq; } phanso::~phanso() { printf("ham xoa gia tri ham tao thanh cong\r\n"); }
[ "damvanduong111@gmail.com" ]
damvanduong111@gmail.com
001fe865b3fb3ce8fbd97d3ea7e45a8ab1d49635
1255173da39f70a27395f1d9559e48c2678eda3d
/basic/mpi_scatter_reduce.cc
cac29d9fca6bdb78b6f72b784e878658ad90a6b6
[]
no_license
pmarecki/UniMPI
8a6bcb15849698d6cc567af63a390d99e3d4e088
19c62f5dade3a64f493dd5c9b313eed4ddf0e362
refs/heads/master
2021-01-22T12:02:10.223480
2016-02-22T21:23:05
2016-02-22T21:23:05
7,937,179
0
0
null
null
null
null
UTF-8
C++
false
false
1,233
cc
#include "mpi.h" #include <cstdio> #include <cstdlib> #include "stoper.h" //my timing setup (will not work on Windows yet) #include "STL_MACRO.h" //my common macros for shorter code #define WORLD MPI_COMM_WORLD //everyone int main (int argc, char *argv[]) { int kDim, kTid; //after initial set, will be kept const MPI_Init(&argc, &argv); MPI_Comm_size(WORLD, &kDim); MPI_Comm_rank(WORLD, &kTid); printf("MPI[%d/%d] has started...\n", kTid, kDim); //// TEST OF BROADCAST (root)-->(all) [same value] int common; if (kTid == 0) common = -1; MPI_Bcast(&common, 1, MPI_INT, 0, WORLD); printf("[%d] common=%i\n", kTid, common); //everyone sees "common=-1" //// TEST OF SCATTER (root)-->(all) [various values from `src[]`] int src[kDim]; int unique; if (kTid == 0) REP(i,kDim) src[i]=i; MPI_Scatter(src, 1, MPI_INT, &unique, 1, MPI_INT, 0, WORLD); printf("[%i] scatter->got:%i\n", kTid, unique); // kTid --gets--> src[kTid] //// TEST OF REDUCE (all)-->(root) [] int sum; //for MA; MPI_Reduce(&unique, &sum, 1, MPI_INT, MPI_PROD, 0, WORLD); //also: MPI_MAX if (kTid==0) printf("Sum is %d should be %d\n",sum, kDim * (kDim-1)/2); MPI_Finalize(); return 0; }
[ "pmarecki@gmail.com" ]
pmarecki@gmail.com
3efa03babc8864f7eb629e03df6abc46142f6914
8c1ed8534b30a40a10502139dd7c0d0af22f0654
/codeforces/417 (Div. 2)A/main.cpp
2b444a8a2f707ae595c3915170f71f2685185a82
[]
no_license
Spartan-65/ACM_STEP
9b8df54c4a92ab84abd6ea9821b2c31ba03bdedb
1dfe712d901ece243245e2898cc5b563722438a3
refs/heads/master
2020-03-01T01:40:28.511166
2017-11-08T09:40:02
2017-11-08T09:40:02
90,367,556
0
0
null
null
null
null
UTF-8
C++
false
false
817
cpp
#include <bits/stdc++.h> using namespace std; int a[5][5]; bool flag[4]; int main() { while(~scanf("%d%d%d%d",&a[0][0],&a[0][1],&a[0][2],&a[0][3])) { memset(flag,0,4); for(int i = 1;i<4;i++) for(int j = 0;j<4;j++) scanf("%d",&a[i][j]); for(int i = 0;i<4;i++) { for(int j = 0;j<3;j++) { if(a[i][j]) { flag[i]=1; if(j==0) flag[(i+3)%4]=1; if(j==1) flag[(i+6)%4]=1; if(j==2) flag[(i+5)%4]=1; } } } bool ans=true; for(int i = 0;i<4;i++) if(a[i][3]&&flag[i]) ans=false; if(ans) cout<<"NO"<<endl; else cout<<"YES"<<endl; } return 0; }
[ "liuyanchong@outlook.com" ]
liuyanchong@outlook.com
428b487eb7de1e99b19d96a2ff68b0fe1aa3accd
ebe0efd879a7ec51be6cb8ca7e5ca76490c6bc06
/01-src-code/part1/IntCellTest.cpp
44078b9ddf0570d6330921e949d00b67245f0b89
[]
no_license
juejian/Data-Structures-and-Algorithm-Analysis-in-Cpp-4th
3a45784478e5e9b31af87c60bf41bafd61c0fffd
dc47113825c903713ff5a0ebb3e4a08007a65e87
refs/heads/master
2022-11-27T03:14:53.823173
2020-08-05T11:31:35
2020-08-05T11:31:35
285,264,406
7
1
null
null
null
null
UTF-8
C++
false
false
401
cpp
/// @file TestIntCell.cpp #include "IntCell.h" #include <iostream> using std::cin; using std::cout; using std::endl; int main(int argc, char **argv) { IntCell m; m.write(5); cout << "Cell contents: " << m.read() << endl; IntCellPtr pm; cout << "Cell ptr contents: " << pm.read() << endl; pm.write(3); IntCellPtr pm2{pm}; cout << "Cell ptr contents: " << pm2.read() << endl; return 0; }
[ "2301879213@qq.com" ]
2301879213@qq.com
8e60bea97cc6c85fdd64628f9c76d8ad482d32bc
5f735baa7f66e31ccdb49778522e57fe226e83b8
/erode_dilate/Morphology_1.cpp
b896b455797186fd7e2bb420dd7b235f6b61c217
[]
no_license
aspears1935/opencv-ams
2bd2819aacd994e3d442ece4180d84e9e128fc4a
cfd563eaafbc7d1ce520675a00b233bc87a7f63d
refs/heads/master
2021-07-15T15:28:41.345324
2021-02-23T19:18:10
2021-02-23T19:18:10
234,355,201
0
1
null
null
null
null
UTF-8
C++
false
false
3,160
cpp
/** * @file Morphology_1.cpp * @brief Erosion and Dilation sample code * @author OpenCV team */ #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <stdlib.h> #include <stdio.h> using namespace cv; /// Global variables Mat src, erosion_dst, dilation_dst; int erosion_elem = 0; int erosion_size = 0; int erosion_iterations = 0; int dilation_elem = 0; int dilation_size = 0; int dilation_iterations = 0; int const max_elem = 2; int const max_kernel_size = 21; int const max_iterations = 100; /** Function Headers */ void Erosion( int, void* ); void Dilation( int, void* ); /** * @function main */ int main( int, char** argv ) { /// Load an image src = imread( argv[1] ); if( !src.data ) { return -1; } /// Create windows namedWindow( "Erosion Demo", WINDOW_AUTOSIZE ); namedWindow( "Dilation Demo", WINDOW_AUTOSIZE ); moveWindow( "Dilation Demo", src.cols, 0 ); /// Create Erosion Trackbar createTrackbar( "Element:\n 0: Rect \n 1: Cross \n 2: Ellipse", "Erosion Demo", &erosion_elem, max_elem, Erosion ); createTrackbar( "Kernel size:\n 2n +1", "Erosion Demo", &erosion_size, max_kernel_size, Erosion ); createTrackbar( "Iterations:\n n +1", "Erosion Demo", &erosion_iterations, max_iterations, Erosion ); /// Create Dilation Trackbar createTrackbar( "Element:\n 0: Rect \n 1: Cross \n 2: Ellipse", "Dilation Demo", &dilation_elem, max_elem, Dilation ); createTrackbar( "Kernel size:\n 2n +1", "Dilation Demo", &dilation_size, max_kernel_size, Dilation ); createTrackbar( "Iterations:\n n +1", "Dilation Demo", &dilation_iterations, max_iterations, Dilation ); /// Default start Erosion( 0, 0 ); Dilation( 0, 0 ); waitKey(0); string outFileName = "dst.png"; imwrite(outFileName, dilation_dst); return 0; } /** * @function Erosion */ void Erosion( int, void* ) { int erosion_type = 0; if( erosion_elem == 0 ){ erosion_type = MORPH_RECT; } else if( erosion_elem == 1 ){ erosion_type = MORPH_CROSS; } else if( erosion_elem == 2) { erosion_type = MORPH_ELLIPSE; } Mat element = getStructuringElement( erosion_type, Size( 2*erosion_size + 1, 2*erosion_size+1 ), Point( erosion_size, erosion_size ) ); /// Apply the erosion operation erode( src, erosion_dst, element, Point(-1,-1), erosion_iterations ); imshow( "Erosion Demo", erosion_dst ); } /** * @function Dilation */ void Dilation( int, void* ) { int dilation_type = 0; if( dilation_elem == 0 ){ dilation_type = MORPH_RECT; } else if( dilation_elem == 1 ){ dilation_type = MORPH_CROSS; } else if( dilation_elem == 2) { dilation_type = MORPH_ELLIPSE; } Mat element = getStructuringElement( dilation_type, Size( 2*dilation_size + 1, 2*dilation_size+1 ), Point( dilation_size, dilation_size ) ); /// Apply the dilation operation dilate( erosion_dst, dilation_dst, element , Point(-1,-1), dilation_iterations ); imshow( "Dilation Demo", dilation_dst ); }
[ "aspears@gatech.edu" ]
aspears@gatech.edu
9dada808da69f266d59d2ff5f3bf6932de07b471
ded214ab55a7e69d67d2b9d85a660ed6b582b378
/002/main.cpp
ef79843a14a7d1c8ccd0acd21058c73c18258702
[]
no_license
ryutorion/TheModernCppChallenge
1a33412d40cea146a95a4828d3e27710ad1ba792
f2ebbf96a0fc83693c5085d9a762313cf5c7147a
refs/heads/master
2020-07-17T17:27:41.688066
2019-09-03T14:54:53
2019-09-03T14:54:53
206,062,676
0
0
null
null
null
null
UTF-8
C++
false
false
344
cpp
#include <iostream> #include <cstdint> #include <numeric> using namespace std; int main(int argc, char * argv[]) { cout << "input a natural number > "; uint64_t m; cin >> m; cout << "input another natural number > "; uint64_t n; cin >> n; cout << "gcd(" << m << ", " << n << ") = " << gcd(m, n) << endl; return system("pause"); }
[ "masahiro.kimoto@gmail.com" ]
masahiro.kimoto@gmail.com
941528cbcb4244512ad9d4bbb0cf0c3e48886419
1942a0d16bd48962e72aa21fad8d034fa9521a6c
/aws-cpp-sdk-codepipeline/include/aws/codepipeline/model/AcknowledgeJobResult.h
c012e42db005a9b0801fff0c2ec8cde83166f3f7
[ "Apache-2.0", "JSON", "MIT" ]
permissive
yecol/aws-sdk-cpp
1aff09a21cfe618e272c2c06d358cfa0fb07cecf
0b1ea31e593d23b5db49ee39d0a11e5b98ab991e
refs/heads/master
2021-01-20T02:53:53.557861
2018-02-11T11:14:58
2018-02-11T11:14:58
83,822,910
0
1
null
2017-03-03T17:17:00
2017-03-03T17:17:00
null
UTF-8
C++
false
false
2,370
h
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ #pragma once #include <aws/codepipeline/CodePipeline_EXPORTS.h> #include <aws/codepipeline/model/JobStatus.h> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace CodePipeline { namespace Model { /** * <p>Represents the output of an acknowledge job action.</p><p><h3>See Also:</h3> * <a * href="http://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/AcknowledgeJobOutput">AWS * API Reference</a></p> */ class AWS_CODEPIPELINE_API AcknowledgeJobResult { public: AcknowledgeJobResult(); AcknowledgeJobResult(const AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); AcknowledgeJobResult& operator=(const AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); /** * <p>Whether the job worker has received the specified job.</p> */ inline const JobStatus& GetStatus() const{ return m_status; } /** * <p>Whether the job worker has received the specified job.</p> */ inline void SetStatus(const JobStatus& value) { m_status = value; } /** * <p>Whether the job worker has received the specified job.</p> */ inline void SetStatus(JobStatus&& value) { m_status = value; } /** * <p>Whether the job worker has received the specified job.</p> */ inline AcknowledgeJobResult& WithStatus(const JobStatus& value) { SetStatus(value); return *this;} /** * <p>Whether the job worker has received the specified job.</p> */ inline AcknowledgeJobResult& WithStatus(JobStatus&& value) { SetStatus(value); return *this;} private: JobStatus m_status; }; } // namespace Model } // namespace CodePipeline } // namespace Aws
[ "henso@amazon.com" ]
henso@amazon.com
87abd348bd3633105b3227244b7f5a8c308beaba
8ce57f3d8730091c3703ad95f030841a275d8c65
/src/mplfe/common/include/feir_stmt.h
440d6c91b5051a63a10e8aa693c8637e72ea3356
[]
no_license
TanveerTanjeem/OpenArkCompiler
6c913ebba33eb0509f91a8f884a87ef8431395f6
6acb8e0bac4ed3c7c24f5cb0196af81b9bedf205
refs/heads/master
2022-11-17T21:08:25.789107
2020-07-15T09:00:48
2020-07-15T09:00:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
30,318
h
/* * Copyright (c) [2020] Huawei Technologies Co.,Ltd.All rights reserved. * * OpenArkCompiler is licensed under the Mulan PSL v1. * You can use this software according to the terms and conditions of the Mulan PSL v1. * You may obtain a copy of Mulan PSL v1 at: * * http://license.coscl.org.cn/MulanPSL * * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR * FIT FOR A PARTICULAR PURPOSE. * See the Mulan PSL v1 for more details. */ #ifndef MPLFE_INCLUDE_COMMON_FEIR_STMT_H #define MPLFE_INCLUDE_COMMON_FEIR_STMT_H #include <vector> #include <list> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <memory> #include <tuple> #include "types_def.h" #include "mempool_allocator.h" #include "mir_builder.h" #include "factory.h" #include "safe_ptr.h" #include "fe_utils.h" #include "general_stmt.h" #include "feir_var.h" #include "fe_struct_elem_info.h" namespace maple { class FEIRBuilder; enum FEIRNodeKind : uint8 { kStmt, kStmtAssign, kStmtNonAssign, kStmtPesudo, kStmtDAssign, kStmtJavaTypeCheck, kStmtJavaConstClass, kStmtJavaConstString, kStmtJavaMultiANewArray, kStmtCallAssign, kStmtJavaDynamicCallAssign, kStmtIAssign, kStmtUseOnly, kStmtReturn, kStmtBranch, kStmtGoto, kStmtCondGoto, kStmtSwitch, kStmtArrayStore, kStmtFieldStore, kStmtFieldLoad, kExpr, kExprNestable, kExprNonNestable, kExprConst, kExprDRead, kExprConvert, kExprIntExt, kExprRetype, kExprCompare, kExprUnary, kExprBinary, kExprTernary, kExprNary, kExprArray, kExprIntrinsicop, kExprTypeCvt, kExprJavaNewInstance, kExprJavaNewArray, kExprJavaArrayLength, kExprJavaInstanceOf, kExprArrayLoad, kStmtPesudoFuncStart, kStmtPesudoFuncEnd, kStmtCheckPoint, kStmtPesudoLOC, kStmtPesudoLabel, kStmtPesudoJavaTry, kStmtPesudoEndTry, kStmtPesudoJavaCatch, kStmtPesudoComment, kStmtPesudoCommentForInst, }; // ---------- FEIRNode ---------- class FEIRNode { public: explicit FEIRNode(FEIRNodeKind argKind) : kind(argKind) {} virtual ~FEIRNode() = default; protected: FEIRNodeKind kind; }; // class FEIRNode // ---------- FEIRDFGNode ---------- class FEIRDFGNode { public: explicit FEIRDFGNode(const UniqueFEIRVar &argVar) : var(argVar) { CHECK_NULL_FATAL(argVar); } virtual ~FEIRDFGNode() = default; bool operator==(const FEIRDFGNode &node) const { return var->EqualsTo(node.var); } size_t Hash() const { return var->Hash(); } std::string GetNameRaw() const { return var->GetNameRaw(); } private: const UniqueFEIRVar &var; }; class FEIRDFGNodeHash { public: std::size_t operator()(const FEIRDFGNode &node) const { return node.Hash(); } }; using UniqueFEIRDFGNode = std::unique_ptr<FEIRDFGNode>; // ---------- FEIRStmt ---------- class FEIRStmt : public GeneralStmt { public: explicit FEIRStmt(FEIRNodeKind argKind) : kind(argKind) {} FEIRStmt(GeneralStmtKind argGenKind, FEIRNodeKind argKind) : GeneralStmt(argGenKind), kind(argKind) {} virtual ~FEIRStmt() = default; std::list<StmtNode*> GenMIRStmts(MIRBuilder &mirBuilder) const { return GenMIRStmtsImpl(mirBuilder); } FEIRNodeKind GetKind() const { return kind; } void SetKind(FEIRNodeKind argKind) { kind = argKind; } protected: virtual std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const; FEIRNodeKind kind; }; using UniqueFEIRStmt = std::unique_ptr<FEIRStmt>; // ---------- FEIRStmtCheckPoint ---------- class FEIRStmtCheckPoint : public FEIRStmt { public: FEIRStmtCheckPoint() : FEIRStmt(FEIRNodeKind::kStmtCheckPoint) {} ~FEIRStmtCheckPoint() = default; void Reset(); void RegisterDFGNode(UniqueFEIRVar &var); void RegisterDFGNodes(const std::list<UniqueFEIRVar*> &vars); void AddPredCheckPoint(const UniqueFEIRStmt &stmtCheckPoint); std::set<UniqueFEIRVar*> &CalcuDef(const UniqueFEIRVar &use); private: void CalcuDefDFS(std::set<UniqueFEIRVar*> &result, const UniqueFEIRVar &use, const FEIRStmtCheckPoint &cp, std::set<const FEIRStmtCheckPoint*> &visitSet) const; std::set<FEIRStmtCheckPoint*> predCPs; std::list<UniqueFEIRVar*> defs; std::list<UniqueFEIRVar*> uses; std::map<const UniqueFEIRVar*, std::set<UniqueFEIRVar*>> localUD; std::unordered_map<FEIRDFGNode, UniqueFEIRVar*, FEIRDFGNodeHash> lastDef; std::unordered_map<FEIRDFGNode, std::set<UniqueFEIRVar*>, FEIRDFGNodeHash> cacheUD; }; // ---------- FEIRExpr ---------- class FEIRExpr { public: explicit FEIRExpr(FEIRNodeKind argKind); FEIRExpr(FEIRNodeKind argKind, std::unique_ptr<FEIRType> argType); virtual ~FEIRExpr() = default; FEIRExpr(const FEIRExpr&) = delete; FEIRExpr& operator=(const FEIRExpr&) = delete; std::unique_ptr<FEIRExpr> Clone() { return CloneImpl(); } BaseNode *GenMIRNode(MIRBuilder &mirBuilder) const { return GenMIRNodeImpl(mirBuilder); } std::vector<FEIRVar*> GetVarUses() const { return GetVarUsesImpl(); } bool IsNestable() const { return IsNestableImpl(); } bool IsAddrof() const { return IsAddrofImpl(); } bool HasException() const { return HasExceptionImpl(); } void SetType(std::unique_ptr<FEIRType> argType) { CHECK_NULL_FATAL(argType); type = std::move(argType); } FEIRNodeKind GetKind() const { return kind; } FEIRType *GetType() const { ASSERT(type != nullptr, "type is nullptr"); return type.get(); } const FEIRType &GetTypeRef() const { ASSERT(type != nullptr, "type is nullptr"); return *type.get(); } PrimType GetPrimType() const { return type->GetPrimType(); } protected: virtual std::unique_ptr<FEIRExpr> CloneImpl() const = 0; virtual BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const = 0; virtual std::vector<FEIRVar*> GetVarUsesImpl() const; virtual bool IsNestableImpl() const; virtual bool IsAddrofImpl() const; virtual bool HasExceptionImpl() const; FEIRNodeKind kind; bool isNestable : 1; bool isAddrof : 1; bool hasException : 1; std::unique_ptr<FEIRType> type; }; // class FEIRExpr using UniqueFEIRExpr = std::unique_ptr<FEIRExpr>; // ---------- FEIRExprConst ---------- class FEIRExprConst : public FEIRExpr { public: FEIRExprConst(); FEIRExprConst(int64 val, PrimType argType); FEIRExprConst(uint64 val, PrimType argType); explicit FEIRExprConst(float val); explicit FEIRExprConst(double val); ~FEIRExprConst() = default; FEIRExprConst(const FEIRExprConst&) = delete; FEIRExprConst& operator=(const FEIRExprConst&) = delete; uint64 GetValueRaw() const { return value.raw; } void SetValueRaw(uint64 argValue) { value.raw = argValue; } protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; private: union { int64 valueI64; uint64 valueU64; float valueF32; double valueF64; uint64 raw; } value; }; // ---------- FEIRExprDRead ---------- class FEIRExprDRead : public FEIRExpr { public: explicit FEIRExprDRead(std::unique_ptr<FEIRVar> argVarSrc); FEIRExprDRead(std::unique_ptr<FEIRType> argType, std::unique_ptr<FEIRVar> argVarSrc); ~FEIRExprDRead() = default; void SetVarSrc(std::unique_ptr<FEIRVar> argVarSrc); protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; std::vector<FEIRVar*> GetVarUsesImpl() const override; private: std::unique_ptr<FEIRVar> varSrc; }; // ---------- FEIRExprUnary ---------- class FEIRExprUnary : public FEIRExpr { public: FEIRExprUnary(Opcode argOp, std::unique_ptr<FEIRExpr> argOpnd); FEIRExprUnary(std::unique_ptr<FEIRType> argType, Opcode argOp, std::unique_ptr<FEIRExpr> argOpnd); ~FEIRExprUnary() = default; void SetOpnd(std::unique_ptr<FEIRExpr> argOpnd); static std::map<Opcode, bool> InitMapOpNestableForExprUnary(); protected: virtual std::unique_ptr<FEIRExpr> CloneImpl() const override; virtual BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; std::vector<FEIRVar*> GetVarUsesImpl() const override; Opcode op; std::unique_ptr<FEIRExpr> opnd; private: void SetExprTypeByOp(); static std::map<Opcode, bool> mapOpNestable; }; // class FEIRExprUnary // ---------- FEIRExprTypeCvt ---------- class FEIRExprTypeCvt : public FEIRExprUnary { public: FEIRExprTypeCvt(Opcode argOp, std::unique_ptr<FEIRExpr> argOpnd); FEIRExprTypeCvt(std::unique_ptr<FEIRType> exprType, Opcode argOp, std::unique_ptr<FEIRExpr> argOpnd); ~FEIRExprTypeCvt() = default; static std::map<Opcode, bool> InitMapOpNestableForTypeCvt(); protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; private: using FuncPtrGenMIRNode = BaseNode* (FEIRExprTypeCvt::*)(MIRBuilder &mirBuilder) const; static std::map<Opcode, FuncPtrGenMIRNode> InitFuncPtrMapForParseExpr(); // GenMIRNodeMode1: // MIR: op <to-type> <from-type> (<opnd0>) BaseNode *GenMIRNodeMode1(MIRBuilder &mirBuilder) const; // GenMIRNodeMode2: // MIR: op <prim-type> <float-type> (<opnd0>) BaseNode *GenMIRNodeMode2(MIRBuilder &mirBuilder) const; // GenMIRNodeMode3: // MIR: retype <prim-type> <type> (<opnd0>) BaseNode *GenMIRNodeMode3(MIRBuilder &mirBuilder) const; static std::map<Opcode, bool> mapOpNestable; static std::map<Opcode, FuncPtrGenMIRNode> funcPtrMapForParseExpr; }; // FEIRExprTypeCvt // ---------- FEIRExprExtractBits ---------- class FEIRExprExtractBits : public FEIRExprUnary { public: FEIRExprExtractBits(Opcode argOp, PrimType argPrimType, uint8 argBitOffset, uint8 argBitSize, std::unique_ptr<FEIRExpr> argOpnd); FEIRExprExtractBits(Opcode argOp, PrimType argPrimType, std::unique_ptr<FEIRExpr> argOpnd); ~FEIRExprExtractBits() = default; static std::map<Opcode, bool> InitMapOpNestableForExtractBits(); void SetBitOffset(uint8 offset) { bitOffset = offset; } void SetBitSize(uint8 size) { bitSize = size; } protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; private: using FuncPtrGenMIRNode = BaseNode* (FEIRExprExtractBits::*)(MIRBuilder &mirBuilder) const; static std::map<Opcode, FuncPtrGenMIRNode> InitFuncPtrMapForParseExpr(); BaseNode *GenMIRNodeForExtrabits(MIRBuilder &mirBuilder) const; BaseNode *GenMIRNodeForExt(MIRBuilder &mirBuilder) const; uint8 bitOffset; uint8 bitSize; static std::map<Opcode, bool> mapOpNestable; static std::map<Opcode, FuncPtrGenMIRNode> funcPtrMapForParseExpr; }; // FEIRExprExtractBit // ---------- FEIRExprIRead ---------- class FEIRExprIRead : public FEIRExprUnary { public: FEIRExprIRead(Opcode op, std::unique_ptr<FEIRExpr> argOpnd); ~FEIRExprIRead() = default; protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; private: uint32 offset = 0; }; // ---------- FEIRExprBinary ---------- class FEIRExprBinary : public FEIRExpr { public: FEIRExprBinary(Opcode argOp, std::unique_ptr<FEIRExpr> argOpnd0, std::unique_ptr<FEIRExpr> argOpnd1); FEIRExprBinary(std::unique_ptr<FEIRType> exprType, Opcode argOp, std::unique_ptr<FEIRExpr> argOpnd0, std::unique_ptr<FEIRExpr> argOpnd1); ~FEIRExprBinary() = default; void SetOpnd0(std::unique_ptr<FEIRExpr> argOpnd); void SetOpnd1(std::unique_ptr<FEIRExpr> argOpnd); protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; std::vector<FEIRVar*> GetVarUsesImpl() const override; bool IsNestableImpl() const override; bool IsAddrofImpl() const override; private: using FuncPtrGenMIRNode = BaseNode* (FEIRExprBinary::*)(MIRBuilder &mirBuilder) const; static std::map<Opcode, FuncPtrGenMIRNode> InitFuncPtrMapForGenMIRNode(); BaseNode *GenMIRNodeNormal(MIRBuilder &mirBuilder) const; BaseNode *GenMIRNodeCompare(MIRBuilder &mirBuilder) const; BaseNode *GenMIRNodeCompareU1(MIRBuilder &mirBuilder) const; void SetExprTypeByOp(); void SetExprTypeByOpNormal(); void SetExprTypeByOpShift(); void SetExprTypeByOpLogic(); void SetExprTypeByOpCompare(); Opcode op; std::unique_ptr<FEIRExpr> opnd0; std::unique_ptr<FEIRExpr> opnd1; static std::map<Opcode, FuncPtrGenMIRNode> funcPtrMapForGenMIRNode; }; // class FEIRExprUnary // ---------- FEIRExprTernary ---------- class FEIRExprTernary : public FEIRExpr { public: FEIRExprTernary(Opcode argOp, std::unique_ptr<FEIRExpr> argOpnd0, std::unique_ptr<FEIRExpr> argOpnd1, std::unique_ptr<FEIRExpr> argOpnd2); ~FEIRExprTernary() = default; void SetOpnd(std::unique_ptr<FEIRExpr> argOpnd, uint32 idx); protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; std::vector<FEIRVar*> GetVarUsesImpl() const override; bool IsNestableImpl() const override; bool IsAddrofImpl() const override; private: void SetExprTypeByOp(); Opcode op; std::unique_ptr<FEIRExpr> opnd0; std::unique_ptr<FEIRExpr> opnd1; std::unique_ptr<FEIRExpr> opnd2; }; // ---------- FEIRExprNary ---------- class FEIRExprNary : public FEIRExpr { public: explicit FEIRExprNary(Opcode argOp); ~FEIRExprNary() = default; void AddOpnd(std::unique_ptr<FEIRExpr> argOpnd); void AddOpnds(const std::vector<std::unique_ptr<FEIRExpr>> &argOpnds); void ResetOpnd(); protected: std::vector<FEIRVar*> GetVarUsesImpl() const override; Opcode op; std::vector<std::unique_ptr<FEIRExpr>> opnds; }; // class FEIRExprNary // ---------- FEIRExprArray ---------- class FEIRExprArray : public FEIRExprNary { public: FEIRExprArray(Opcode argOp, std::unique_ptr<FEIRExpr> argArray, std::unique_ptr<FEIRExpr> argIndex); ~FEIRExprArray() = default; void SetOpndArray(std::unique_ptr<FEIRExpr> opndArray); void SetOpndIndex(std::unique_ptr<FEIRExpr> opndIndex); protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; bool IsNestableImpl() const override; bool IsAddrofImpl() const override; }; // class FEIRExprArray // ---------- FEIRExprIntrinsicop ---------- class FEIRExprIntrinsicop : public FEIRExprNary { public: FEIRExprIntrinsicop(std::unique_ptr<FEIRType> exprType, MIRIntrinsicID argIntrinsicID); FEIRExprIntrinsicop(std::unique_ptr<FEIRType> exprType, MIRIntrinsicID argIntrinsicID, std::unique_ptr<FEIRType> argParamType); FEIRExprIntrinsicop(std::unique_ptr<FEIRType> exprType, MIRIntrinsicID argIntrinsicID, const std::vector<std::unique_ptr<FEIRExpr>> &argOpnds); FEIRExprIntrinsicop(std::unique_ptr<FEIRType> exprType, MIRIntrinsicID argIntrinsicID, std::unique_ptr<FEIRType> argParamType, const std::vector<std::unique_ptr<FEIRExpr>> &argOpnds); ~FEIRExprIntrinsicop() = default; protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; bool IsNestableImpl() const override; bool IsAddrofImpl() const override; private: MIRIntrinsicID intrinsicID; std::unique_ptr<FEIRType> paramType; }; // class FEIRExprIntrinsicop // ---------- FEIRExprJavaNewInstance ---------- class FEIRExprJavaNewInstance : public FEIRExpr { public: explicit FEIRExprJavaNewInstance(UniqueFEIRType argType); ~FEIRExprJavaNewInstance() = default; protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; }; // ---------- FEIRExprJavaNewArray ---------- class FEIRExprJavaNewArray : public FEIRExpr { public: FEIRExprJavaNewArray(UniqueFEIRType argArrayType, UniqueFEIRExpr argExprSize); ~FEIRExprJavaNewArray() = default; void SetArrayType(UniqueFEIRType argArrayType) { CHECK_NULL_FATAL(argArrayType); arrayType = std::move(argArrayType); } void SetExprSize(UniqueFEIRExpr argExprSize) { CHECK_NULL_FATAL(argExprSize); exprSize = std::move(argExprSize); } protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; private: UniqueFEIRType arrayType; UniqueFEIRExpr exprSize; }; // ---------- FEIRExprJavaArrayLength ---------- class FEIRExprJavaArrayLength : public FEIRExpr { public: FEIRExprJavaArrayLength(UniqueFEIRExpr argExprArray); ~FEIRExprJavaArrayLength() = default; void SetExprArray(UniqueFEIRExpr argExprArray) { CHECK_NULL_FATAL(argExprArray); exprArray = std::move(argExprArray); } protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; private: UniqueFEIRExpr exprArray; }; // ---------- FEIRExprArrayLoad ---------- class FEIRExprArrayLoad : public FEIRExpr { public: FEIRExprArrayLoad(UniqueFEIRExpr argExprArray, UniqueFEIRExpr argExprIndex, UniqueFEIRType argTypeArray); ~FEIRExprArrayLoad() = default; const UniqueFEIRType GetElemType() const { UniqueFEIRType typeElem = typeArray->Clone(); (void)typeElem->ArrayDecrDim(); return typeElem; } protected: std::unique_ptr<FEIRExpr> CloneImpl() const override; BaseNode *GenMIRNodeImpl(MIRBuilder &mirBuilder) const override; private: UniqueFEIRExpr exprArray; UniqueFEIRExpr exprIndex; UniqueFEIRType typeArray; }; // ---------- FEIRStmtAssign ---------- class FEIRStmtAssign : public FEIRStmt { public: FEIRStmtAssign(FEIRNodeKind argKind, std::unique_ptr<FEIRVar> argVar); ~FEIRStmtAssign() = default; FEIRVar *GetVar() const { return var.get(); } void SetVar(std::unique_ptr<FEIRVar> argVar) { var = std::move(argVar); } bool HasException() const { return hasException; } void SetHasException(bool arg) { hasException = arg; } protected: bool hasException; std::unique_ptr<FEIRVar> var; }; // ---------- FEIRStmtDAssign ---------- class FEIRStmtDAssign : public FEIRStmtAssign { public: FEIRStmtDAssign(std::unique_ptr<FEIRVar> argVar, std::unique_ptr<FEIRExpr> argExpr, int32 argFieldID = 0); ~FEIRStmtDAssign() = default; FEIRExpr *GetExpr() const { return expr.get(); } void SetExpr(std::unique_ptr<FEIRExpr> argExpr) { expr = std::move(argExpr); } protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; std::unique_ptr<FEIRExpr> expr; int32 fieldID; }; // ---------- FEIRStmtJavaTypeCheck ---------- class FEIRStmtJavaTypeCheck : public FEIRStmtAssign { public: enum CheckKind { kCheckCast, kInstanceOf }; FEIRStmtJavaTypeCheck(std::unique_ptr<FEIRVar> argVar, std::unique_ptr<FEIRExpr> argExpr, std::unique_ptr<FEIRType> argType, CheckKind argCheckKind); ~FEIRStmtJavaTypeCheck() = default; protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; CheckKind checkKind; std::unique_ptr<FEIRExpr> expr; std::unique_ptr<FEIRType> type; }; // ---------- FEIRStmtJavaConstClass ---------- class FEIRStmtJavaConstClass : public FEIRStmtAssign { public: FEIRStmtJavaConstClass(std::unique_ptr<FEIRVar> argVar, std::unique_ptr<FEIRType> argType); ~FEIRStmtJavaConstClass() = default; protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; std::unique_ptr<FEIRType> type; }; // ---------- FEIRStmtJavaConstString ---------- class FEIRStmtJavaConstString : public FEIRStmtAssign { public: FEIRStmtJavaConstString(std::unique_ptr<FEIRVar> argVar, const GStrIdx &argStrIdx); ~FEIRStmtJavaConstString() = default; protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: GStrIdx strIdx; }; // ---------- FEIRStmtJavaMultiANewArray ---------- class FEIRStmtJavaMultiANewArray : public FEIRStmtAssign { public: FEIRStmtJavaMultiANewArray(std::unique_ptr<FEIRVar> argVar, std::unique_ptr<FEIRType> argType); ~FEIRStmtJavaMultiANewArray() = default; void AddVarSize(std::unique_ptr<FEIRVar> argVarSize); void AddVarSizeRev(std::unique_ptr<FEIRVar> argVarSize); protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: static const UniqueFEIRVar &GetVarSize(); static const UniqueFEIRVar &GetVarClass(); static const UniqueFEIRType &GetTypeAnnotation(); static FEStructMethodInfo &GetMethodInfoNewInstance(); std::unique_ptr<FEIRType> type; std::list<std::unique_ptr<FEIRExpr>> exprSizes; static UniqueFEIRVar varSize; static UniqueFEIRVar varClass; static UniqueFEIRType typeAnnotation; static FEStructMethodInfo *methodInfoNewInstance; }; // ---------- FEIRStmtUseOnly ---------- class FEIRStmtUseOnly : public FEIRStmt { public: FEIRStmtUseOnly(FEIRNodeKind argKind, Opcode argOp, std::unique_ptr<FEIRExpr> argExpr); FEIRStmtUseOnly(Opcode argOp, std::unique_ptr<FEIRExpr> argExpr); ~FEIRStmtUseOnly() = default; protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; Opcode op; std::unique_ptr<FEIRExpr> expr; }; // ---------- FEIRStmtReturn ---------- class FEIRStmtReturn : public FEIRStmtUseOnly { public: explicit FEIRStmtReturn(std::unique_ptr<FEIRExpr> argExpr); ~FEIRStmtReturn() = default; protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; }; // ---------- FEIRStmtPesudoLabel ---------- class FEIRStmtPesudoLabel : public FEIRStmt { public: FEIRStmtPesudoLabel(uint32 argLabelIdx); ~FEIRStmtPesudoLabel() = default; void GenerateLabelIdx(MIRBuilder &mirBuilder); uint32 GetLabelIdx() const { return labelIdx; } LabelIdx GetMIRLabelIdx() const { return mirLabelIdx; } protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; uint32 labelIdx; LabelIdx mirLabelIdx; }; // ---------- FEIRStmtGoto ---------- class FEIRStmtGoto : public FEIRStmt { public: explicit FEIRStmtGoto(uint32 argLabelIdx); virtual ~FEIRStmtGoto(); void SetLabelIdx(uint32 argLabelIdx) { labelIdx = argLabelIdx; } uint32 GetLabelIdx() const { return labelIdx; } void SetStmtTarget(FEIRStmtPesudoLabel *argStmtTarget) { stmtTarget = argStmtTarget; } const FEIRStmtPesudoLabel &GetStmtTargetRef() const { CHECK_NULL_FATAL(stmtTarget); return *stmtTarget; } protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; uint32 labelIdx; FEIRStmtPesudoLabel *stmtTarget; }; // ---------- FEIRStmtCondGoto ---------- class FEIRStmtCondGoto : public FEIRStmtGoto { public: FEIRStmtCondGoto(Opcode argOp, uint32 argLabelIdx, UniqueFEIRExpr argExpr); ~FEIRStmtCondGoto() = default; void SetOpcode(Opcode argOp) { op = argOp; } Opcode GetOpcode() const { return op; } void SetExpr(UniqueFEIRExpr argExpr) { CHECK_NULL_FATAL(argExpr); expr = std::move(argExpr); } protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: Opcode op; UniqueFEIRExpr expr; }; // ---------- FEIRStmtSwitch ---------- class FEIRStmtSwitch : public FEIRStmt { public: explicit FEIRStmtSwitch(UniqueFEIRExpr argExpr); ~FEIRStmtSwitch(); void SetDefaultLabelIdx(uint32 labelIdx) { defaultLabelIdx = labelIdx; } uint32 GetDefaultLabelIdx() const { return defaultLabelIdx; } void SetDefaultTarget(FEIRStmtPesudoLabel *stmtTarget) { defaultTarget = stmtTarget; } const std::map<int32, uint32> &GetMapValueLabelIdx() const { return mapValueLabelIdx; } void AddTarget(int32 value, uint32 labelIdx) { mapValueLabelIdx[value] = labelIdx; } void AddTarget(int32 value, FEIRStmtPesudoLabel *target) { mapValueTargets[value] = target; } void SetExpr(UniqueFEIRExpr argExpr) { CHECK_NULL_FATAL(argExpr); expr = std::move(argExpr); } protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: uint32 defaultLabelIdx; FEIRStmtPesudoLabel *defaultTarget; std::map<int32, uint32> mapValueLabelIdx; std::map<int32, FEIRStmtPesudoLabel*> mapValueTargets; UniqueFEIRExpr expr; }; // ---------- FEIRStmtArrayStore ---------- class FEIRStmtArrayStore : public FEIRStmt { public: FEIRStmtArrayStore(UniqueFEIRExpr argExprElem, UniqueFEIRExpr argExprArray, UniqueFEIRExpr argExprIndex, UniqueFEIRType argTypeArray); ~FEIRStmtArrayStore() = default; protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: UniqueFEIRExpr exprElem; UniqueFEIRExpr exprArray; UniqueFEIRExpr exprIndex; UniqueFEIRType typeArray; }; // ---------- FEIRStmtFieldStore ---------- class FEIRStmtFieldStore : public FEIRStmt { public: FEIRStmtFieldStore(UniqueFEIRVar argVarObj, UniqueFEIRVar argVarField, FEStructFieldInfo &argFieldInfo, bool argIsStatic); ~FEIRStmtFieldStore() = default; protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: std::list<StmtNode*> GenMIRStmtsImplForStatic(MIRBuilder &mirBuilder) const; std::list<StmtNode*> GenMIRStmtsImplForNonStatic(MIRBuilder &mirBuilder) const; UniqueFEIRVar varObj; UniqueFEIRVar varField; FEStructFieldInfo &fieldInfo; bool isStatic; }; // ---------- FEIRStmtFieldLoad ---------- class FEIRStmtFieldLoad : public FEIRStmtAssign { public: FEIRStmtFieldLoad(UniqueFEIRVar argVarObj, UniqueFEIRVar argVarField, FEStructFieldInfo &argFieldInfo, bool argIsStatic); ~FEIRStmtFieldLoad() = default; protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: std::list<StmtNode*> GenMIRStmtsImplForStatic(MIRBuilder &mirBuilder) const; std::list<StmtNode*> GenMIRStmtsImplForNonStatic(MIRBuilder &mirBuilder) const; UniqueFEIRVar varObj; FEStructFieldInfo &fieldInfo; bool isStatic; }; // ---------- FEIRStmtCallAssign ---------- class FEIRStmtCallAssign : public FEIRStmtAssign { public: FEIRStmtCallAssign(FEStructMethodInfo &argMethodInfo, Opcode argMIROp, UniqueFEIRVar argVarRet, bool argIsStatic); ~FEIRStmtCallAssign() = default; void AddExprArg(UniqueFEIRExpr exprArg) { exprArgs.push_back(std::move(exprArg)); } void AddExprArgReverse(UniqueFEIRExpr exprArg) { exprArgs.push_front(std::move(exprArg)); } static std::map<Opcode, Opcode> InitMapOpAssignToOp(); static std::map<Opcode, Opcode> InitMapOpToOpAssign(); protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; std::list<StmtNode*> GenMIRStmtsUseZeroReturn(MIRBuilder &mirBuilder) const; private: Opcode AdjustMIROp() const; FEStructMethodInfo &methodInfo; Opcode mirOp; bool isStatic; std::list<UniqueFEIRExpr> exprArgs; static std::map<Opcode, Opcode> mapOpAssignToOp; static std::map<Opcode, Opcode> mapOpToOpAssign; }; // ---------- FEIRStmtPesudoLOC ---------- class FEIRStmtPesudoLOC : public FEIRStmt { public: FEIRStmtPesudoLOC(uint32 argSrcFileIdx, uint32 argLineNumber); ~FEIRStmtPesudoLOC() = default; uint32 GetSrcFileIdx() const { return srcFileIdx; } uint32 GetLineNumber() const { return lineNumber; } protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: uint32 srcFileIdx; uint32 lineNumber; }; // ---------- FEIRStmtPesudoJavaTry ---------- class FEIRStmtPesudoJavaTry : public FEIRStmt { public: FEIRStmtPesudoJavaTry(); ~FEIRStmtPesudoJavaTry() = default; void AddCatchLabelIdx(uint32 labelIdx) { catchLabelIdxVec.push_back(labelIdx); } const std::vector<uint32> GetCatchLabelIdxVec() const { return catchLabelIdxVec; } void AddCatchTarget(FEIRStmtPesudoLabel *stmtLabel) { catchTargets.push_back(stmtLabel); } protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: std::vector<uint32> catchLabelIdxVec; std::vector<FEIRStmtPesudoLabel*> catchTargets; }; // ---------- FEIRStmtPesudoEndTry ---------- class FEIRStmtPesudoEndTry : public FEIRStmt { public: FEIRStmtPesudoEndTry(); ~FEIRStmtPesudoEndTry() = default; protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; }; // ---------- FEIRStmtPesudoCatch ---------- class FEIRStmtPesudoCatch : public FEIRStmtPesudoLabel { public: explicit FEIRStmtPesudoCatch(uint32 argLabelIdx); ~FEIRStmtPesudoCatch() = default; void AddCatchTypeNameIdx(GStrIdx typeNameIdx); protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: std::list<UniqueFEIRType> catchTypes; }; // ---------- FEIRStmtPesudoComment ---------- class FEIRStmtPesudoComment : public FEIRStmt { public: explicit FEIRStmtPesudoComment(FEIRNodeKind argKind = kStmtPesudoComment); explicit FEIRStmtPesudoComment(const std::string &argContent); ~FEIRStmtPesudoComment() = default; void SetContent(const std::string &argContent) { content = argContent; } protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; std::string content = ""; }; // ---------- FEIRStmtPesudoCommentForInst ---------- class FEIRStmtPesudoCommentForInst : public FEIRStmtPesudoComment { public: FEIRStmtPesudoCommentForInst(); ~FEIRStmtPesudoCommentForInst() = default; void SetFileIdx(uint32 argFileIdx) { fileIdx = argFileIdx; } void SetLineNum(uint32 argLineNum) { lineNum = argLineNum; } void SetPC(uint32 argPC) { pc = argPC; } protected: std::list<StmtNode*> GenMIRStmtsImpl(MIRBuilder &mirBuilder) const override; private: constexpr static uint32 invalid = 0xFFFFFFFF; uint32 fileIdx = invalid; uint32 lineNum = invalid; uint32 pc = invalid; }; } // namespace maple #endif // MPLFE_INCLUDE_COMMON_FEIR_STMT_H
[ "fuzhou@huawei.com" ]
fuzhou@huawei.com
7824c1d666735a72b95ad82d8d8164f195f37ab9
923b802a672e4f44496b7c2765c3e255814f214c
/ECS/src/ECS.hpp
425a4db1aaf562170c71a3bd466655cef87a48f7
[]
no_license
prince776/Entity-Component-System
4e98d945d179fa7ded9cf4c1bf1239152f49655d
dcf339b067be2f3c14935f2ce171b137e1d2a5f9
refs/heads/master
2022-11-30T13:34:41.524725
2020-08-08T10:31:51
2020-08-08T10:31:51
285,798,318
2
0
null
null
null
null
UTF-8
C++
false
false
2,529
hpp
#pragma once #include "Base.hpp" #include "EntityManager.hpp" #include "ComponentManager.hpp" #include "SystemManager.hpp" #include <memory> class ECS { public: void Init() // Maybe: change to constructor. { m_EntityManager = std::make_unique<EntityManager>(); m_ComponentManager = std::make_unique<ComponentManager>(); m_SystemManager = std::make_unique<SystemManager>(); } // Entity methods. Entity CreateEntity() { return m_EntityManager->CreateEntity(); } void DestroyEntity(Entity entity) { m_EntityManager->DestroyEntity(entity); m_ComponentManager->EntityDestroyed(entity); m_SystemManager->EntityDestroyed(entity); } // Component methods. template<typename T> void RegisterComponent() { m_ComponentManager->RegisterComponent<T>(); } template<typename T> void AddComponent(Entity entity, T&& component) { m_ComponentManager->AddComponent<T>(entity, std::forward<T>(component)); auto signature = m_EntityManager->GetSignature(entity); signature.set(m_ComponentManager->GetComponentType<T>(), true); m_EntityManager->SetSignature(entity, signature); m_SystemManager->EntitySignatureChanged(entity, signature); } template<typename T> void RemoveComponent(Entity entity) { m_ComponentManager->RemoveComponent<T>(entity); auto signature = m_EntityManager->GetSignature(entity); signature.set(m_ComponentManager->GetComponentType<T>(), false); m_EntityManager->SetSignature(entity, signature); m_SystemManager->EntitySignatureChanged(entity, signature); } template<typename T> T& GetComponent(Entity entity) { return m_ComponentManager->GetComponent<T>(entity); } template<typename T> ComponentType GetComponentType() { return m_ComponentManager->GetComponentType<T>(); } // System methods. template<typename T, typename... Args> std::shared_ptr<T> RegisterSystem(Args&&... params) { return m_SystemManager->RegisterSystem<T>(std::forward<Args>(params)...); } template<typename T> void SetSystemSignature(Signature signature) { m_SystemManager->SetSignature<T>(signature); } const std::unique_ptr<EntityManager>& GetEntityManager() const { return m_EntityManager; } const std::unique_ptr<ComponentManager>& GetComponentManager() const { return m_ComponentManager; } const std::unique_ptr<SystemManager>& GetSystemManager() const { return m_SystemManager; } private: std::unique_ptr<EntityManager> m_EntityManager; std::unique_ptr<ComponentManager> m_ComponentManager; std::unique_ptr<SystemManager> m_SystemManager; };
[ "princemit776@gmail.com" ]
princemit776@gmail.com
9b2a9f9435959d6e5a4241f6719dbe1d931e0164
7aacbaed503540a7892a56bcf9ee0e2e2019c2c8
/src/masternode.cpp
baccb82d8ae2517b3562dc82e9beb81fd2226cdb
[ "MIT" ]
permissive
CryptoBackups/oryxcoin
0eabbb451c720fb40ab249b1c1064d3874d064ce
f5ffba0c8d9b10d8eb4ea11e6ec77458aefa68f7
refs/heads/master
2020-03-31T10:36:01.087494
2018-07-21T08:06:31
2018-07-21T08:06:31
null
0
0
null
null
null
null
UTF-8
C++
false
false
29,075
cpp
// Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "masternode.h" #include "addrman.h" #include "masternodeman.h" #include "masternode-payments.h" #include "masternode-helpers.h" #include "sync.h" #include "util.h" #include "init.h" #include "wallet.h" #include "activemasternode.h" #include <boost/lexical_cast.hpp> // keep track of the scanning errors I've seen map<uint256, int> mapSeenMasternodeScanningErrors; // cache block hashes as we calculate them std::map<int64_t, uint256> mapCacheBlockHashes; //Get the last hash that matches the modulus given. Processed in reverse order bool GetBlockHash(uint256& hash, int nBlockHeight) { if (chainActive.Tip() == NULL) return false; if (nBlockHeight == 0) nBlockHeight = chainActive.Tip()->nHeight; if (mapCacheBlockHashes.count(nBlockHeight)) { hash = mapCacheBlockHashes[nBlockHeight]; return true; } const CBlockIndex* BlockLastSolved = chainActive.Tip(); const CBlockIndex* BlockReading = chainActive.Tip(); if (BlockLastSolved == NULL || BlockLastSolved->nHeight == 0 || chainActive.Tip()->nHeight + 1 < nBlockHeight) return false; int nBlocksAgo = 0; if (nBlockHeight > 0) nBlocksAgo = (chainActive.Tip()->nHeight + 1) - nBlockHeight; assert(nBlocksAgo >= 0); int n = 0; for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) { if (n >= nBlocksAgo) { hash = BlockReading->GetBlockHash(); mapCacheBlockHashes[nBlockHeight] = hash; return true; } n++; if (BlockReading->pprev == NULL) { assert(BlockReading); break; } BlockReading = BlockReading->pprev; } return false; } CMasternode::CMasternode() { LOCK(cs); vin = CTxIn(); addr = CService(); pubKeyCollateralAddress = CPubKey(); pubKeyMasternode = CPubKey(); sig = std::vector<unsigned char>(); activeState = MASTERNODE_ENABLED; sigTime = GetAdjustedTime(); lastPing = CMasternodePing(); cacheInputAge = 0; cacheInputAgeBlock = 0; unitTest = false; allowFreeTx = true; nActiveState = MASTERNODE_ENABLED, protocolVersion = PROTOCOL_VERSION; nLastDsq = 0; nScanningErrorCount = 0; nLastScanningErrorBlockHeight = 0; lastTimeChecked = 0; nLastDsee = 0; // temporary, do not save. Remove after migration to v12 nLastDseep = 0; // temporary, do not save. Remove after migration to v12 } CMasternode::CMasternode(const CMasternode& other) { LOCK(cs); vin = other.vin; addr = other.addr; pubKeyCollateralAddress = other.pubKeyCollateralAddress; pubKeyMasternode = other.pubKeyMasternode; sig = other.sig; activeState = other.activeState; sigTime = other.sigTime; lastPing = other.lastPing; cacheInputAge = other.cacheInputAge; cacheInputAgeBlock = other.cacheInputAgeBlock; unitTest = other.unitTest; allowFreeTx = other.allowFreeTx; nActiveState = MASTERNODE_ENABLED, protocolVersion = other.protocolVersion; nLastDsq = other.nLastDsq; nScanningErrorCount = other.nScanningErrorCount; nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight; lastTimeChecked = 0; nLastDsee = other.nLastDsee; // temporary, do not save. Remove after migration to v12 nLastDseep = other.nLastDseep; // temporary, do not save. Remove after migration to v12 } CMasternode::CMasternode(const CMasternodeBroadcast& mnb) { LOCK(cs); vin = mnb.vin; addr = mnb.addr; pubKeyCollateralAddress = mnb.pubKeyCollateralAddress; pubKeyMasternode = mnb.pubKeyMasternode; sig = mnb.sig; activeState = MASTERNODE_ENABLED; sigTime = mnb.sigTime; lastPing = mnb.lastPing; cacheInputAge = 0; cacheInputAgeBlock = 0; unitTest = false; allowFreeTx = true; nActiveState = MASTERNODE_ENABLED, protocolVersion = mnb.protocolVersion; nLastDsq = mnb.nLastDsq; nScanningErrorCount = 0; nLastScanningErrorBlockHeight = 0; lastTimeChecked = 0; nLastDsee = 0; // temporary, do not save. Remove after migration to v12 nLastDseep = 0; // temporary, do not save. Remove after migration to v12 } // // When a new masternode broadcast is sent, update our information // bool CMasternode::UpdateFromNewBroadcast(CMasternodeBroadcast& mnb) { if (mnb.sigTime > sigTime) { pubKeyMasternode = mnb.pubKeyMasternode; pubKeyCollateralAddress = mnb.pubKeyCollateralAddress; sigTime = mnb.sigTime; sig = mnb.sig; protocolVersion = mnb.protocolVersion; addr = mnb.addr; lastTimeChecked = 0; int nDoS = 0; if (mnb.lastPing == CMasternodePing() || (mnb.lastPing != CMasternodePing() && mnb.lastPing.CheckAndUpdate(nDoS, false))) { lastPing = mnb.lastPing; mnodeman.mapSeenMasternodePing.insert(make_pair(lastPing.GetHash(), lastPing)); } return true; } return false; } // // Deterministically calculate a given "score" for a Masternode depending on how close it's hash is to // the proof of work for that block. The further away they are the better, the furthest will win the election // and get paid this block // uint256 CMasternode::CalculateScore(int mod, int64_t nBlockHeight) { if (chainActive.Tip() == NULL) return 0; uint256 hash = 0; uint256 aux = vin.prevout.hash + vin.prevout.n; if (!GetBlockHash(hash, nBlockHeight)) { LogPrint("masternode","CalculateScore ERROR - nHeight %d - Returned 0\n", nBlockHeight); return 0; } CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION); ss << hash; uint256 hash2 = ss.GetHash(); CHashWriter ss2(SER_GETHASH, PROTOCOL_VERSION); ss2 << hash; ss2 << aux; uint256 hash3 = ss2.GetHash(); uint256 r = (hash3 > hash2 ? hash3 - hash2 : hash2 - hash3); return r; } void CMasternode::Check(bool forceCheck) { if (ShutdownRequested()) return; if (!forceCheck && (GetTime() - lastTimeChecked < MASTERNODE_CHECK_SECONDS)) return; lastTimeChecked = GetTime(); //once spent, stop doing the checks if (activeState == MASTERNODE_VIN_SPENT) return; if (!IsPingedWithin(MASTERNODE_REMOVAL_SECONDS)) { activeState = MASTERNODE_REMOVE; return; } if (!IsPingedWithin(MASTERNODE_EXPIRATION_SECONDS)) { activeState = MASTERNODE_EXPIRED; return; } if (!unitTest) { CValidationState state; CMutableTransaction tx = CMutableTransaction(); CTxOut vout = CTxOut((MASTERNODE_COLLATERAL-0.01) * COIN, masternodeSigner.collateralPubKey); tx.vin.push_back(vin); tx.vout.push_back(vout); { TRY_LOCK(cs_main, lockMain); if (!lockMain) return; if (!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)) { activeState = MASTERNODE_VIN_SPENT; return; } } } activeState = MASTERNODE_ENABLED; // OK } int64_t CMasternode::SecondsSincePayment() { CScript pubkeyScript; pubkeyScript = GetScriptForDestination(pubKeyCollateralAddress.GetID()); int64_t sec = (GetAdjustedTime() - GetLastPaid()); int64_t month = 60 * 60 * 24 * 30; if (sec < month) return sec; //if it's less than 30 days, give seconds CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION); ss << vin; ss << sigTime; uint256 hash = ss.GetHash(); // return some deterministic value for unknown/unpaid but force it to be more than 30 days old return month + hash.GetCompact(false); } int64_t CMasternode::GetLastPaid() { CBlockIndex* pindexPrev = chainActive.Tip(); if (pindexPrev == NULL) return false; CScript mnpayee; mnpayee = GetScriptForDestination(pubKeyCollateralAddress.GetID()); CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION); ss << vin; ss << sigTime; uint256 hash = ss.GetHash(); // use a deterministic offset to break a tie -- 2.5 minutes int64_t nOffset = hash.GetCompact(false) % 150; if (chainActive.Tip() == NULL) return false; const CBlockIndex* BlockReading = chainActive.Tip(); int nMnCount = mnodeman.CountEnabled() * 1.25; int n = 0; for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) { if (n >= nMnCount) { return 0; } n++; if (masternodePayments.mapMasternodeBlocks.count(BlockReading->nHeight)) { /* Search for this payee, with at least 2 votes. This will aid in consensus allowing the network to converge on the same payees quickly, then keep the same schedule. */ if (masternodePayments.mapMasternodeBlocks[BlockReading->nHeight].HasPayeeWithVotes(mnpayee, 2)) { return BlockReading->nTime + nOffset; } } if (BlockReading->pprev == NULL) { assert(BlockReading); break; } BlockReading = BlockReading->pprev; } return 0; } std::string CMasternode::GetStatus() { switch (nActiveState) { case CMasternode::MASTERNODE_PRE_ENABLED: return "PRE_ENABLED"; case CMasternode::MASTERNODE_ENABLED: return "ENABLED"; case CMasternode::MASTERNODE_EXPIRED: return "EXPIRED"; case CMasternode::MASTERNODE_OUTPOINT_SPENT: return "OUTPOINT_SPENT"; case CMasternode::MASTERNODE_REMOVE: return "REMOVE"; case CMasternode::MASTERNODE_WATCHDOG_EXPIRED: return "WATCHDOG_EXPIRED"; case CMasternode::MASTERNODE_POSE_BAN: return "POSE_BAN"; default: return "UNKNOWN"; } } bool CMasternode::IsValidNetAddr() { // TODO: regtest is fine with any addresses for now, // should probably be a bit smarter if one day we start to implement tests for this return Params().NetworkID() == CBaseChainParams::REGTEST || (IsReachable(addr) && addr.IsRoutable()); } CMasternodeBroadcast::CMasternodeBroadcast() { vin = CTxIn(); addr = CService(); pubKeyCollateralAddress = CPubKey(); pubKeyMasternode1 = CPubKey(); sig = std::vector<unsigned char>(); activeState = MASTERNODE_ENABLED; sigTime = GetAdjustedTime(); lastPing = CMasternodePing(); cacheInputAge = 0; cacheInputAgeBlock = 0; unitTest = false; allowFreeTx = true; protocolVersion = PROTOCOL_VERSION; nLastDsq = 0; nScanningErrorCount = 0; nLastScanningErrorBlockHeight = 0; } CMasternodeBroadcast::CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubKey pubKeyCollateralAddressNew, CPubKey pubKeyMasternodeNew, int protocolVersionIn) { vin = newVin; addr = newAddr; pubKeyCollateralAddress = pubKeyCollateralAddressNew; pubKeyMasternode = pubKeyMasternodeNew; sig = std::vector<unsigned char>(); activeState = MASTERNODE_ENABLED; sigTime = GetAdjustedTime(); lastPing = CMasternodePing(); cacheInputAge = 0; cacheInputAgeBlock = 0; unitTest = false; allowFreeTx = true; protocolVersion = protocolVersionIn; nLastDsq = 0; nScanningErrorCount = 0; nLastScanningErrorBlockHeight = 0; } CMasternodeBroadcast::CMasternodeBroadcast(const CMasternode& mn) { vin = mn.vin; addr = mn.addr; pubKeyCollateralAddress = mn.pubKeyCollateralAddress; pubKeyMasternode = mn.pubKeyMasternode; sig = mn.sig; activeState = mn.activeState; sigTime = mn.sigTime; lastPing = mn.lastPing; cacheInputAge = mn.cacheInputAge; cacheInputAgeBlock = mn.cacheInputAgeBlock; unitTest = mn.unitTest; allowFreeTx = mn.allowFreeTx; protocolVersion = mn.protocolVersion; nLastDsq = mn.nLastDsq; nScanningErrorCount = mn.nScanningErrorCount; nLastScanningErrorBlockHeight = mn.nLastScanningErrorBlockHeight; } bool CMasternodeBroadcast::Create(std::string strService, std::string strKeyMasternode, std::string strTxHash, std::string strOutputIndex, std::string& strErrorRet, CMasternodeBroadcast& mnbRet, bool fOffline) { CTxIn txin; CPubKey pubKeyCollateralAddressNew; CKey keyCollateralAddressNew; CPubKey pubKeyMasternodeNew; CKey keyMasternodeNew; //need correct blocks to send ping if (!fOffline && !masternodeSync.IsBlockchainSynced()) { strErrorRet = "Sync in progress. Must wait until sync is complete to start Masternode"; LogPrint("masternode","CMasternodeBroadcast::Create -- %s\n", strErrorRet); return false; } if (!masternodeSigner.GetKeysFromSecret(strKeyMasternode, keyMasternodeNew, pubKeyMasternodeNew)) { strErrorRet = strprintf("Invalid masternode key %s", strKeyMasternode); LogPrint("masternode","CMasternodeBroadcast::Create -- %s\n", strErrorRet); return false; } if (!pwalletMain->GetMasternodeVinAndKeys(txin, pubKeyCollateralAddressNew, keyCollateralAddressNew, strTxHash, strOutputIndex)) { strErrorRet = strprintf("Could not allocate txin %s:%s for masternode %s", strTxHash, strOutputIndex, strService); LogPrint("masternode","CMasternodeBroadcast::Create -- %s\n", strErrorRet); return false; } // CService service = CService(strService); // int mainnetDefaultPort = Params(CBaseChainParams::MAIN).GetDefaultPort(); // if (Params().NetworkID() == CBaseChainParams::MAIN) { // if (service.GetPort() != mainnetDefaultPort) { // strErrorRet = strprintf("Invalid port %u for masternode %s, only %d is supported on mainnet.", service.GetPort(), strService, mainnetDefaultPort); // LogPrint("masternode","CMasternodeBroadcast::Create -- %s\n", strErrorRet); // return false; // } // } else if (service.GetPort() == mainnetDefaultPort) { // strErrorRet = strprintf("Invalid port %u for masternode %s, %d is the only supported on mainnet.", service.GetPort(), strService, mainnetDefaultPort); // LogPrint("masternode","CMasternodeBroadcast::Create -- %s\n", strErrorRet); // return false; // } return Create(txin, CService(strService), keyCollateralAddressNew, pubKeyCollateralAddressNew, keyMasternodeNew, pubKeyMasternodeNew, strErrorRet, mnbRet); } bool CMasternodeBroadcast::Create(CTxIn txin, CService service, CKey keyCollateralAddressNew, CPubKey pubKeyCollateralAddressNew, CKey keyMasternodeNew, CPubKey pubKeyMasternodeNew, std::string& strErrorRet, CMasternodeBroadcast& mnbRet) { // wait for reindex and/or import to finish if (fImporting || fReindex) return false; LogPrint("masternode", "CMasternodeBroadcast::Create -- pubKeyCollateralAddressNew = %s, pubKeyMasternodeNew.GetID() = %s\n", CBitcoinAddress(pubKeyCollateralAddressNew.GetID()).ToString(), pubKeyMasternodeNew.GetID().ToString()); CMasternodePing mnp(txin); if (!mnp.Sign(keyMasternodeNew, pubKeyMasternodeNew)) { strErrorRet = strprintf("Failed to sign ping, masternode=%s", txin.prevout.hash.ToString()); LogPrint("masternode","CMasternodeBroadcast::Create -- %s\n", strErrorRet); mnbRet = CMasternodeBroadcast(); return false; } mnbRet = CMasternodeBroadcast(service, txin, pubKeyCollateralAddressNew, pubKeyMasternodeNew, PROTOCOL_VERSION); // if (!mnbRet.IsValidNetAddr()) { // strErrorRet = strprintf("Invalid IP address %s, masternode=%s", mnbRet.addr.ToStringIP (), txin.prevout.hash.ToString()); // LogPrint("masternode","CMasternodeBroadcast::Create -- %s\n", strErrorRet); // mnbRet = CMasternodeBroadcast(); // return false; // } mnbRet.lastPing = mnp; if (!mnbRet.Sign(keyCollateralAddressNew)) { strErrorRet = strprintf("Failed to sign broadcast, masternode=%s", txin.prevout.hash.ToString()); LogPrint("masternode","CMasternodeBroadcast::Create -- %s\n", strErrorRet); mnbRet = CMasternodeBroadcast(); return false; } return true; } bool CMasternodeBroadcast::CheckAndUpdate(int& nDos) { // make sure signature isn't in the future (past is OK) if (sigTime > GetAdjustedTime() + 60 * 60) { LogPrint("masternode","mnb - Signature rejected, too far into the future %s\n", vin.prevout.hash.ToString()); nDos = 1; return false; } std::string vchPubKey(pubKeyCollateralAddress.begin(), pubKeyCollateralAddress.end()); std::string vchPubKey2(pubKeyMasternode.begin(), pubKeyMasternode.end()); std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion); if (protocolVersion < masternodePayments.GetMinMasternodePaymentsProto()) { LogPrint("masternode","mnb - ignoring outdated Masternode %s protocol version %d\n", vin.prevout.hash.ToString(), protocolVersion); return false; } CScript pubkeyScript; pubkeyScript = GetScriptForDestination(pubKeyCollateralAddress.GetID()); if (pubkeyScript.size() != 25) { LogPrint("masternode","mnb - pubkey the wrong size\n"); nDos = 100; return false; } CScript pubkeyScript2; pubkeyScript2 = GetScriptForDestination(pubKeyMasternode.GetID()); if (pubkeyScript2.size() != 25) { LogPrint("masternode","mnb - pubkey2 the wrong size\n"); nDos = 100; return false; } if (!vin.scriptSig.empty()) { LogPrint("masternode","mnb - Ignore Not Empty ScriptSig %s\n", vin.prevout.hash.ToString()); return false; } std::string errorMessage = ""; if (!masternodeSigner.VerifyMessage(pubKeyCollateralAddress, sig, strMessage, errorMessage)) { LogPrint("masternode","mnb - Got bad Masternode address signature\n"); nDos = 100; return false; } // if (Params().NetworkID() == CBaseChainParams::MAIN) { // if (addr.GetPort() != 9333) return false; // } else if (addr.GetPort() == 9333) // return false; //search existing Masternode list, this is where we update existing Masternodes with new mnb broadcasts CMasternode* pmn = mnodeman.Find(vin); // no such masternode, nothing to update if (pmn == NULL) return true; else { // this broadcast older than we have, it's bad. if (pmn->sigTime > sigTime) { LogPrint("masternode","mnb - Bad sigTime %d for Masternode %s (existing broadcast is at %d)\n", sigTime, vin.prevout.hash.ToString(), pmn->sigTime); return false; } // masternode is not enabled yet/already, nothing to update if (!pmn->IsEnabled()) return true; } // mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below, // after that they just need to match if (pmn->pubKeyCollateralAddress == pubKeyCollateralAddress && !pmn->IsBroadcastedWithin(MASTERNODE_MIN_MNB_SECONDS)) { //take the newest entry LogPrint("masternode","mnb - Got updated entry for %s\n", vin.prevout.hash.ToString()); if (pmn->UpdateFromNewBroadcast((*this))) { pmn->Check(); if (pmn->IsEnabled()) Relay(); } masternodeSync.AddedMasternodeList(GetHash()); } return true; } bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS) { // we are a masternode with the same vin (i.e. already activated) and this mnb is ours (matches our Masternode privkey) // so nothing to do here for us if (fMasterNode && vin.prevout == activeMasternode.vin.prevout && pubKeyMasternode == activeMasternode.pubKeyMasternode) return true; // search existing Masternode list CMasternode* pmn = mnodeman.Find(vin); if (pmn != NULL) { // nothing to do here if we already know about this masternode and it's enabled if (pmn->IsEnabled()) return true; // if it's not enabled, remove old MN first and continue else mnodeman.Remove(pmn->vin); } CValidationState state; CMutableTransaction tx = CMutableTransaction(); CTxOut vout = CTxOut((MASTERNODE_COLLATERAL-0.01) * COIN, masternodeSigner.collateralPubKey); tx.vin.push_back(vin); tx.vout.push_back(vout); { TRY_LOCK(cs_main, lockMain); if (!lockMain) { // not mnb fault, let it to be checked again later mnodeman.mapSeenMasternodeBroadcast.erase(GetHash()); masternodeSync.mapSeenSyncMNB.erase(GetHash()); return false; } if (!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)) { //set nDos state.IsInvalid(nDoS); return false; } } LogPrint("masternode", "mnb - Accepted Masternode entry\n"); if (GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS) { LogPrint("masternode","mnb - Input must have at least %d confirmations\n", MASTERNODE_MIN_CONFIRMATIONS); // maybe we miss few blocks, let this mnb to be checked again later mnodeman.mapSeenMasternodeBroadcast.erase(GetHash()); masternodeSync.mapSeenSyncMNB.erase(GetHash()); return false; } // verify that sig time is legit in past // should be at least not earlier than block when 1000 ORYX tx got MASTERNODE_MIN_CONFIRMATIONS uint256 hashBlock = 0; CTransaction tx2; GetTransaction(vin.prevout.hash, tx2, hashBlock, true); BlockMap::iterator mi = mapBlockIndex.find(hashBlock); if (mi != mapBlockIndex.end() && (*mi).second) { CBlockIndex* pMNIndex = (*mi).second; // block for 1000 PIVX tx -> 1 confirmation CBlockIndex* pConfIndex = chainActive[pMNIndex->nHeight + MASTERNODE_MIN_CONFIRMATIONS - 1]; // block where tx got MASTERNODE_MIN_CONFIRMATIONS if (pConfIndex->GetBlockTime() > sigTime) { LogPrint("masternode","mnb - Bad sigTime %d for Masternode %s (%i conf block is at %d)\n", sigTime, vin.prevout.hash.ToString(), MASTERNODE_MIN_CONFIRMATIONS, pConfIndex->GetBlockTime()); return false; } } LogPrint("masternode","mnb - Got NEW Masternode entry - %s - %lli \n", vin.prevout.hash.ToString(), sigTime); CMasternode mn(*this); mnodeman.Add(mn); // if it matches our Masternode privkey, then we've been remotely activated if (pubKeyMasternode == activeMasternode.pubKeyMasternode && protocolVersion == PROTOCOL_VERSION) { activeMasternode.EnableHotColdMasterNode(vin, addr); } bool isLocal = addr.IsRFC1918() || addr.IsLocal(); if (Params().NetworkID() == CBaseChainParams::REGTEST) isLocal = false; if (!isLocal) Relay(); return true; } void CMasternodeBroadcast::Relay() { CInv inv(MSG_MASTERNODE_ANNOUNCE, GetHash()); RelayInv(inv); } bool CMasternodeBroadcast::Sign(CKey& keyCollateralAddress) { std::string errorMessage; std::string vchPubKey(pubKeyCollateralAddress.begin(), pubKeyCollateralAddress.end()); std::string vchPubKey2(pubKeyMasternode.begin(), pubKeyMasternode.end()); sigTime = GetAdjustedTime(); std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion); if (!masternodeSigner.SignMessage(strMessage, errorMessage, sig, keyCollateralAddress)) { LogPrint("masternode","CMasternodeBroadcast::Sign() - Error: %s\n", errorMessage); return false; } if (!masternodeSigner.VerifyMessage(pubKeyCollateralAddress, sig, strMessage, errorMessage)) { LogPrint("masternode","CMasternodeBroadcast::Sign() - Error: %s\n", errorMessage); return false; } return true; } CMasternodePing::CMasternodePing() { vin = CTxIn(); blockHash = uint256(0); sigTime = 0; vchSig = std::vector<unsigned char>(); } CMasternodePing::CMasternodePing(CTxIn& newVin) { vin = newVin; blockHash = chainActive[chainActive.Height() - 12]->GetBlockHash(); sigTime = GetAdjustedTime(); vchSig = std::vector<unsigned char>(); } bool CMasternodePing::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode) { std::string errorMessage; std::string strMasterNodeSignMessage; sigTime = GetAdjustedTime(); std::string strMessage = vin.ToString() + blockHash.ToString() + boost::lexical_cast<std::string>(sigTime); if (!masternodeSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode)) { LogPrint("masternode","CMasternodePing::Sign() - Error: %s\n", errorMessage); return false; } if (!masternodeSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage)) { LogPrint("masternode","CMasternodePing::Sign() - Error: %s\n", errorMessage); return false; } return true; } bool CMasternodePing::CheckAndUpdate(int& nDos, bool fRequireEnabled) { if (sigTime > GetAdjustedTime() + 60 * 60) { LogPrint("masternode","CMasternodePing::CheckAndUpdate - Signature rejected, too far into the future %s\n", vin.prevout.hash.ToString()); nDos = 1; return false; } if (sigTime <= GetAdjustedTime() - 60 * 60) { LogPrint("masternode","CMasternodePing::CheckAndUpdate - Signature rejected, too far into the past %s - %d %d \n", vin.prevout.hash.ToString(), sigTime, GetAdjustedTime()); nDos = 1; return false; } LogPrint("masternode","CMasternodePing::CheckAndUpdate - New Ping - %s - %lli\n", blockHash.ToString(), sigTime); // see if we have this Masternode CMasternode* pmn = mnodeman.Find(vin); if (pmn != NULL && pmn->protocolVersion >= masternodePayments.GetMinMasternodePaymentsProto()) { if (fRequireEnabled && !pmn->IsEnabled()) return false; // LogPrint("masternode","mnping - Found corresponding mn for vin: %s\n", vin.ToString()); // update only if there is no known ping for this masternode or // last ping was more then MASTERNODE_MIN_MNP_SECONDS-60 ago comparing to this one if (!pmn->IsPingedWithin(MASTERNODE_MIN_MNP_SECONDS - 60, sigTime)) { std::string strMessage = vin.ToString() + blockHash.ToString() + boost::lexical_cast<std::string>(sigTime); std::string errorMessage = ""; if (!masternodeSigner.VerifyMessage(pmn->pubKeyMasternode, vchSig, strMessage, errorMessage)) { LogPrint("masternode","CMasternodePing::CheckAndUpdate - Got bad Masternode address signature %s\n", vin.prevout.hash.ToString()); nDos = 33; return false; } BlockMap::iterator mi = mapBlockIndex.find(blockHash); if (mi != mapBlockIndex.end() && (*mi).second) { if ((*mi).second->nHeight < chainActive.Height() - 24) { LogPrint("masternode","CMasternodePing::CheckAndUpdate - Masternode %s block hash %s is too old\n", vin.prevout.hash.ToString(), blockHash.ToString()); // Do nothing here (no Masternode update, no mnping relay) // Let this node to be visible but fail to accept mnping return false; } } else { if (fDebug) LogPrint("masternode","CMasternodePing::CheckAndUpdate - Masternode %s block hash %s is unknown\n", vin.prevout.hash.ToString(), blockHash.ToString()); // maybe we stuck so we shouldn't ban this node, just fail to accept it // TODO: or should we also request this block? return false; } pmn->lastPing = *this; //mnodeman.mapSeenMasternodeBroadcast.lastPing is probably outdated, so we'll update it CMasternodeBroadcast mnb(*pmn); uint256 hash = mnb.GetHash(); if (mnodeman.mapSeenMasternodeBroadcast.count(hash)) { mnodeman.mapSeenMasternodeBroadcast[hash].lastPing = *this; } pmn->Check(true); if (!pmn->IsEnabled()) return false; LogPrint("masternode", "CMasternodePing::CheckAndUpdate - Masternode ping accepted, vin: %s\n", vin.prevout.hash.ToString()); Relay(); return true; } LogPrint("masternode", "CMasternodePing::CheckAndUpdate - Masternode ping arrived too early, vin: %s\n", vin.prevout.hash.ToString()); //nDos = 1; //disable, this is happening frequently and causing banned peers return false; } LogPrint("masternode", "CMasternodePing::CheckAndUpdate - Couldn't find compatible Masternode entry, vin: %s\n", vin.prevout.hash.ToString()); return false; } void CMasternodePing::Relay() { CInv inv(MSG_MASTERNODE_PING, GetHash()); RelayInv(inv); }
[ "39878257+oryxian@users.noreply.github.com" ]
39878257+oryxian@users.noreply.github.com
204cc3a4c8b894c9661ac7aad040db0aae79d123
cc3af5b307ffaa99ec2a8945e3b72acd07b0a132
/src/walletdb.cpp
d934955f298b9bba4adbbd6961a362011e17bafb
[ "MIT" ]
permissive
taeany/WorkPlaceCoin
fbe9dc1b1745963b3a45e66ed88c9cd3d6c199c9
bddfa6ab39a532d10c413542f616482e92749511
refs/heads/master
2020-05-21T15:27:14.595486
2019-04-28T15:46:38
2019-04-28T15:46:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
53,645
cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2018 The PIVX developers // Copyright (c) 2019 The WorkPlaceCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "walletdb.h" #include "base58.h" #include "protocol.h" #include "serialize.h" #include "sync.h" #include "txdb.h" #include "util.h" #include "utiltime.h" #include "wallet.h" #include <primitives/deterministicmint.h> #include <boost/filesystem.hpp> #include <boost/foreach.hpp> #include <boost/scoped_ptr.hpp> #include <boost/thread.hpp> #include <fstream> using namespace boost; using namespace std; static uint64_t nAccountingEntryNumber = 0; // // CWalletDB // bool CWalletDB::WriteName(const string& strAddress, const string& strName) { nWalletDBUpdated++; return Write(make_pair(string("name"), strAddress), strName); } bool CWalletDB::EraseName(const string& strAddress) { // This should only be used for sending addresses, never for receiving addresses, // receiving addresses must always have an address book entry if they're not change return. nWalletDBUpdated++; return Erase(make_pair(string("name"), strAddress)); } bool CWalletDB::WritePurpose(const string& strAddress, const string& strPurpose) { nWalletDBUpdated++; return Write(make_pair(string("purpose"), strAddress), strPurpose); } bool CWalletDB::ErasePurpose(const string& strPurpose) { nWalletDBUpdated++; return Erase(make_pair(string("purpose"), strPurpose)); } bool CWalletDB::WriteTx(uint256 hash, const CWalletTx& wtx) { nWalletDBUpdated++; return Write(std::make_pair(std::string("tx"), hash), wtx); } bool CWalletDB::EraseTx(uint256 hash) { nWalletDBUpdated++; return Erase(std::make_pair(std::string("tx"), hash)); } bool CWalletDB::WriteKey(const CPubKey& vchPubKey, const CPrivKey& vchPrivKey, const CKeyMetadata& keyMeta) { nWalletDBUpdated++; if (!Write(std::make_pair(std::string("keymeta"), vchPubKey), keyMeta, false)) return false; // hash pubkey/privkey to accelerate wallet load std::vector<unsigned char> vchKey; vchKey.reserve(vchPubKey.size() + vchPrivKey.size()); vchKey.insert(vchKey.end(), vchPubKey.begin(), vchPubKey.end()); vchKey.insert(vchKey.end(), vchPrivKey.begin(), vchPrivKey.end()); return Write(std::make_pair(std::string("key"), vchPubKey), std::make_pair(vchPrivKey, Hash(vchKey.begin(), vchKey.end())), false); } bool CWalletDB::WriteCryptedKey(const CPubKey& vchPubKey, const std::vector<unsigned char>& vchCryptedSecret, const CKeyMetadata& keyMeta) { const bool fEraseUnencryptedKey = true; nWalletDBUpdated++; if (!Write(std::make_pair(std::string("keymeta"), vchPubKey), keyMeta)) return false; if (!Write(std::make_pair(std::string("ckey"), vchPubKey), vchCryptedSecret, false)) return false; if (fEraseUnencryptedKey) { Erase(std::make_pair(std::string("key"), vchPubKey)); Erase(std::make_pair(std::string("wkey"), vchPubKey)); } return true; } bool CWalletDB::WriteMasterKey(unsigned int nID, const CMasterKey& kMasterKey) { nWalletDBUpdated++; return Write(std::make_pair(std::string("mkey"), nID), kMasterKey, true); } bool CWalletDB::WriteCScript(const uint160& hash, const CScript& redeemScript) { nWalletDBUpdated++; return Write(std::make_pair(std::string("cscript"), hash), redeemScript, false); } bool CWalletDB::WriteWatchOnly(const CScript& dest) { nWalletDBUpdated++; return Write(std::make_pair(std::string("watchs"), dest), '1'); } bool CWalletDB::EraseWatchOnly(const CScript& dest) { nWalletDBUpdated++; return Erase(std::make_pair(std::string("watchs"), dest)); } bool CWalletDB::WriteMultiSig(const CScript& dest) { nWalletDBUpdated++; return Write(std::make_pair(std::string("multisig"), dest), '1'); } bool CWalletDB::EraseMultiSig(const CScript& dest) { nWalletDBUpdated++; return Erase(std::make_pair(std::string("multisig"), dest)); } bool CWalletDB::WriteBestBlock(const CBlockLocator& locator) { nWalletDBUpdated++; return Write(std::string("bestblock"), locator); } bool CWalletDB::ReadBestBlock(CBlockLocator& locator) { return Read(std::string("bestblock"), locator); } bool CWalletDB::WriteOrderPosNext(int64_t nOrderPosNext) { nWalletDBUpdated++; return Write(std::string("orderposnext"), nOrderPosNext); } // presstab HyperStake bool CWalletDB::WriteStakeSplitThreshold(uint64_t nStakeSplitThreshold) { nWalletDBUpdated++; return Write(std::string("stakeSplitThreshold"), nStakeSplitThreshold); } //presstab HyperStake bool CWalletDB::WriteMultiSend(std::vector<std::pair<std::string, int> > vMultiSend) { nWalletDBUpdated++; bool ret = true; for (unsigned int i = 0; i < vMultiSend.size(); i++) { std::pair<std::string, int> pMultiSend; pMultiSend = vMultiSend[i]; if (!Write(std::make_pair(std::string("multisend"), i), pMultiSend, true)) ret = false; } return ret; } //presstab HyperStake bool CWalletDB::EraseMultiSend(std::vector<std::pair<std::string, int> > vMultiSend) { nWalletDBUpdated++; bool ret = true; for (unsigned int i = 0; i < vMultiSend.size(); i++) { std::pair<std::string, int> pMultiSend; pMultiSend = vMultiSend[i]; if (!Erase(std::make_pair(std::string("multisend"), i))) ret = false; } return ret; } //presstab HyperStake bool CWalletDB::WriteMSettings(bool fMultiSendStake, bool fMultiSendMasternode, int nLastMultiSendHeight) { nWalletDBUpdated++; std::pair<bool, bool> enabledMS(fMultiSendStake, fMultiSendMasternode); std::pair<std::pair<bool, bool>, int> pSettings(enabledMS, nLastMultiSendHeight); return Write(std::string("msettingsv2"), pSettings, true); } //presstab HyperStake bool CWalletDB::WriteMSDisabledAddresses(std::vector<std::string> vDisabledAddresses) { nWalletDBUpdated++; bool ret = true; for (unsigned int i = 0; i < vDisabledAddresses.size(); i++) { if (!Write(std::make_pair(std::string("mdisabled"), i), vDisabledAddresses[i])) ret = false; } return ret; } //presstab HyperStake bool CWalletDB::EraseMSDisabledAddresses(std::vector<std::string> vDisabledAddresses) { nWalletDBUpdated++; bool ret = true; for (unsigned int i = 0; i < vDisabledAddresses.size(); i++) { if (!Erase(std::make_pair(std::string("mdisabled"), i))) ret = false; } return ret; } bool CWalletDB::WriteAutoCombineSettings(bool fEnable, CAmount nCombineThreshold) { nWalletDBUpdated++; std::pair<bool, CAmount> pSettings; pSettings.first = fEnable; pSettings.second = nCombineThreshold; return Write(std::string("autocombinesettings"), pSettings, true); } bool CWalletDB::WriteDefaultKey(const CPubKey& vchPubKey) { nWalletDBUpdated++; return Write(std::string("defaultkey"), vchPubKey); } bool CWalletDB::ReadPool(int64_t nPool, CKeyPool& keypool) { return Read(std::make_pair(std::string("pool"), nPool), keypool); } bool CWalletDB::WritePool(int64_t nPool, const CKeyPool& keypool) { nWalletDBUpdated++; return Write(std::make_pair(std::string("pool"), nPool), keypool); } bool CWalletDB::ErasePool(int64_t nPool) { nWalletDBUpdated++; return Erase(std::make_pair(std::string("pool"), nPool)); } bool CWalletDB::WriteMinVersion(int nVersion) { return Write(std::string("minversion"), nVersion); } bool CWalletDB::ReadAccount(const string& strAccount, CAccount& account) { account.SetNull(); return Read(make_pair(string("acc"), strAccount), account); } bool CWalletDB::WriteAccount(const string& strAccount, const CAccount& account) { return Write(make_pair(string("acc"), strAccount), account); } bool CWalletDB::WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccountingEntry& acentry) { return Write(std::make_pair(std::string("acentry"), std::make_pair(acentry.strAccount, nAccEntryNum)), acentry); } bool CWalletDB::WriteAccountingEntry_Backend(const CAccountingEntry& acentry) { return WriteAccountingEntry(++nAccountingEntryNumber, acentry); } CAmount CWalletDB::GetAccountCreditDebit(const string& strAccount) { list<CAccountingEntry> entries; ListAccountCreditDebit(strAccount, entries); CAmount nCreditDebit = 0; BOOST_FOREACH (const CAccountingEntry& entry, entries) nCreditDebit += entry.nCreditDebit; return nCreditDebit; } void CWalletDB::ListAccountCreditDebit(const string& strAccount, list<CAccountingEntry>& entries) { bool fAllAccounts = (strAccount == "*"); Dbc* pcursor = GetCursor(); if (!pcursor) throw runtime_error("CWalletDB::ListAccountCreditDebit() : cannot create DB cursor"); unsigned int fFlags = DB_SET_RANGE; while (true) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); if (fFlags == DB_SET_RANGE) ssKey << std::make_pair(std::string("acentry"), std::make_pair((fAllAccounts ? string("") : strAccount), uint64_t(0))); CDataStream ssValue(SER_DISK, CLIENT_VERSION); int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags); fFlags = DB_NEXT; if (ret == DB_NOTFOUND) break; else if (ret != 0) { pcursor->close(); throw runtime_error("CWalletDB::ListAccountCreditDebit() : error scanning DB"); } // Unserialize string strType; ssKey >> strType; if (strType != "acentry") break; CAccountingEntry acentry; ssKey >> acentry.strAccount; if (!fAllAccounts && acentry.strAccount != strAccount) break; ssValue >> acentry; ssKey >> acentry.nEntryNo; entries.push_back(acentry); } pcursor->close(); } DBErrors CWalletDB::ReorderTransactions(CWallet* pwallet) { LOCK(pwallet->cs_wallet); // Old wallets didn't have any defined order for transactions // Probably a bad idea to change the output of this // First: get all CWalletTx and CAccountingEntry into a sorted-by-time multimap. typedef pair<CWalletTx*, CAccountingEntry*> TxPair; typedef multimap<int64_t, TxPair> TxItems; TxItems txByTime; for (map<uint256, CWalletTx>::iterator it = pwallet->mapWallet.begin(); it != pwallet->mapWallet.end(); ++it) { CWalletTx* wtx = &((*it).second); txByTime.insert(make_pair(wtx->nTimeReceived, TxPair(wtx, (CAccountingEntry*)0))); } list<CAccountingEntry> acentries; ListAccountCreditDebit("", acentries); BOOST_FOREACH (CAccountingEntry& entry, acentries) { txByTime.insert(make_pair(entry.nTime, TxPair((CWalletTx*)0, &entry))); } int64_t& nOrderPosNext = pwallet->nOrderPosNext; nOrderPosNext = 0; std::vector<int64_t> nOrderPosOffsets; for (TxItems::iterator it = txByTime.begin(); it != txByTime.end(); ++it) { CWalletTx* const pwtx = (*it).second.first; CAccountingEntry* const pacentry = (*it).second.second; int64_t& nOrderPos = (pwtx != 0) ? pwtx->nOrderPos : pacentry->nOrderPos; if (nOrderPos == -1) { nOrderPos = nOrderPosNext++; nOrderPosOffsets.push_back(nOrderPos); if (pwtx) { if (!WriteTx(pwtx->GetHash(), *pwtx)) return DB_LOAD_FAIL; } else if (!WriteAccountingEntry(pacentry->nEntryNo, *pacentry)) return DB_LOAD_FAIL; } else { int64_t nOrderPosOff = 0; BOOST_FOREACH (const int64_t& nOffsetStart, nOrderPosOffsets) { if (nOrderPos >= nOffsetStart) ++nOrderPosOff; } nOrderPos += nOrderPosOff; nOrderPosNext = std::max(nOrderPosNext, nOrderPos + 1); if (!nOrderPosOff) continue; // Since we're changing the order, write it back if (pwtx) { if (!WriteTx(pwtx->GetHash(), *pwtx)) return DB_LOAD_FAIL; } else if (!WriteAccountingEntry(pacentry->nEntryNo, *pacentry)) return DB_LOAD_FAIL; } } WriteOrderPosNext(nOrderPosNext); return DB_LOAD_OK; } class CWalletScanState { public: unsigned int nKeys; unsigned int nCKeys; unsigned int nKeyMeta; bool fIsEncrypted; bool fAnyUnordered; int nFileVersion; vector<uint256> vWalletUpgrade; CWalletScanState() { nKeys = nCKeys = nKeyMeta = 0; fIsEncrypted = false; fAnyUnordered = false; nFileVersion = 0; } }; bool ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, CWalletScanState& wss, string& strType, string& strErr) { try { // Unserialize // Taking advantage of the fact that pair serialization // is just the two items serialized one after the other ssKey >> strType; if (strType == "name") { string strAddress; ssKey >> strAddress; ssValue >> pwallet->mapAddressBook[CBitcoinAddress(strAddress).Get()].name; } else if (strType == "purpose") { string strAddress; ssKey >> strAddress; ssValue >> pwallet->mapAddressBook[CBitcoinAddress(strAddress).Get()].purpose; } else if (strType == "tx") { uint256 hash; ssKey >> hash; CWalletTx wtx; ssValue >> wtx; CValidationState state; // false because there is no reason to go through the zerocoin checks for our own wallet if (!(CheckTransaction(wtx, false, false, state) && (wtx.GetHash() == hash) && state.IsValid())) return false; // Undo serialize changes in 31600 if (31404 <= wtx.fTimeReceivedIsTxTime && wtx.fTimeReceivedIsTxTime <= 31703) { if (!ssValue.empty()) { char fTmp; char fUnused; ssValue >> fTmp >> fUnused >> wtx.strFromAccount; strErr = strprintf("LoadWallet() upgrading tx ver=%d %d '%s' %s", wtx.fTimeReceivedIsTxTime, fTmp, wtx.strFromAccount, hash.ToString()); wtx.fTimeReceivedIsTxTime = fTmp; } else { strErr = strprintf("LoadWallet() repairing tx ver=%d %s", wtx.fTimeReceivedIsTxTime, hash.ToString()); wtx.fTimeReceivedIsTxTime = 0; } wss.vWalletUpgrade.push_back(hash); } if (wtx.nOrderPos == -1) wss.fAnyUnordered = true; pwallet->AddToWallet(wtx, true); } else if (strType == "acentry") { string strAccount; ssKey >> strAccount; uint64_t nNumber; ssKey >> nNumber; if (nNumber > nAccountingEntryNumber) nAccountingEntryNumber = nNumber; if (!wss.fAnyUnordered) { CAccountingEntry acentry; ssValue >> acentry; if (acentry.nOrderPos == -1) wss.fAnyUnordered = true; } } else if (strType == "watchs") { CScript script; ssKey >> script; char fYes; ssValue >> fYes; if (fYes == '1') pwallet->LoadWatchOnly(script); // Watch-only addresses have no birthday information for now, // so set the wallet birthday to the beginning of time. pwallet->nTimeFirstKey = 1; } else if (strType == "multisig") { CScript script; ssKey >> script; char fYes; ssValue >> fYes; if (fYes == '1') pwallet->LoadMultiSig(script); // MultiSig addresses have no birthday information for now, // so set the wallet birthday to the beginning of time. pwallet->nTimeFirstKey = 1; } else if (strType == "key" || strType == "wkey") { CPubKey vchPubKey; ssKey >> vchPubKey; if (!vchPubKey.IsValid()) { strErr = "Error reading wallet database: CPubKey corrupt"; return false; } CKey key; CPrivKey pkey; uint256 hash = 0; if (strType == "key") { wss.nKeys++; ssValue >> pkey; } else { CWalletKey wkey; ssValue >> wkey; pkey = wkey.vchPrivKey; } // Old wallets store keys as "key" [pubkey] => [privkey] // ... which was slow for wallets with lots of keys, because the public key is re-derived from the private key // using EC operations as a checksum. // Newer wallets store keys as "key"[pubkey] => [privkey][hash(pubkey,privkey)], which is much faster while // remaining backwards-compatible. try { ssValue >> hash; } catch (...) { } bool fSkipCheck = false; if (hash != 0) { // hash pubkey/privkey to accelerate wallet load std::vector<unsigned char> vchKey; vchKey.reserve(vchPubKey.size() + pkey.size()); vchKey.insert(vchKey.end(), vchPubKey.begin(), vchPubKey.end()); vchKey.insert(vchKey.end(), pkey.begin(), pkey.end()); if (Hash(vchKey.begin(), vchKey.end()) != hash) { strErr = "Error reading wallet database: CPubKey/CPrivKey corrupt"; return false; } fSkipCheck = true; } if (!key.Load(pkey, vchPubKey, fSkipCheck)) { strErr = "Error reading wallet database: CPrivKey corrupt"; return false; } if (!pwallet->LoadKey(key, vchPubKey)) { strErr = "Error reading wallet database: LoadKey failed"; return false; } } else if (strType == "mkey") { unsigned int nID; ssKey >> nID; CMasterKey kMasterKey; ssValue >> kMasterKey; if (pwallet->mapMasterKeys.count(nID) != 0) { strErr = strprintf("Error reading wallet database: duplicate CMasterKey id %u", nID); return false; } pwallet->mapMasterKeys[nID] = kMasterKey; if (pwallet->nMasterKeyMaxID < nID) pwallet->nMasterKeyMaxID = nID; } else if (strType == "ckey") { CPubKey vchPubKey; ssKey >> vchPubKey; vector<unsigned char> vchPrivKey; ssValue >> vchPrivKey; wss.nCKeys++; if (!pwallet->LoadCryptedKey(vchPubKey, vchPrivKey)) { strErr = "Error reading wallet database: LoadCryptedKey failed"; return false; } wss.fIsEncrypted = true; } else if (strType == "keymeta") { CPubKey vchPubKey; ssKey >> vchPubKey; CKeyMetadata keyMeta; ssValue >> keyMeta; wss.nKeyMeta++; pwallet->LoadKeyMetadata(vchPubKey, keyMeta); // find earliest key creation time, as wallet birthday if (!pwallet->nTimeFirstKey || (keyMeta.nCreateTime < pwallet->nTimeFirstKey)) pwallet->nTimeFirstKey = keyMeta.nCreateTime; } else if (strType == "defaultkey") { ssValue >> pwallet->vchDefaultKey; } else if (strType == "pool") { int64_t nIndex; ssKey >> nIndex; CKeyPool keypool; ssValue >> keypool; pwallet->setKeyPool.insert(nIndex); // If no metadata exists yet, create a default with the pool key's // creation time. Note that this may be overwritten by actually // stored metadata for that key later, which is fine. CKeyID keyid = keypool.vchPubKey.GetID(); if (pwallet->mapKeyMetadata.count(keyid) == 0) pwallet->mapKeyMetadata[keyid] = CKeyMetadata(keypool.nTime); } else if (strType == "version") { ssValue >> wss.nFileVersion; if (wss.nFileVersion == 10300) wss.nFileVersion = 300; } else if (strType == "cscript") { uint160 hash; ssKey >> hash; CScript script; ssValue >> script; if (!pwallet->LoadCScript(script)) { strErr = "Error reading wallet database: LoadCScript failed"; return false; } } else if (strType == "orderposnext") { ssValue >> pwallet->nOrderPosNext; } else if (strType == "stakeSplitThreshold") //presstab HyperStake { ssValue >> pwallet->nStakeSplitThreshold; } else if (strType == "multisend") //presstab HyperStake { unsigned int i; ssKey >> i; std::pair<std::string, int> pMultiSend; ssValue >> pMultiSend; if (CBitcoinAddress(pMultiSend.first).IsValid()) { pwallet->vMultiSend.push_back(pMultiSend); } } else if (strType == "msettingsv2") //presstab HyperStake { std::pair<std::pair<bool, bool>, int> pSettings; ssValue >> pSettings; pwallet->fMultiSendStake = pSettings.first.first; pwallet->fMultiSendMasternodeReward = pSettings.first.second; pwallet->nLastMultiSendHeight = pSettings.second; } else if (strType == "mdisabled") //presstab HyperStake { std::string strDisabledAddress; ssValue >> strDisabledAddress; pwallet->vDisabledAddresses.push_back(strDisabledAddress); } else if (strType == "autocombinesettings") { std::pair<bool, CAmount> pSettings; ssValue >> pSettings; pwallet->fCombineDust = pSettings.first; pwallet->nAutoCombineThreshold = pSettings.second; } else if (strType == "destdata") { std::string strAddress, strKey, strValue; ssKey >> strAddress; ssKey >> strKey; ssValue >> strValue; if (!pwallet->LoadDestData(CBitcoinAddress(strAddress).Get(), strKey, strValue)) { strErr = "Error reading wallet database: LoadDestData failed"; return false; } } } catch (...) { return false; } return true; } static bool IsKeyType(string strType) { return (strType == "key" || strType == "wkey" || strType == "mkey" || strType == "ckey"); } DBErrors CWalletDB::LoadWallet(CWallet* pwallet) { pwallet->vchDefaultKey = CPubKey(); CWalletScanState wss; bool fNoncriticalErrors = false; DBErrors result = DB_LOAD_OK; try { LOCK(pwallet->cs_wallet); int nMinVersion = 0; if (Read((string) "minversion", nMinVersion)) { if (nMinVersion > CLIENT_VERSION) return DB_TOO_NEW; pwallet->LoadMinVersion(nMinVersion); } // Get cursor Dbc* pcursor = GetCursor(); if (!pcursor) { LogPrintf("Error getting wallet database cursor\n"); return DB_CORRUPT; } while (true) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); CDataStream ssValue(SER_DISK, CLIENT_VERSION); int ret = ReadAtCursor(pcursor, ssKey, ssValue); if (ret == DB_NOTFOUND) break; else if (ret != 0) { LogPrintf("Error reading next record from wallet database\n"); return DB_CORRUPT; } // Try to be tolerant of single corrupt records: string strType, strErr; if (!ReadKeyValue(pwallet, ssKey, ssValue, wss, strType, strErr)) { // losing keys is considered a catastrophic error, anything else // we assume the user can live with: if (IsKeyType(strType)) result = DB_CORRUPT; else { // Leave other errors alone, if we try to fix them we might make things worse. fNoncriticalErrors = true; // ... but do warn the user there is something wrong. if (strType == "tx") // Rescan if there is a bad transaction record: SoftSetBoolArg("-rescan", true); } } if (!strErr.empty()) LogPrintf("%s\n", strErr); } pcursor->close(); } catch (boost::thread_interrupted) { throw; } catch (...) { result = DB_CORRUPT; } if (fNoncriticalErrors && result == DB_LOAD_OK) result = DB_NONCRITICAL_ERROR; // Any wallet corruption at all: skip any rewriting or // upgrading, we don't want to make it worse. if (result != DB_LOAD_OK) return result; LogPrintf("nFileVersion = %d\n", wss.nFileVersion); LogPrintf("Keys: %u plaintext, %u encrypted, %u w/ metadata, %u total\n", wss.nKeys, wss.nCKeys, wss.nKeyMeta, wss.nKeys + wss.nCKeys); // nTimeFirstKey is only reliable if all keys have metadata if ((wss.nKeys + wss.nCKeys) != wss.nKeyMeta) pwallet->nTimeFirstKey = 1; // 0 would be considered 'no value' BOOST_FOREACH (uint256 hash, wss.vWalletUpgrade) WriteTx(hash, pwallet->mapWallet[hash]); // Rewrite encrypted wallets of versions 0.4.0 and 0.5.0rc: if (wss.fIsEncrypted && (wss.nFileVersion == 40000 || wss.nFileVersion == 50000)) return DB_NEED_REWRITE; if (wss.nFileVersion < CLIENT_VERSION) // Update WriteVersion(CLIENT_VERSION); if (wss.fAnyUnordered) result = ReorderTransactions(pwallet); pwallet->laccentries.clear(); ListAccountCreditDebit("*", pwallet->laccentries); BOOST_FOREACH(CAccountingEntry& entry, pwallet->laccentries) { pwallet->wtxOrdered.insert(make_pair(entry.nOrderPos, CWallet::TxPair((CWalletTx*)0, &entry))); } return result; } DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash, vector<CWalletTx>& vWtx) { pwallet->vchDefaultKey = CPubKey(); bool fNoncriticalErrors = false; DBErrors result = DB_LOAD_OK; try { LOCK(pwallet->cs_wallet); int nMinVersion = 0; if (Read((string) "minversion", nMinVersion)) { if (nMinVersion > CLIENT_VERSION) return DB_TOO_NEW; pwallet->LoadMinVersion(nMinVersion); } // Get cursor Dbc* pcursor = GetCursor(); if (!pcursor) { LogPrintf("Error getting wallet database cursor\n"); return DB_CORRUPT; } while (true) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); CDataStream ssValue(SER_DISK, CLIENT_VERSION); int ret = ReadAtCursor(pcursor, ssKey, ssValue); if (ret == DB_NOTFOUND) break; else if (ret != 0) { LogPrintf("Error reading next record from wallet database\n"); return DB_CORRUPT; } string strType; ssKey >> strType; if (strType == "tx") { uint256 hash; ssKey >> hash; CWalletTx wtx; ssValue >> wtx; vTxHash.push_back(hash); vWtx.push_back(wtx); } } pcursor->close(); } catch (boost::thread_interrupted) { throw; } catch (...) { result = DB_CORRUPT; } if (fNoncriticalErrors && result == DB_LOAD_OK) result = DB_NONCRITICAL_ERROR; return result; } DBErrors CWalletDB::ZapWalletTx(CWallet* pwallet, vector<CWalletTx>& vWtx) { // build list of wallet TXs vector<uint256> vTxHash; DBErrors err = FindWalletTx(pwallet, vTxHash, vWtx); if (err != DB_LOAD_OK) return err; // erase each wallet TX BOOST_FOREACH (uint256& hash, vTxHash) { if (!EraseTx(hash)) return DB_CORRUPT; } return DB_LOAD_OK; } void ThreadFlushWalletDB(const string& strFile) { // Make this thread recognisable as the wallet flushing thread RenameThread("workplacecoin-wallet"); static bool fOneThread; if (fOneThread) return; fOneThread = true; if (!GetBoolArg("-flushwallet", true)) return; unsigned int nLastSeen = nWalletDBUpdated; unsigned int nLastFlushed = nWalletDBUpdated; int64_t nLastWalletUpdate = GetTime(); while (true) { MilliSleep(500); if (nLastSeen != nWalletDBUpdated) { nLastSeen = nWalletDBUpdated; nLastWalletUpdate = GetTime(); } if (nLastFlushed != nWalletDBUpdated && GetTime() - nLastWalletUpdate >= 2) { TRY_LOCK(bitdb.cs_db, lockDb); if (lockDb) { // Don't do this if any databases are in use int nRefCount = 0; map<string, int>::iterator mi = bitdb.mapFileUseCount.begin(); while (mi != bitdb.mapFileUseCount.end()) { nRefCount += (*mi).second; mi++; } if (nRefCount == 0) { boost::this_thread::interruption_point(); map<string, int>::iterator mi = bitdb.mapFileUseCount.find(strFile); if (mi != bitdb.mapFileUseCount.end()) { LogPrint("db", "Flushing wallet.dat\n"); nLastFlushed = nWalletDBUpdated; int64_t nStart = GetTimeMillis(); // Flush wallet.dat so it's self contained bitdb.CloseDb(strFile); bitdb.CheckpointLSN(strFile); bitdb.mapFileUseCount.erase(mi++); LogPrint("db", "Flushed wallet.dat %dms\n", GetTimeMillis() - nStart); } } } } } } void NotifyBacked(const CWallet& wallet, bool fSuccess, string strMessage) { LogPrint(nullptr, strMessage.data()); wallet.NotifyWalletBacked(fSuccess, strMessage); } bool BackupWallet(const CWallet& wallet, const filesystem::path& strDest, bool fEnableCustom) { filesystem::path pathCustom; filesystem::path pathWithFile; if (!wallet.fFileBacked) { return false; } else if(fEnableCustom) { pathWithFile = GetArg("-backuppath", ""); if(!pathWithFile.empty()) { if(!pathWithFile.has_extension()) { pathCustom = pathWithFile; pathWithFile /= wallet.GetUniqueWalletBackupName(false); } else { pathCustom = pathWithFile.parent_path(); } try { filesystem::create_directories(pathCustom); } catch(const filesystem::filesystem_error& e) { NotifyBacked(wallet, false, strprintf("%s\n", e.what())); pathCustom = ""; } } } while (true) { { LOCK(bitdb.cs_db); if (!bitdb.mapFileUseCount.count(wallet.strWalletFile) || bitdb.mapFileUseCount[wallet.strWalletFile] == 0) { // Flush log data to the dat file bitdb.CloseDb(wallet.strWalletFile); bitdb.CheckpointLSN(wallet.strWalletFile); bitdb.mapFileUseCount.erase(wallet.strWalletFile); // Copy wallet.dat filesystem::path pathDest(strDest); filesystem::path pathSrc = GetDataDir() / wallet.strWalletFile; if (is_directory(pathDest)) { if(!exists(pathDest)) create_directory(pathDest); pathDest /= wallet.strWalletFile; } bool defaultPath = AttemptBackupWallet(wallet, pathSrc.string(), pathDest.string()); if(defaultPath && !pathCustom.empty()) { int nThreshold = GetArg("-custombackupthreshold", DEFAULT_CUSTOMBACKUPTHRESHOLD); if (nThreshold > 0) { typedef std::multimap<std::time_t, filesystem::path> folder_set_t; folder_set_t folderSet; filesystem::directory_iterator end_iter; pathCustom.make_preferred(); // Build map of backup files for current(!) wallet sorted by last write time filesystem::path currentFile; for (filesystem::directory_iterator dir_iter(pathCustom); dir_iter != end_iter; ++dir_iter) { // Only check regular files if (filesystem::is_regular_file(dir_iter->status())) { currentFile = dir_iter->path().filename(); // Only add the backups for the current wallet, e.g. wallet.dat.* if (dir_iter->path().stem().string() == wallet.strWalletFile) { folderSet.insert(folder_set_t::value_type(filesystem::last_write_time(dir_iter->path()), *dir_iter)); } } } int counter = 0; //TODO: add seconds to avoid naming conflicts for (auto entry : folderSet) { counter++; if(entry.second == pathWithFile) { pathWithFile += "(1)"; } } if (counter >= nThreshold) { std::time_t oldestBackup = 0; for(auto entry : folderSet) { if(oldestBackup == 0 || entry.first < oldestBackup) { oldestBackup = entry.first; } } try { auto entry = folderSet.find(oldestBackup); if (entry != folderSet.end()) { filesystem::remove(entry->second); LogPrintf("Old backup deleted: %s\n", (*entry).second); } } catch (filesystem::filesystem_error& error) { string strMessage = strprintf("Failed to delete backup %s\n", error.what()); LogPrint(nullptr, strMessage.data()); NotifyBacked(wallet, false, strMessage); } } } AttemptBackupWallet(wallet, pathSrc.string(), pathWithFile.string()); } return defaultPath; } } MilliSleep(100); } return false; } bool AttemptBackupWallet(const CWallet& wallet, const filesystem::path& pathSrc, const filesystem::path& pathDest) { bool retStatus; string strMessage; try { /*if (boost::filesystem::equivalent(pathSrc, pathDest)) { LogPrintf("cannot backup to wallet source file %s\n", pathDest.string()); return false; }*/ #if BOOST_VERSION >= 105800 /* BOOST_LIB_VERSION 1_58 */ filesystem::copy_file(pathSrc.c_str(), pathDest, filesystem::copy_option::overwrite_if_exists); #else std::ifstream src(pathSrc.c_str(), std::ios::binary | std::ios::in); std::ofstream dst(pathDest.c_str(), std::ios::binary | std::ios::out | std::ios::trunc); dst << src.rdbuf(); dst.flush(); src.close(); dst.close(); #endif strMessage = strprintf("copied wallet.dat to %s\n", pathDest.string()); LogPrint(nullptr, strMessage.data()); retStatus = true; } catch (const filesystem::filesystem_error& e) { retStatus = false; strMessage = strprintf("%s\n", e.what()); LogPrint(nullptr, strMessage.data()); } NotifyBacked(wallet, retStatus, strMessage); return retStatus; } // // Try to (very carefully!) recover wallet.dat if there is a problem. // bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys) { // Recovery procedure: // move wallet.dat to wallet.timestamp.bak // Call Salvage with fAggressive=true to // get as much data as possible. // Rewrite salvaged data to wallet.dat // Set -rescan so any missing transactions will be // found. int64_t now = GetTime(); std::string newFilename = strprintf("wallet.%d.bak", now); int result = dbenv.dbenv.dbrename(NULL, filename.c_str(), NULL, newFilename.c_str(), DB_AUTO_COMMIT); if (result == 0) LogPrintf("Renamed %s to %s\n", filename, newFilename); else { LogPrintf("Failed to rename %s to %s\n", filename, newFilename); return false; } std::vector<CDBEnv::KeyValPair> salvagedData; bool allOK = dbenv.Salvage(newFilename, true, salvagedData); if (salvagedData.empty()) { LogPrintf("Salvage(aggressive) found no records in %s.\n", newFilename); return false; } LogPrintf("Salvage(aggressive) found %u records\n", salvagedData.size()); bool fSuccess = allOK; boost::scoped_ptr<Db> pdbCopy(new Db(&dbenv.dbenv, 0)); int ret = pdbCopy->open(NULL, // Txn pointer filename.c_str(), // Filename "main", // Logical db name DB_BTREE, // Database type DB_CREATE, // Flags 0); if (ret > 0) { LogPrintf("Cannot create database file %s\n", filename); return false; } CWallet dummyWallet; CWalletScanState wss; DbTxn* ptxn = dbenv.TxnBegin(); BOOST_FOREACH (CDBEnv::KeyValPair& row, salvagedData) { if (fOnlyKeys) { CDataStream ssKey(row.first, SER_DISK, CLIENT_VERSION); CDataStream ssValue(row.second, SER_DISK, CLIENT_VERSION); string strType, strErr; bool fReadOK = ReadKeyValue(&dummyWallet, ssKey, ssValue, wss, strType, strErr); if (!IsKeyType(strType)) continue; if (!fReadOK) { LogPrintf("WARNING: CWalletDB::Recover skipping %s: %s\n", strType, strErr); continue; } } Dbt datKey(&row.first[0], row.first.size()); Dbt datValue(&row.second[0], row.second.size()); int ret2 = pdbCopy->put(ptxn, &datKey, &datValue, DB_NOOVERWRITE); if (ret2 > 0) fSuccess = false; } ptxn->commit(0); pdbCopy->close(0); return fSuccess; } bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename) { return CWalletDB::Recover(dbenv, filename, false); } bool CWalletDB::WriteDestData(const std::string& address, const std::string& key, const std::string& value) { nWalletDBUpdated++; return Write(std::make_pair(std::string("destdata"), std::make_pair(address, key)), value); } bool CWalletDB::EraseDestData(const std::string& address, const std::string& key) { nWalletDBUpdated++; return Erase(std::make_pair(std::string("destdata"), std::make_pair(address, key))); } bool CWalletDB::WriteZerocoinSpendSerialEntry(const CZerocoinSpend& zerocoinSpend) { return Write(make_pair(string("zcserial"), zerocoinSpend.GetSerial()), zerocoinSpend, true); } bool CWalletDB::EraseZerocoinSpendSerialEntry(const CBigNum& serialEntry) { return Erase(make_pair(string("zcserial"), serialEntry)); } bool CWalletDB::ReadZerocoinSpendSerialEntry(const CBigNum& bnSerial) { CZerocoinSpend spend; return Read(make_pair(string("zcserial"), bnSerial), spend); } bool CWalletDB::WriteDeterministicMint(const CDeterministicMint& dMint) { uint256 hash = dMint.GetPubcoinHash(); return Write(make_pair(string("dzwopc"), hash), dMint, true); } bool CWalletDB::ReadDeterministicMint(const uint256& hashPubcoin, CDeterministicMint& dMint) { return Read(make_pair(string("dzwopc"), hashPubcoin), dMint); } bool CWalletDB::EraseDeterministicMint(const uint256& hashPubcoin) { return Erase(make_pair(string("dzwopc"), hashPubcoin)); } bool CWalletDB::WriteZerocoinMint(const CZerocoinMint& zerocoinMint) { CDataStream ss(SER_GETHASH, 0); ss << zerocoinMint.GetValue(); uint256 hash = Hash(ss.begin(), ss.end()); Erase(make_pair(string("zerocoin"), hash)); return Write(make_pair(string("zerocoin"), hash), zerocoinMint, true); } bool CWalletDB::ReadZerocoinMint(const CBigNum &bnPubCoinValue, CZerocoinMint& zerocoinMint) { CDataStream ss(SER_GETHASH, 0); ss << bnPubCoinValue; uint256 hash = Hash(ss.begin(), ss.end()); return ReadZerocoinMint(hash, zerocoinMint); } bool CWalletDB::ReadZerocoinMint(const uint256& hashPubcoin, CZerocoinMint& mint) { return Read(make_pair(string("zerocoin"), hashPubcoin), mint); } bool CWalletDB::EraseZerocoinMint(const CZerocoinMint& zerocoinMint) { CDataStream ss(SER_GETHASH, 0); ss << zerocoinMint.GetValue(); uint256 hash = Hash(ss.begin(), ss.end()); return Erase(make_pair(string("zerocoin"), hash)); } bool CWalletDB::ArchiveMintOrphan(const CZerocoinMint& zerocoinMint) { CDataStream ss(SER_GETHASH, 0); ss << zerocoinMint.GetValue(); uint256 hash = Hash(ss.begin(), ss.end());; if (!Write(make_pair(string("zco"), hash), zerocoinMint)) { LogPrintf("%s : failed to database orphaned zerocoin mint\n", __func__); return false; } if (!Erase(make_pair(string("zerocoin"), hash))) { LogPrintf("%s : failed to erase orphaned zerocoin mint\n", __func__); return false; } return true; } bool CWalletDB::ArchiveDeterministicOrphan(const CDeterministicMint& dMint) { if (!Write(make_pair(string("dzco"), dMint.GetPubcoinHash()), dMint)) return error("%s: write failed", __func__); if (!Erase(make_pair(string("dzwopc"), dMint.GetPubcoinHash()))) return error("%s: failed to erase", __func__); return true; } bool CWalletDB::UnarchiveDeterministicMint(const uint256& hashPubcoin, CDeterministicMint& dMint) { if (!Read(make_pair(string("dzco"), hashPubcoin), dMint)) return error("%s: failed to retrieve deterministic mint from archive", __func__); if (!WriteDeterministicMint(dMint)) return error("%s: failed to write deterministic mint", __func__); if (!Erase(make_pair(string("dzco"), dMint.GetPubcoinHash()))) return error("%s : failed to erase archived deterministic mint", __func__); return true; } bool CWalletDB::UnarchiveZerocoinMint(const uint256& hashPubcoin, CZerocoinMint& mint) { if (!Read(make_pair(string("zco"), hashPubcoin), mint)) return error("%s: failed to retrieve zerocoinmint from archive", __func__); if (!WriteZerocoinMint(mint)) return error("%s: failed to write zerocoinmint", __func__); uint256 hash = GetPubCoinHash(mint.GetValue()); if (!Erase(make_pair(string("zco"), hash))) return error("%s : failed to erase archived zerocoin mint", __func__); return true; } bool CWalletDB::WriteCurrentSeedHash(const uint256& hashSeed) { return Write(string("seedhash"), hashSeed); } bool CWalletDB::ReadCurrentSeedHash(uint256& hashSeed) { return Read(string("seedhash"), hashSeed); } bool CWalletDB::WriteZWOPCSeed(const uint256& hashSeed, const vector<unsigned char>& seed) { if (!WriteCurrentSeedHash(hashSeed)) return error("%s: failed to write current seed hash", __func__); return Write(make_pair(string("dzs"), hashSeed), seed); } bool CWalletDB::EraseZWOPCSeed() { uint256 hash; if(!ReadCurrentSeedHash(hash)){ return error("Failed to read a current seed hash"); } if(!WriteZWOPCSeed(hash, ToByteVector(base_uint<256>(0) << 256))) { return error("Failed to write empty seed to wallet"); } if(!WriteCurrentSeedHash(0)) { return error("Failed to write empty seedHash"); } return true; } bool CWalletDB::EraseZWOPCSeed_deprecated() { return Erase(string("dzs")); } bool CWalletDB::ReadZWOPCSeed(const uint256& hashSeed, vector<unsigned char>& seed) { return Read(make_pair(string("dzs"), hashSeed), seed); } bool CWalletDB::ReadZWOPCSeed_deprecated(uint256& seed) { return Read(string("dzs"), seed); } bool CWalletDB::WriteZWOPCCount(const uint32_t& nCount) { return Write(string("dzc"), nCount); } bool CWalletDB::ReadZWOPCCount(uint32_t& nCount) { return Read(string("dzc"), nCount); } bool CWalletDB::WriteMintPoolPair(const uint256& hashMasterSeed, const uint256& hashPubcoin, const uint32_t& nCount) { return Write(make_pair(string("mintpool"), hashPubcoin), make_pair(hashMasterSeed, nCount)); } //! map with hashMasterSeed as the key, paired with vector of hashPubcoins and their count std::map<uint256, std::vector<pair<uint256, uint32_t> > > CWalletDB::MapMintPool() { std::map<uint256, std::vector<pair<uint256, uint32_t> > > mapPool; Dbc* pcursor = GetCursor(); if (!pcursor) throw runtime_error(std::string(__func__)+" : cannot create DB cursor"); unsigned int fFlags = DB_SET_RANGE; for (;;) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); if (fFlags == DB_SET_RANGE) ssKey << make_pair(string("mintpool"), uint256(0)); CDataStream ssValue(SER_DISK, CLIENT_VERSION); int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags); fFlags = DB_NEXT; if (ret == DB_NOTFOUND) break; else if (ret != 0) { pcursor->close(); throw runtime_error(std::string(__func__)+" : error scanning DB"); } // Unserialize string strType; ssKey >> strType; if (strType != "mintpool") break; uint256 hashPubcoin; ssKey >> hashPubcoin; uint256 hashMasterSeed; ssValue >> hashMasterSeed; uint32_t nCount; ssValue >> nCount; pair<uint256, uint32_t> pMint; pMint.first = hashPubcoin; pMint.second = nCount; if (mapPool.count(hashMasterSeed)) { mapPool.at(hashMasterSeed).emplace_back(pMint); } else { vector<pair<uint256, uint32_t> > vPairs; vPairs.emplace_back(pMint); mapPool.insert(make_pair(hashMasterSeed, vPairs)); } } pcursor->close(); return mapPool; } std::list<CDeterministicMint> CWalletDB::ListDeterministicMints() { std::list<CDeterministicMint> listMints; Dbc* pcursor = GetCursor(); if (!pcursor) throw runtime_error(std::string(__func__)+" : cannot create DB cursor"); unsigned int fFlags = DB_SET_RANGE; for (;;) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); if (fFlags == DB_SET_RANGE) ssKey << make_pair(string("dzwopc"), uint256(0)); CDataStream ssValue(SER_DISK, CLIENT_VERSION); int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags); fFlags = DB_NEXT; if (ret == DB_NOTFOUND) break; else if (ret != 0) { pcursor->close(); throw runtime_error(std::string(__func__)+" : error scanning DB"); } // Unserialize string strType; ssKey >> strType; if (strType != "dzwopc") break; uint256 hashPubcoin; ssKey >> hashPubcoin; CDeterministicMint mint; ssValue >> mint; listMints.emplace_back(mint); } pcursor->close(); return listMints; } std::list<CZerocoinMint> CWalletDB::ListMintedCoins() { std::list<CZerocoinMint> listPubCoin; Dbc* pcursor = GetCursor(); if (!pcursor) throw runtime_error(std::string(__func__)+" : cannot create DB cursor"); unsigned int fFlags = DB_SET_RANGE; vector<CZerocoinMint> vOverWrite; vector<CZerocoinMint> vArchive; for (;;) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); if (fFlags == DB_SET_RANGE) ssKey << make_pair(string("zerocoin"), uint256(0)); CDataStream ssValue(SER_DISK, CLIENT_VERSION); int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags); fFlags = DB_NEXT; if (ret == DB_NOTFOUND) break; else if (ret != 0) { pcursor->close(); throw runtime_error(std::string(__func__)+" : error scanning DB"); } // Unserialize string strType; ssKey >> strType; if (strType != "zerocoin") break; uint256 hashPubcoin; ssKey >> hashPubcoin; CZerocoinMint mint; ssValue >> mint; listPubCoin.emplace_back(mint); } pcursor->close(); return listPubCoin; } std::list<CZerocoinSpend> CWalletDB::ListSpentCoins() { std::list<CZerocoinSpend> listCoinSpend; Dbc* pcursor = GetCursor(); if (!pcursor) throw runtime_error(std::string(__func__)+" : cannot create DB cursor"); unsigned int fFlags = DB_SET_RANGE; for (;;) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); if (fFlags == DB_SET_RANGE) ssKey << make_pair(string("zcserial"), CBigNum(0)); CDataStream ssValue(SER_DISK, CLIENT_VERSION); int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags); fFlags = DB_NEXT; if (ret == DB_NOTFOUND) break; else if (ret != 0) { pcursor->close(); throw runtime_error(std::string(__func__)+" : error scanning DB"); } // Unserialize string strType; ssKey >> strType; if (strType != "zcserial") break; CBigNum value; ssKey >> value; CZerocoinSpend zerocoinSpendItem; ssValue >> zerocoinSpendItem; listCoinSpend.push_back(zerocoinSpendItem); } pcursor->close(); return listCoinSpend; } // Just get the Serial Numbers std::list<CBigNum> CWalletDB::ListSpentCoinsSerial() { std::list<CBigNum> listPubCoin; std::list<CZerocoinSpend> listCoins = ListSpentCoins(); for ( auto& coin : listCoins) { listPubCoin.push_back(coin.GetSerial()); } return listPubCoin; } std::list<CZerocoinMint> CWalletDB::ListArchivedZerocoins() { std::list<CZerocoinMint> listMints; Dbc* pcursor = GetCursor(); if (!pcursor) throw runtime_error(std::string(__func__)+" : cannot create DB cursor"); unsigned int fFlags = DB_SET_RANGE; for (;;) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); if (fFlags == DB_SET_RANGE) ssKey << make_pair(string("zco"), CBigNum(0)); CDataStream ssValue(SER_DISK, CLIENT_VERSION); int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags); fFlags = DB_NEXT; if (ret == DB_NOTFOUND) break; else if (ret != 0) { pcursor->close(); throw runtime_error(std::string(__func__)+" : error scanning DB"); } // Unserialize string strType; ssKey >> strType; if (strType != "zco") break; uint256 value; ssKey >> value; CZerocoinMint mint; ssValue >> mint; listMints.push_back(mint); } pcursor->close(); return listMints; } std::list<CDeterministicMint> CWalletDB::ListArchivedDeterministicMints() { std::list<CDeterministicMint> listMints; Dbc* pcursor = GetCursor(); if (!pcursor) throw runtime_error(std::string(__func__)+" : cannot create DB cursor"); unsigned int fFlags = DB_SET_RANGE; for (;;) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); if (fFlags == DB_SET_RANGE) ssKey << make_pair(string("dzco"), CBigNum(0)); CDataStream ssValue(SER_DISK, CLIENT_VERSION); int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags); fFlags = DB_NEXT; if (ret == DB_NOTFOUND) break; else if (ret != 0) { pcursor->close(); throw runtime_error(std::string(__func__)+" : error scanning DB"); } // Unserialize string strType; ssKey >> strType; if (strType != "dzco") break; uint256 value; ssKey >> value; CDeterministicMint dMint; ssValue >> dMint; listMints.emplace_back(dMint); } pcursor->close(); return listMints; }
[ "49657239+WorkPLaceCoin@users.noreply.github.com" ]
49657239+WorkPLaceCoin@users.noreply.github.com
b793ecaf2f628266038f40532d89097384d9708d
9e397ee0cf4e17702893913694904ece6bfabce6
/test/generated/test1_program_format.cpp
84b25324adee8d0599acdacc94a1dfab7f158efd
[ "BSL-1.0" ]
permissive
ierror/libgtulu
d3511cf4e4f3afa4be4a7a05007c5a2b4fa62996
abb995ef5e184f3902b5d07c2312d532e381c4a6
refs/heads/master
2021-01-17T06:20:30.945101
2014-02-09T09:31:43
2014-02-09T09:31:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,398
cpp
/** * @file * * Distributed under the Boost Software License, Version 1.0. * See accompanying file LICENSE or copy at http://www.boost.org/LICENSE * */ #include "gtulu/namespaces.hpp" #include "test1_program_format.hpp" namespace gtulu { namespace internal { namespace format { namespace program { // #template#<declare_shader_source/> char const* test1_program_format::test1_fragment_shader_shader_format::source = "#version 330 core\n" "// Distributed under the Boost Software License, Version 1.0.\n" "// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE\n" "uniform sampler2D background;\n" "in vert {\n" " vec2 tex_coord;\n" "} vertex;\n" "out vec4 color;\n" "void main() {\n" " color = texture(background, vertex.tex_coord);\n" "}\n" ; char const* test1_program_format::test1_vertex_shader_shader_format::source = "#version 330 core\n" "// Distributed under the Boost Software License, Version 1.0.\n" "// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE\n" "in vec2 position;\n" "in vec2 texture_position;\n" "out vert {\n" " vec2 tex_coord;\n" "} vertex;\n" "void main() {\n" " gl_Position = vec4(position, 0.0, 1.0);\n" " vertex.tex_coord = texture_position;\n" "}\n" ; } // namespace program } // namespace format } // namespace internal } // namespace gtulu
[ "beren.minor+git@gmail.com" ]
beren.minor+git@gmail.com
47246892bc934d31816e63d74be2cd3b8fb8d2bd
8b9b1249163ca61a43f4175873594be79d0a9c03
/deps/boost_1_66_0/tools/quickbook/src/state.cpp
f0047f3b5fc08ac0528a46203a6ec9835dce93a1
[ "BSL-1.0", "MIT" ]
permissive
maugf214/LiquidCore
f6632537dfb4686f4302e871d997992e6289eb65
80a9cce27ceaeeb3c8002c17ce638ed45410d3e6
refs/heads/master
2022-12-02T01:18:26.132951
2020-08-17T10:27:36
2020-08-17T10:27:36
288,151,167
0
1
MIT
2020-08-17T10:32:05
2020-08-17T10:32:04
null
UTF-8
C++
false
false
5,440
cpp
/*============================================================================= Copyright (c) 2002 2004 2006 Joel de Guzman Copyright (c) 2004 Eric Niebler Copyright (c) 2005 Thomas Guest http://spirit.sourceforge.net/ Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #include "state.hpp" #include "state_save.hpp" #include "document_state.hpp" #include "quickbook.hpp" #include "grammar.hpp" #include "path.hpp" #include "utils.hpp" #include "phrase_tags.hpp" #include <boost/foreach.hpp> #if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310)) #pragma warning(disable:4355) #endif namespace quickbook { char const* quickbook_get_date = "__quickbook_get_date__"; char const* quickbook_get_time = "__quickbook_get_time__"; unsigned qbk_version_n = 0; // qbk_major_version * 100 + qbk_minor_version state::state(fs::path const& filein_, fs::path const& xinclude_base_, string_stream& out_, document_state& document_) : grammar_() , order_pos(0) , xinclude_base(xinclude_base_) , templates() , error_count(0) , anchors() , warned_about_breaks(false) , conditional(true) , document(document_) , callouts() , callout_depth(0) , dependencies() , explicit_list(false) , strict_mode(false) , imported(false) , macro() , source_mode() , source_mode_next() , source_mode_next_pos() , current_file(0) , current_path(filein_, 0, filein_.filename()) , template_depth(0) , min_section_level(1) , in_list(false) , in_list_save() , out(out_) , phrase() , values(&current_file) { // add the predefined macros macro.add ("__DATE__", std::string(quickbook_get_date)) ("__TIME__", std::string(quickbook_get_time)) ("__FILENAME__", std::string()) ; update_filename_macro(); boost::scoped_ptr<quickbook_grammar> g( new quickbook_grammar(*this)); grammar_.swap(g); } quickbook_grammar& state::grammar() const { return *grammar_; } void state::update_filename_macro() { *boost::spirit::classic::find(macro, "__FILENAME__") = detail::encode_string( detail::path_to_generic(current_path.abstract_file_path)); } unsigned state::get_new_order_pos() { return ++order_pos; } void state::push_output() { out.push(); phrase.push(); in_list_save.push(in_list); } void state::pop_output() { phrase.pop(); out.pop(); in_list = in_list_save.top(); in_list_save.pop(); } source_mode_info state::tagged_source_mode() const { source_mode_info result; BOOST_FOREACH(source_mode_info const& s, tagged_source_mode_stack) { result.update(s); } return result; } source_mode_info state::current_source_mode() const { source_mode_info result = source_mode; result.update(document.section_source_mode()); BOOST_FOREACH(source_mode_info const& s, tagged_source_mode_stack) { result.update(s); } return result; } void state::change_source_mode(source_mode_type s) { source_mode = source_mode_info(s, get_new_order_pos()); } void state::push_tagged_source_mode(source_mode_type s) { tagged_source_mode_stack.push_back( source_mode_info(s, s ? get_new_order_pos() : 0)); } void state::pop_tagged_source_mode() { assert(!tagged_source_mode_stack.empty()); tagged_source_mode_stack.pop_back(); } state_save::state_save(quickbook::state& state_, scope_flags scope_) : state(state_) , scope(scope_) , qbk_version(qbk_version_n) , imported(state.imported) , current_file(state.current_file) , current_path(state.current_path) , xinclude_base(state.xinclude_base) , source_mode(state.source_mode) , macro() , template_depth(state.template_depth) , min_section_level(state.min_section_level) { if (scope & scope_macros) macro = state.macro; if (scope & scope_templates) state.templates.push(); if (scope & scope_output) { state.push_output(); } state.values.builder.save(); } state_save::~state_save() { state.values.builder.restore(); boost::swap(qbk_version_n, qbk_version); boost::swap(state.imported, imported); boost::swap(state.current_file, current_file); boost::swap(state.current_path, current_path); boost::swap(state.xinclude_base, xinclude_base); boost::swap(state.source_mode, source_mode); if (scope & scope_output) { state.pop_output(); } if (scope & scope_templates) state.templates.pop(); if (scope & scope_macros) state.macro = macro; boost::swap(state.template_depth, template_depth); boost::swap(state.min_section_level, min_section_level); } }
[ "eric@flicket.tv" ]
eric@flicket.tv
9011b739560fab064450a81440a7ba25e32202f7
e701bef8f14f2690b2a40c660d18423521d66ec3
/chrome/browser/media/router/providers/cast/cast_activity_manager_unittest.cc
0533974fe2a579e1b4a19b566c04f3a19f4c1d36
[ "BSD-3-Clause" ]
permissive
anubi46/chromium
3570edf318c51b9dca7ab1ec40ca4db39ca263a5
f6335cea846624f22a5afe78baff6899927187aa
refs/heads/master
2022-11-30T04:03:59.382692
2018-09-13T01:30:33
2018-09-13T01:30:33
148,565,585
1
0
null
null
null
null
UTF-8
C++
false
false
14,488
cc
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/media/router/providers/cast/cast_activity_manager.h" #include "base/json/json_reader.h" #include "base/run_loop.h" #include "base/test/scoped_task_environment.h" #include "chrome/browser/media/router/data_decoder_util.h" #include "chrome/browser/media/router/providers/common/buffered_message_sender.h" #include "chrome/browser/media/router/test/mock_mojo_media_router.h" #include "chrome/browser/media/router/test/test_helper.h" #include "chrome/common/media_router/test/test_helper.h" #include "components/cast_channel/cast_test_util.h" #include "services/data_decoder/data_decoder_service.h" #include "services/service_manager/public/cpp/test/test_connector_factory.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" using testing::_; using testing::IsEmpty; using testing::Not; namespace media_router { namespace { constexpr char kOrigin[] = "https://google.com"; constexpr int kTabId = 1; } // namespace class ClientPresentationConnection : public blink::mojom::PresentationConnection { public: explicit ClientPresentationConnection( mojom::RoutePresentationConnectionPtr connections) : binding_(this, std::move(connections->connection_request)), connection_(std::move(connections->connection_ptr)) {} ~ClientPresentationConnection() override = default; void SendMessageToMediaRouter( blink::mojom::PresentationConnectionMessagePtr message) { connection_->OnMessage(std::move(message)); } MOCK_METHOD1(OnMessage, void(blink::mojom::PresentationConnectionMessagePtr)); MOCK_METHOD1(DidChangeState, void(blink::mojom::PresentationConnectionState state)); MOCK_METHOD0(RequestClose, void()); mojo::Binding<blink::mojom::PresentationConnection> binding_; blink::mojom::PresentationConnectionPtr connection_; DISALLOW_COPY_AND_ASSIGN(ClientPresentationConnection); }; class CastActivityManagerTest : public testing::Test { public: CastActivityManagerTest() : connector_factory_( service_manager::TestConnectorFactory::CreateForUniqueService( std::make_unique<data_decoder::DataDecoderService>())), connector_(connector_factory_->CreateConnector()), data_decoder_(connector_.get()), socket_service_(environment_.GetMainThreadTaskRunner()), message_handler_(&socket_service_) { media_sink_service_.AddOrUpdateSink(sink_); socket_.set_id(sink_.cast_data().cast_channel_id); } ~CastActivityManagerTest() override = default; void SetUp() override { router_binding_ = std::make_unique<mojo::Binding<mojom::MediaRouter>>( &mock_router_, mojo::MakeRequest(&router_ptr_)); manager_ = std::make_unique<CastActivityManager>( &media_sink_service_, &message_handler_, router_ptr_.get(), &data_decoder_, "hash-token"); // Make sure we get route updates. manager_->AddRouteQuery(MediaSource::Id()); } void TearDown() override { manager_.reset(); } void VerifyAndClearExpectations() { ASSERT_TRUE(testing::Mock::VerifyAndClearExpectations(&message_handler_)); ASSERT_TRUE(testing::Mock::VerifyAndClearExpectations(&mock_router_)); } void ExpectLaunchSessionSuccess( const base::Optional<MediaRoute>& route, mojom::RoutePresentationConnectionPtr presentation_connections, const base::Optional<std::string>&, media_router::RouteRequestResult::ResultCode) { ASSERT_TRUE(route); route_ = std::make_unique<MediaRoute>(*route); client_connection_ = std::make_unique<ClientPresentationConnection>( std::move(presentation_connections)); // When client is connected, the receiver_action message will be sent. EXPECT_CALL( *client_connection_, DidChangeState(blink::mojom::PresentationConnectionState::CONNECTED)); EXPECT_CALL(*client_connection_, OnMessage(_)); } void LaunchSession() { auto source = CastMediaSource::From("cast:ABCDEFGH?clientId=12345"); ASSERT_TRUE(source); // MediaRouter is notified of new route. EXPECT_CALL(mock_router_, OnRoutesUpdated(MediaRouteProviderId::CAST, Not(IsEmpty()), _, _)); // A launch session request is sent to the sink. EXPECT_CALL(message_handler_, LaunchSession(sink_.cast_data().cast_channel_id, "ABCDEFGH", kDefaultLaunchTimeout, _)) .WillOnce([this](int, const std::string&, base::TimeDelta, cast_channel::LaunchSessionCallback callback) { launch_session_callback_ = std::move(callback); }); // Callback will be invoked synchronously. manager_->LaunchSession( *source, sink_, "presentationId", url::Origin::Create(GURL(kOrigin)), kTabId, /*incognito*/ false, base::BindOnce(&CastActivityManagerTest::ExpectLaunchSessionSuccess, base::Unretained(this))); environment_.RunUntilIdle(); VerifyAndClearExpectations(); } cast_channel::LaunchSessionResponse GetSuccessLaunchResponse() { std::string receiver_status_str = R"({ "applications": [{ "appId": "ABCDEFGH", "displayName": "App display name", "namespaces": [ {"name": "urn:x-cast:com.google.cast.media"}, {"name": "urn:x-cast:com.google.foo"} ], "sessionId": "sessionId", "statusText":"App status", "transportId":"transportId" }] })"; auto receiver_status = base::JSONReader::Read(receiver_status_str); cast_channel::LaunchSessionResponse response; response.result = cast_channel::LaunchSessionResponse::Result::kOk; response.receiver_status = std::move(*receiver_status); return response; } // Precondition: |LaunchSession()| must be called first. void LaunchSessionResponseSuccess() { // 3 things will happen: // (1) SDK client receives new_session message. // (2) Virtual connection is created. // (3) Route list will be updated. EXPECT_CALL(message_handler_, EnsureConnection(sink_.cast_data().cast_channel_id, "12345", "transportId")); std::move(launch_session_callback_).Run(GetSuccessLaunchResponse()); EXPECT_CALL(*client_connection_, OnMessage(_)); EXPECT_CALL(mock_router_, OnRoutesUpdated(MediaRouteProviderId::CAST, Not(IsEmpty()), _, _)); environment_.RunUntilIdle(); VerifyAndClearExpectations(); } // Precondition: |LaunchSession()| must be called first. void LaunchSessionResponseFailure() { // 2 things will happen: // (1) Route is removed // (2) Issue will be sent. cast_channel::LaunchSessionResponse response; response.result = cast_channel::LaunchSessionResponse::Result::kError; std::move(launch_session_callback_).Run(std::move(response)); EXPECT_CALL(mock_router_, OnIssue(_)); EXPECT_CALL(mock_router_, OnRoutesUpdated(MediaRouteProviderId::CAST, IsEmpty(), _, _)); EXPECT_CALL( *client_connection_, DidChangeState(blink::mojom::PresentationConnectionState::TERMINATED)); environment_.RunUntilIdle(); VerifyAndClearExpectations(); } // Precondition: |LaunchSession()| must be called first. void TerminateSession(bool success) { cast_channel::StopSessionCallback stop_session_callback; EXPECT_CALL(message_handler_, StopSession(sink_.cast_data().cast_channel_id, "sessionId", _)) .WillOnce([&stop_session_callback]( int, const std::string&, cast_channel::StopSessionCallback callback) { stop_session_callback = std::move(callback); }); manager_->TerminateSession( route_->media_route_id(), base::BindOnce( success ? &CastActivityManagerTest::ExpectTerminateResultSuccess : &CastActivityManagerTest::ExpectTerminateResultFailure, base::Unretained(this))); // Receiver action stop message is sent to SDK client. EXPECT_CALL(*client_connection_, OnMessage(_)); environment_.RunUntilIdle(); VerifyAndClearExpectations(); std::move(stop_session_callback).Run(success); } // Precondition: |LaunchSession()| called, |LaunchSessionResponseSuccess()| // not called. void TerminateNoSession() { // Stop session message not sent because session has not launched yet. EXPECT_CALL(message_handler_, StopSession(_, _, _)).Times(0); manager_->TerminateSession( route_->media_route_id(), base::BindOnce(&CastActivityManagerTest::ExpectTerminateResultSuccess, base::Unretained(this))); environment_.RunUntilIdle(); VerifyAndClearExpectations(); } void ExpectTerminateResultSuccess( const base::Optional<std::string>& error_text, RouteRequestResult::ResultCode result_code) { EXPECT_EQ(RouteRequestResult::OK, result_code); EXPECT_CALL(mock_router_, OnRoutesUpdated(MediaRouteProviderId::CAST, IsEmpty(), _, _)); EXPECT_CALL( *client_connection_, DidChangeState(blink::mojom::PresentationConnectionState::TERMINATED)); environment_.RunUntilIdle(); VerifyAndClearExpectations(); } void ExpectTerminateResultFailure( const base::Optional<std::string>& error_text, RouteRequestResult::ResultCode result_code) { EXPECT_NE(RouteRequestResult::OK, result_code); EXPECT_CALL(mock_router_, OnRoutesUpdated(MediaRouteProviderId::CAST, _, _, _)) .Times(0); environment_.RunUntilIdle(); VerifyAndClearExpectations(); } protected: base::test::ScopedTaskEnvironment environment_; std::unique_ptr<service_manager::TestConnectorFactory> connector_factory_; std::unique_ptr<service_manager::Connector> connector_; DataDecoder data_decoder_; MockMojoMediaRouter mock_router_; mojom::MediaRouterPtr router_ptr_; std::unique_ptr<mojo::Binding<mojom::MediaRouter>> router_binding_; cast_channel::MockCastSocketService socket_service_; cast_channel::MockCastSocket socket_; cast_channel::MockCastMessageHandler message_handler_; MediaSinkInternal sink_ = CreateCastSink(1); std::unique_ptr<MediaRoute> route_; std::unique_ptr<ClientPresentationConnection> client_connection_; cast_channel::LaunchSessionCallback launch_session_callback_; TestMediaSinkService media_sink_service_; MockCastAppDiscoveryService app_discovery_service_; std::unique_ptr<CastActivityManager> manager_; }; TEST_F(CastActivityManagerTest, LaunchSession) { LaunchSession(); LaunchSessionResponseSuccess(); } TEST_F(CastActivityManagerTest, LaunchSessionFails) { LaunchSession(); LaunchSessionResponseFailure(); } TEST_F(CastActivityManagerTest, TerminateSession) { LaunchSession(); LaunchSessionResponseSuccess(); TerminateSession(true); } TEST_F(CastActivityManagerTest, TerminateSessionFails) { LaunchSession(); LaunchSessionResponseSuccess(); TerminateSession(false); } TEST_F(CastActivityManagerTest, TerminateSessionBeforeLaunchResponse) { LaunchSession(); TerminateNoSession(); // Route already terminated, so no-op when handling launch response. std::move(launch_session_callback_).Run(GetSuccessLaunchResponse()); EXPECT_CALL(mock_router_, OnRoutesUpdated(MediaRouteProviderId::CAST, _, _, _)) .Times(0); environment_.RunUntilIdle(); } TEST_F(CastActivityManagerTest, AppMessageFromReceiver) { LaunchSession(); LaunchSessionResponseSuccess(); // Destination ID matches client ID. cast_channel::CastMessage message = cast_channel::CreateCastMessage( "urn:x-cast:com.google.foo", base::Value(base::Value::Type::DICTIONARY), "sourceId", "12345"); message_handler_.OnMessage(socket_, message); EXPECT_CALL(*client_connection_, OnMessage(_)); environment_.RunUntilIdle(); } TEST_F(CastActivityManagerTest, AppMessageFromReceiverAllDestinations) { LaunchSession(); LaunchSessionResponseSuccess(); // Matches all destinations. cast_channel::CastMessage message = cast_channel::CreateCastMessage( "urn:x-cast:com.google.foo", base::Value(base::Value::Type::DICTIONARY), "sourceId", "*"); message_handler_.OnMessage(socket_, message); EXPECT_CALL(*client_connection_, OnMessage(_)); environment_.RunUntilIdle(); } TEST_F(CastActivityManagerTest, AppMessageFromReceiverUnknownDestination) { LaunchSession(); LaunchSessionResponseSuccess(); // Destination ID does not match client ID. cast_channel::CastMessage message = cast_channel::CreateCastMessage( "urn:x-cast:com.google.foo", base::Value(base::Value::Type::DICTIONARY), "sourceId", "99999"); message_handler_.OnMessage(socket_, message); EXPECT_CALL(*client_connection_, OnMessage(_)).Times(0); environment_.RunUntilIdle(); } TEST_F(CastActivityManagerTest, AppMessageFromClient) { LaunchSession(); LaunchSessionResponseSuccess(); EXPECT_CALL(message_handler_, SendAppMessage(sink_.cast_data().cast_channel_id, _)); client_connection_->SendMessageToMediaRouter( blink::mojom::PresentationConnectionMessage::NewMessage( R"({ "type": "app_message", "clientId": "12345", "message": { "namespaceName": "urn:x-cast:com.google.foo", "sessionId": "sessionId", "message": {} } })")); // An ACK message is sent back to client. EXPECT_CALL(*client_connection_, OnMessage(_)); environment_.RunUntilIdle(); } TEST_F(CastActivityManagerTest, AppMessageFromClientInvalidNamespace) { LaunchSession(); LaunchSessionResponseSuccess(); // Message namespace not in set of allowed namespaces. EXPECT_CALL(message_handler_, SendAppMessage(sink_.cast_data().cast_channel_id, _)) .Times(0); client_connection_->SendMessageToMediaRouter( blink::mojom::PresentationConnectionMessage::NewMessage( R"({ "type": "app_message", "clientId": "12345", "message": { "namespaceName": "someOtherNamespace", "sessionId": "sessionId", "message": {} } })")); } } // namespace media_router
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
6e936ea358a13329e153593bde33dff85b3a39cd
4e44e320ac8257fbc25aa57ab870f4abad588e1e
/Delaunay/mainwindow.h
a958f37d0a63369b4a9e96213a34b4b13c39dfa6
[]
no_license
JoshHammond0/DT
a7cd8901512fa6dbdeded31c0b7f11a473340b91
b7b9563175e98d534124e416a7e54a205c4c3005
refs/heads/master
2016-08-12T19:59:34.966354
2015-12-02T16:48:00
2015-12-02T16:48:00
46,005,351
0
0
null
null
null
null
UTF-8
C++
false
false
965
h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QWidget> #include <QHBoxLayout> #include "graph.h" #include <QVBoxLayout> #include <QGraphicsScene> #include <QGraphicsView> #include <QGraphicsEllipseItem> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); void printNodes(); void printEdges(); std::pair< std::pair<int,int>, double> findCircumCircle(node n1, node n2, node n3); void delaunay(void); bool circleTest(node p, std::pair<std::pair<double, double>, double> circumCircle); private: Ui::MainWindow *ui; QWidget *mainWidget; QHBoxLayout *inputPanel; QVBoxLayout *mainLayout; QGraphicsScene *scene; QGraphicsView *view; std::vector<QGraphicsEllipseItem *> circumCircles; std::vector<QGraphicsEllipseItem *> nodeImages; Graph points; }; #endif // MAINWINDOW_H
[ "jjhammond001@gmail.com" ]
jjhammond001@gmail.com
2b5b2899f3c41e47275bbf6416dd1a63b1e7d7fb
c721b5e66a5d3a0a546a88d64c9f37e58842898c
/src/qt/transcoinstrings.cpp
ce0bff060597570b226759fa5ede9add7827a00c
[ "MIT" ]
permissive
transcoincc/transcoin
35203ef36f6b7334ebc68862171afaa161787665
a3df0d9946753c838394e1e6357f7a4590c9a858
refs/heads/master
2020-05-30T23:18:52.301698
2019-06-03T14:02:41
2019-06-03T14:02:41
190,014,270
0
0
null
null
null
null
UTF-8
C++
false
false
32,647
cpp
#include <QtGlobal> // Automatically generated by extract_strings.py #ifdef __GNUC__ #define UNUSED __attribute__((unused)) #else #define UNUSED #endif static const char UNUSED *transcoin_strings[] = { QT_TRANSLATE_NOOP("transcoin-core", " mints deleted\n"), QT_TRANSLATE_NOOP("transcoin-core", " mints updated, "), QT_TRANSLATE_NOOP("transcoin-core", " unconfirmed transactions removed\n"), QT_TRANSLATE_NOOP("transcoin-core", "" "(1 = keep tx meta data e.g. account owner and payment request information, 2 " "= drop tx meta data)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Allow JSON-RPC connections from specified source. Valid for <ip> are a " "single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or " "a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"), QT_TRANSLATE_NOOP("transcoin-core", "" "An error occurred while setting up the RPC address %s port %u for listening: " "%s"), QT_TRANSLATE_NOOP("transcoin-core", "" "Bind to given address and always listen on it. Use [host]:port notation for " "IPv6"), QT_TRANSLATE_NOOP("transcoin-core", "" "Bind to given address and whitelist peers connecting to it. Use [host]:port " "notation for IPv6"), QT_TRANSLATE_NOOP("transcoin-core", "" "Bind to given address to listen for JSON-RPC connections. Use [host]:port " "notation for IPv6. This option can be specified multiple times (default: " "bind to all interfaces)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Calculated accumulator checkpoint is not what is recorded by block index"), QT_TRANSLATE_NOOP("transcoin-core", "" "Cannot obtain a lock on data directory %s. TRNS Core is probably already " "running."), QT_TRANSLATE_NOOP("transcoin-core", "" "Change automatic finalized budget voting behavior. mode=auto: Vote for only " "exact finalized budget match to my generated budget. (string, default: auto)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Continuously rate-limit free transactions to <n>*1000 bytes per minute " "(default:%u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Create new files with system default permissions, instead of umask 077 (only " "effective with disabled wallet functionality)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Delete all wallet transactions and only recover those parts of the " "blockchain through -rescan on startup"), QT_TRANSLATE_NOOP("transcoin-core", "" "Disable all TRNS specific functionality (Masternodes, Zerocoin, SwiftX, " "Budgeting) (0-1, default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Distributed under the MIT software license, see the accompanying file " "COPYING or <http://www.opensource.org/licenses/mit-license.php>."), QT_TRANSLATE_NOOP("transcoin-core", "" "Enable SwiftX, show confirmations for locked transactions (bool, default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Enable automatic wallet backups triggered after each zTransCoin minting (0-1, " "default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Enable spork administration functionality with the appropriate private key."), QT_TRANSLATE_NOOP("transcoin-core", "" "Enter regression test mode, which uses a special chain in which blocks can " "be solved instantly."), QT_TRANSLATE_NOOP("transcoin-core", "" "Error: Listening for incoming connections failed (listen returned error %s)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Error: The transaction was rejected! This might happen if some of the coins " "in your wallet were already spent, such as if you used a copy of wallet.dat " "and coins were spent in the copy but not marked as spent here."), QT_TRANSLATE_NOOP("transcoin-core", "" "Error: This transaction requires a transaction fee of at least %s because of " "its amount, complexity, or use of recently received funds!"), QT_TRANSLATE_NOOP("transcoin-core", "" "Error: Unsupported argument -checklevel found. Checklevel must be level 4."), QT_TRANSLATE_NOOP("transcoin-core", "" "Error: Unsupported argument -socks found. Setting SOCKS version isn't " "possible anymore, only SOCKS5 proxies are supported."), QT_TRANSLATE_NOOP("transcoin-core", "" "Execute command when a relevant alert is received or we see a really long " "fork (%s in cmd is replaced by message)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Execute command when a wallet transaction changes (%s in cmd is replaced by " "TxID)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Execute command when the best block changes (%s in cmd is replaced by block " "hash)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Fees (in TRNS/Kb) smaller than this are considered zero fee for relaying " "(default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Fees (in TRNS/Kb) smaller than this are considered zero fee for transaction " "creation (default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Flush database activity from memory pool to disk log every <n> megabytes " "(default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Found unconfirmed denominated outputs, will wait till they confirm to " "continue."), QT_TRANSLATE_NOOP("transcoin-core", "" "If paytxfee is not set, include enough fee so transactions begin " "confirmation on average within n blocks (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "In this mode -genproclimit controls how many blocks are generated " "immediately."), QT_TRANSLATE_NOOP("transcoin-core", "" "Insufficient or insufficient confirmed funds, you might need to wait a few " "minutes and try again."), QT_TRANSLATE_NOOP("transcoin-core", "" "Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay " "fee of %s to prevent stuck transactions)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Keep the specified amount available for spending at all times (default: 0)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Log transaction priority and fee per kB when mining blocks (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Maintain a full transaction index, used by the getrawtransaction rpc call " "(default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Maximum size of data in data carrier transactions we relay and mine " "(default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Maximum total fees to use in a single wallet transaction, setting too low " "may abort large transactions (default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Number of seconds to keep misbehaving peers from reconnecting (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Obfuscation uses exact denominated amounts to send funds, you might simply " "need to anonymize some more coins."), QT_TRANSLATE_NOOP("transcoin-core", "" "Output debugging information (default: %u, supplying <category> is optional)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Preferred Denomination for automatically minted Zerocoin " "(1/5/10/50/100/500/1000/5000), 0 for no preference. default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Query for peer addresses via DNS lookup, if low on addresses (default: 1 " "unless -connect)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Randomize credentials for every proxy connection. This enables Tor stream " "isolation (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Require high priority for relaying free or low-fee transactions (default:%u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Send trace/debug info to console instead of debug.log file (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Set the number of script verification threads (%u to %d, 0 = auto, <0 = " "leave that many cores free, default: %d)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Set the number of threads for coin generation if enabled (-1 = all cores, " "default: %d)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Show N confirmations for a successfully locked transaction (0-9999, default: " "%u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Support filtering of blocks and transaction with bloom filters (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "" "SwiftX requires inputs with at least 6 confirmations, you might need to wait " "a few minutes and try again."), QT_TRANSLATE_NOOP("transcoin-core", "" "This is a pre-release test build - use at your own risk - do not use for " "staking or merchant applications!"), QT_TRANSLATE_NOOP("transcoin-core", "" "This product includes software developed by the OpenSSL Project for use in " "the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software " "written by Eric Young and UPnP software written by Thomas Bernard."), QT_TRANSLATE_NOOP("transcoin-core", "" "To use transcoind, or the -server option to transcoin-qt, you must set an rpcpassword " "in the configuration file:\n" "%s\n" "It is recommended you use the following random password:\n" "rpcuser=transcoinrpc\n" "rpcpassword=%s\n" "(you do not need to remember this password)\n" "The username and password MUST NOT be the same.\n" "If the file does not exist, create it with owner-readable-only file " "permissions.\n" "It is also recommended to set alertnotify so you are notified of problems;\n" "for example: alertnotify=echo %%s | mail -s \"TRNS Alert\" admin@foo.com\n"), QT_TRANSLATE_NOOP("transcoin-core", "" "Unable to bind to %s on this computer. TRNS Core is probably already running."), QT_TRANSLATE_NOOP("transcoin-core", "" "Unable to locate enough Obfuscation denominated funds for this transaction."), QT_TRANSLATE_NOOP("transcoin-core", "" "Unable to locate enough Obfuscation non-denominated funds for this " "transaction that are not equal 10000 TRNS."), QT_TRANSLATE_NOOP("transcoin-core", "" "Unable to locate enough funds for this transaction that are not equal 10000 " "TRNS."), QT_TRANSLATE_NOOP("transcoin-core", "" "Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: " "%s)"), QT_TRANSLATE_NOOP("transcoin-core", "" "Warning: -maxtxfee is set very high! Fees this large could be paid on a " "single transaction."), QT_TRANSLATE_NOOP("transcoin-core", "" "Warning: -paytxfee is set very high! This is the transaction fee you will " "pay if you send a transaction."), QT_TRANSLATE_NOOP("transcoin-core", "" "Warning: Please check that your computer's date and time are correct! If " "your clock is wrong TRNS Core will not work properly."), QT_TRANSLATE_NOOP("transcoin-core", "" "Warning: The network does not appear to fully agree! Some miners appear to " "be experiencing issues."), QT_TRANSLATE_NOOP("transcoin-core", "" "Warning: We do not appear to fully agree with our peers! You may need to " "upgrade, or other nodes may need to upgrade."), QT_TRANSLATE_NOOP("transcoin-core", "" "Warning: error reading wallet.dat! All keys read correctly, but transaction " "data or address book entries might be missing or incorrect."), QT_TRANSLATE_NOOP("transcoin-core", "" "Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as " "wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect " "you should restore from a backup."), QT_TRANSLATE_NOOP("transcoin-core", "" "Whitelist peers connecting from the given netmask or IP address. Can be " "specified multiple times."), QT_TRANSLATE_NOOP("transcoin-core", "" "Whitelisted peers cannot be DoS banned and their transactions are always " "relayed, even if they are already in the mempool, useful e.g. for a gateway"), QT_TRANSLATE_NOOP("transcoin-core", "" "You must specify a masternodeprivkey in the configuration. Please see " "documentation for help."), QT_TRANSLATE_NOOP("transcoin-core", "(48302 could be used only on mainnet)"), QT_TRANSLATE_NOOP("transcoin-core", "(default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "(default: 1)"), QT_TRANSLATE_NOOP("transcoin-core", "(must be 48302 for mainnet)"), QT_TRANSLATE_NOOP("transcoin-core", "<category> can be:"), QT_TRANSLATE_NOOP("transcoin-core", "Accept command line and JSON-RPC commands"), QT_TRANSLATE_NOOP("transcoin-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"), QT_TRANSLATE_NOOP("transcoin-core", "Accept public REST requests (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Acceptable ciphers (default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Add a node to connect to and attempt to keep the connection open"), QT_TRANSLATE_NOOP("transcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"), QT_TRANSLATE_NOOP("transcoin-core", "Already have that input."), QT_TRANSLATE_NOOP("transcoin-core", "Always query for peer addresses via DNS lookup (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Attempt to force blockchain corruption recovery"), QT_TRANSLATE_NOOP("transcoin-core", "Attempt to recover private keys from a corrupt wallet.dat"), QT_TRANSLATE_NOOP("transcoin-core", "Automatically create Tor hidden service (default: %d)"), QT_TRANSLATE_NOOP("transcoin-core", "Block creation options:"), QT_TRANSLATE_NOOP("transcoin-core", "Calculating missing accumulators..."), QT_TRANSLATE_NOOP("transcoin-core", "Can't denominate: no compatible inputs left."), QT_TRANSLATE_NOOP("transcoin-core", "Can't find random Masternode."), QT_TRANSLATE_NOOP("transcoin-core", "Can't mix while sync in progress."), QT_TRANSLATE_NOOP("transcoin-core", "Cannot downgrade wallet"), QT_TRANSLATE_NOOP("transcoin-core", "Cannot resolve -bind address: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Cannot resolve -externalip address: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Cannot resolve -whitebind address: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Cannot write default address"), QT_TRANSLATE_NOOP("transcoin-core", "Collateral not valid."), QT_TRANSLATE_NOOP("transcoin-core", "Connect only to the specified node(s)"), QT_TRANSLATE_NOOP("transcoin-core", "Connect through SOCKS5 proxy"), QT_TRANSLATE_NOOP("transcoin-core", "Connect to a node to retrieve peer addresses, and disconnect"), QT_TRANSLATE_NOOP("transcoin-core", "Connection options:"), QT_TRANSLATE_NOOP("transcoin-core", "Copyright (C) 2009-%i The Bitcoin Core Developers"), QT_TRANSLATE_NOOP("transcoin-core", "Copyright (C) 2014-%i The Dash Core Developers"), QT_TRANSLATE_NOOP("transcoin-core", "Copyright (C) 2015-%i The TRNS Core Developers"), QT_TRANSLATE_NOOP("transcoin-core", "Corrupted block database detected"), QT_TRANSLATE_NOOP("transcoin-core", "Could not parse -rpcbind value %s as network address"), QT_TRANSLATE_NOOP("transcoin-core", "Could not parse masternode.conf"), QT_TRANSLATE_NOOP("transcoin-core", "Debugging/Testing options:"), QT_TRANSLATE_NOOP("transcoin-core", "Delete blockchain folders and resync from scratch"), QT_TRANSLATE_NOOP("transcoin-core", "Disable OS notifications for incoming transactions (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Disable safemode, override a real safe mode event (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Discover own IP address (default: 1 when listening and no -externalip)"), QT_TRANSLATE_NOOP("transcoin-core", "Display the stake modifier calculations in the debug.log file."), QT_TRANSLATE_NOOP("transcoin-core", "Display verbose coin stake messages in the debug.log file."), QT_TRANSLATE_NOOP("transcoin-core", "Do not load the wallet and disable wallet RPC calls"), QT_TRANSLATE_NOOP("transcoin-core", "Do you want to rebuild the block database now?"), QT_TRANSLATE_NOOP("transcoin-core", "Done loading"), QT_TRANSLATE_NOOP("transcoin-core", "Enable automatic Zerocoin minting (0-1, default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Enable publish hash block in <address>"), QT_TRANSLATE_NOOP("transcoin-core", "Enable publish hash transaction (locked via SwiftX) in <address>"), QT_TRANSLATE_NOOP("transcoin-core", "Enable publish hash transaction in <address>"), QT_TRANSLATE_NOOP("transcoin-core", "Enable publish raw block in <address>"), QT_TRANSLATE_NOOP("transcoin-core", "Enable publish raw transaction (locked via SwiftX) in <address>"), QT_TRANSLATE_NOOP("transcoin-core", "Enable publish raw transaction in <address>"), QT_TRANSLATE_NOOP("transcoin-core", "Enable staking functionality (0-1, default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Enable the client to act as a masternode (0-1, default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Entries are full."), QT_TRANSLATE_NOOP("transcoin-core", "Error connecting to Masternode."), QT_TRANSLATE_NOOP("transcoin-core", "Error initializing block database"), QT_TRANSLATE_NOOP("transcoin-core", "Error initializing wallet database environment %s!"), QT_TRANSLATE_NOOP("transcoin-core", "Error loading block database"), QT_TRANSLATE_NOOP("transcoin-core", "Error loading wallet.dat"), QT_TRANSLATE_NOOP("transcoin-core", "Error loading wallet.dat: Wallet corrupted"), QT_TRANSLATE_NOOP("transcoin-core", "Error loading wallet.dat: Wallet requires newer version of TRNS Core"), QT_TRANSLATE_NOOP("transcoin-core", "Error opening block database"), QT_TRANSLATE_NOOP("transcoin-core", "Error reading from database, shutting down."), QT_TRANSLATE_NOOP("transcoin-core", "Error recovering public key."), QT_TRANSLATE_NOOP("transcoin-core", "Error"), QT_TRANSLATE_NOOP("transcoin-core", "Error: A fatal internal error occured, see debug.log for details"), QT_TRANSLATE_NOOP("transcoin-core", "Error: Can't select current denominated inputs"), QT_TRANSLATE_NOOP("transcoin-core", "Error: Disk space is low!"), QT_TRANSLATE_NOOP("transcoin-core", "Error: Unsupported argument -tor found, use -onion."), QT_TRANSLATE_NOOP("transcoin-core", "Error: Wallet locked, unable to create transaction!"), QT_TRANSLATE_NOOP("transcoin-core", "Error: You already have pending entries in the Obfuscation pool"), QT_TRANSLATE_NOOP("transcoin-core", "Failed to calculate accumulator checkpoint"), QT_TRANSLATE_NOOP("transcoin-core", "Failed to listen on any port. Use -listen=0 if you want this."), QT_TRANSLATE_NOOP("transcoin-core", "Failed to read block index"), QT_TRANSLATE_NOOP("transcoin-core", "Failed to read block"), QT_TRANSLATE_NOOP("transcoin-core", "Failed to write block index"), QT_TRANSLATE_NOOP("transcoin-core", "Fee (in TRNS/kB) to add to transactions you send (default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Finalizing transaction."), QT_TRANSLATE_NOOP("transcoin-core", "Force safe mode (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Found enough users, signing ( waiting %s )"), QT_TRANSLATE_NOOP("transcoin-core", "Found enough users, signing ..."), QT_TRANSLATE_NOOP("transcoin-core", "Generate coins (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "How many blocks to check at startup (default: %u, 0 = all)"), QT_TRANSLATE_NOOP("transcoin-core", "If <category> is not supplied, output all debugging information."), QT_TRANSLATE_NOOP("transcoin-core", "Importing..."), QT_TRANSLATE_NOOP("transcoin-core", "Imports blocks from external blk000??.dat file"), QT_TRANSLATE_NOOP("transcoin-core", "Include IP addresses in debug output (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Incompatible mode."), QT_TRANSLATE_NOOP("transcoin-core", "Incompatible version."), QT_TRANSLATE_NOOP("transcoin-core", "Incorrect or no genesis block found. Wrong datadir for network?"), QT_TRANSLATE_NOOP("transcoin-core", "Information"), QT_TRANSLATE_NOOP("transcoin-core", "Initialization sanity check failed. TRNS Core is shutting down."), QT_TRANSLATE_NOOP("transcoin-core", "Input is not valid."), QT_TRANSLATE_NOOP("transcoin-core", "Insufficient funds"), QT_TRANSLATE_NOOP("transcoin-core", "Insufficient funds."), QT_TRANSLATE_NOOP("transcoin-core", "Invalid -onion address or hostname: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid -proxy address or hostname: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid amount for -maxtxfee=<amount>: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid amount for -minrelaytxfee=<amount>: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid amount for -mintxfee=<amount>: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid amount for -paytxfee=<amount>: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid amount for -reservebalance=<amount>"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid amount"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid masternodeprivkey. Please see documenation."), QT_TRANSLATE_NOOP("transcoin-core", "Invalid netmask specified in -whitelist: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid port detected in masternode.conf"), QT_TRANSLATE_NOOP("transcoin-core", "Invalid private key."), QT_TRANSLATE_NOOP("transcoin-core", "Invalid script detected."), QT_TRANSLATE_NOOP("transcoin-core", "Keep at most <n> unconnectable transactions in memory (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Last Obfuscation was too recent."), QT_TRANSLATE_NOOP("transcoin-core", "Last successful Obfuscation action was too recent."), QT_TRANSLATE_NOOP("transcoin-core", "Limit size of signature cache to <n> entries (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Line: %d"), QT_TRANSLATE_NOOP("transcoin-core", "Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Listen for connections on <port> (default: %u or testnet: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Loading addresses..."), QT_TRANSLATE_NOOP("transcoin-core", "Loading block index..."), QT_TRANSLATE_NOOP("transcoin-core", "Loading budget cache..."), QT_TRANSLATE_NOOP("transcoin-core", "Loading masternode cache..."), QT_TRANSLATE_NOOP("transcoin-core", "Loading masternode payment cache..."), QT_TRANSLATE_NOOP("transcoin-core", "Loading sporks..."), QT_TRANSLATE_NOOP("transcoin-core", "Loading wallet... (%3.2f %%)"), QT_TRANSLATE_NOOP("transcoin-core", "Loading wallet..."), QT_TRANSLATE_NOOP("transcoin-core", "Lock is already in place."), QT_TRANSLATE_NOOP("transcoin-core", "Lock masternodes from masternode configuration file (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Maintain at most <n> connections to peers (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Masternode options:"), QT_TRANSLATE_NOOP("transcoin-core", "Masternode queue is full."), QT_TRANSLATE_NOOP("transcoin-core", "Masternode:"), QT_TRANSLATE_NOOP("transcoin-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Missing input transaction information."), QT_TRANSLATE_NOOP("transcoin-core", "Mixing in progress..."), QT_TRANSLATE_NOOP("transcoin-core", "Need to specify a port with -whitebind: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "No Masternodes detected."), QT_TRANSLATE_NOOP("transcoin-core", "No compatible Masternode found."), QT_TRANSLATE_NOOP("transcoin-core", "No funds detected in need of denominating."), QT_TRANSLATE_NOOP("transcoin-core", "No matching denominations found for mixing."), QT_TRANSLATE_NOOP("transcoin-core", "Node relay options:"), QT_TRANSLATE_NOOP("transcoin-core", "Non-standard public key detected."), QT_TRANSLATE_NOOP("transcoin-core", "Not compatible with existing transactions."), QT_TRANSLATE_NOOP("transcoin-core", "Not enough file descriptors available."), QT_TRANSLATE_NOOP("transcoin-core", "Not in the Masternode list."), QT_TRANSLATE_NOOP("transcoin-core", "Number of automatic wallet backups (default: 10)"), QT_TRANSLATE_NOOP("transcoin-core", "Obfuscation is idle."), QT_TRANSLATE_NOOP("transcoin-core", "Obfuscation request complete:"), QT_TRANSLATE_NOOP("transcoin-core", "Obfuscation request incomplete:"), QT_TRANSLATE_NOOP("transcoin-core", "Only accept block chain matching built-in checkpoints (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Only connect to nodes in network <net> (ipv4, ipv6 or onion)"), QT_TRANSLATE_NOOP("transcoin-core", "Options:"), QT_TRANSLATE_NOOP("transcoin-core", "Password for JSON-RPC connections"), QT_TRANSLATE_NOOP("transcoin-core", "Percentage of automatically minted Zerocoin (10-100, default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Preparing for resync..."), QT_TRANSLATE_NOOP("transcoin-core", "Prepend debug output with timestamp (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Print version and exit"), QT_TRANSLATE_NOOP("transcoin-core", "RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)"), QT_TRANSLATE_NOOP("transcoin-core", "RPC server options:"), QT_TRANSLATE_NOOP("transcoin-core", "RPC support for HTTP persistent connections (default: %d)"), QT_TRANSLATE_NOOP("transcoin-core", "Randomly drop 1 of every <n> network messages"), QT_TRANSLATE_NOOP("transcoin-core", "Randomly fuzz 1 of every <n> network messages"), QT_TRANSLATE_NOOP("transcoin-core", "Rebuild block chain index from current blk000??.dat files"), QT_TRANSLATE_NOOP("transcoin-core", "Recalculating coin supply may take 30-60 minutes..."), QT_TRANSLATE_NOOP("transcoin-core", "Recalculating supply statistics may take 30-60 minutes..."), QT_TRANSLATE_NOOP("transcoin-core", "Receive and display P2P network alerts (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Reindex the accumulator database"), QT_TRANSLATE_NOOP("transcoin-core", "Relay and mine data carrier transactions (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Relay non-P2SH multisig (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Rescan the block chain for missing wallet transactions"), QT_TRANSLATE_NOOP("transcoin-core", "Rescanning..."), QT_TRANSLATE_NOOP("transcoin-core", "ResetMintZerocoin finished: "), QT_TRANSLATE_NOOP("transcoin-core", "ResetSpentZerocoin finished: "), QT_TRANSLATE_NOOP("transcoin-core", "Run a thread to flush wallet periodically (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Run in the background as a daemon and accept commands"), QT_TRANSLATE_NOOP("transcoin-core", "Send transactions as zero-fee transactions if possible (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Server certificate file (default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Server private key (default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Session not complete!"), QT_TRANSLATE_NOOP("transcoin-core", "Session timed out."), QT_TRANSLATE_NOOP("transcoin-core", "Set database cache size in megabytes (%d to %d, default: %d)"), QT_TRANSLATE_NOOP("transcoin-core", "Set external address:port to get to this masternode (example: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Set key pool size to <n> (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Set maximum block size in bytes (default: %d)"), QT_TRANSLATE_NOOP("transcoin-core", "Set minimum block size in bytes (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Set the Maximum reorg depth (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Set the masternode private key"), QT_TRANSLATE_NOOP("transcoin-core", "Set the number of threads to service RPC calls (default: %d)"), QT_TRANSLATE_NOOP("transcoin-core", "Sets the DB_PRIVATE flag in the wallet db environment (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Show all debugging options (usage: --help -help-debug)"), QT_TRANSLATE_NOOP("transcoin-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"), QT_TRANSLATE_NOOP("transcoin-core", "Signing failed."), QT_TRANSLATE_NOOP("transcoin-core", "Signing timed out."), QT_TRANSLATE_NOOP("transcoin-core", "Signing transaction failed"), QT_TRANSLATE_NOOP("transcoin-core", "Specify configuration file (default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Specify connection timeout in milliseconds (minimum: 1, default: %d)"), QT_TRANSLATE_NOOP("transcoin-core", "Specify data directory"), QT_TRANSLATE_NOOP("transcoin-core", "Specify masternode configuration file (default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Specify pid file (default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Specify wallet file (within data directory)"), QT_TRANSLATE_NOOP("transcoin-core", "Specify your own public address"), QT_TRANSLATE_NOOP("transcoin-core", "Spend unconfirmed change when sending transactions (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Staking options:"), QT_TRANSLATE_NOOP("transcoin-core", "Stop running after importing blocks from disk (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Submitted following entries to masternode: %u / %d"), QT_TRANSLATE_NOOP("transcoin-core", "Submitted to masternode, waiting for more entries ( %u / %d ) %s"), QT_TRANSLATE_NOOP("transcoin-core", "Submitted to masternode, waiting in queue %s"), QT_TRANSLATE_NOOP("transcoin-core", "SwiftX options:"), QT_TRANSLATE_NOOP("transcoin-core", "Synchronization failed"), QT_TRANSLATE_NOOP("transcoin-core", "Synchronization finished"), QT_TRANSLATE_NOOP("transcoin-core", "Synchronization pending..."), QT_TRANSLATE_NOOP("transcoin-core", "Synchronizing budgets..."), QT_TRANSLATE_NOOP("transcoin-core", "Synchronizing masternode winners..."), QT_TRANSLATE_NOOP("transcoin-core", "Synchronizing masternodes..."), QT_TRANSLATE_NOOP("transcoin-core", "Synchronizing sporks..."), QT_TRANSLATE_NOOP("transcoin-core", "This help message"), QT_TRANSLATE_NOOP("transcoin-core", "This is experimental software."), QT_TRANSLATE_NOOP("transcoin-core", "This is intended for regression testing tools and app development."), QT_TRANSLATE_NOOP("transcoin-core", "This is not a Masternode."), QT_TRANSLATE_NOOP("transcoin-core", "Threshold for disconnecting misbehaving peers (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Tor control port password (default: empty)"), QT_TRANSLATE_NOOP("transcoin-core", "Tor control port to use if onion listening enabled (default: %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Transaction amount too small"), QT_TRANSLATE_NOOP("transcoin-core", "Transaction amounts must be positive"), QT_TRANSLATE_NOOP("transcoin-core", "Transaction created successfully."), QT_TRANSLATE_NOOP("transcoin-core", "Transaction fees are too high."), QT_TRANSLATE_NOOP("transcoin-core", "Transaction not valid."), QT_TRANSLATE_NOOP("transcoin-core", "Transaction too large for fee policy"), QT_TRANSLATE_NOOP("transcoin-core", "Transaction too large"), QT_TRANSLATE_NOOP("transcoin-core", "Transmitting final transaction."), QT_TRANSLATE_NOOP("transcoin-core", "Unable to bind to %s on this computer (bind returned error %s)"), QT_TRANSLATE_NOOP("transcoin-core", "Unable to sign spork message, wrong key?"), QT_TRANSLATE_NOOP("transcoin-core", "Unknown network specified in -onlynet: '%s'"), QT_TRANSLATE_NOOP("transcoin-core", "Unknown state: id = %u"), QT_TRANSLATE_NOOP("transcoin-core", "Upgrade wallet to latest format"), QT_TRANSLATE_NOOP("transcoin-core", "Use OpenSSL (https) for JSON-RPC connections"), QT_TRANSLATE_NOOP("transcoin-core", "Use UPnP to map the listening port (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Use UPnP to map the listening port (default: 1 when listening)"), QT_TRANSLATE_NOOP("transcoin-core", "Use a custom max chain reorganization depth (default: %u)"), QT_TRANSLATE_NOOP("transcoin-core", "Use the test network"), QT_TRANSLATE_NOOP("transcoin-core", "Username for JSON-RPC connections"), QT_TRANSLATE_NOOP("transcoin-core", "Value more than Obfuscation pool maximum allows."), QT_TRANSLATE_NOOP("transcoin-core", "Verifying blocks..."), QT_TRANSLATE_NOOP("transcoin-core", "Verifying wallet..."), QT_TRANSLATE_NOOP("transcoin-core", "Wallet %s resides outside data directory %s"), QT_TRANSLATE_NOOP("transcoin-core", "Wallet is locked."), QT_TRANSLATE_NOOP("transcoin-core", "Wallet needed to be rewritten: restart TRNS Core to complete"), QT_TRANSLATE_NOOP("transcoin-core", "Wallet options:"), QT_TRANSLATE_NOOP("transcoin-core", "Wallet window title"), QT_TRANSLATE_NOOP("transcoin-core", "Warning"), QT_TRANSLATE_NOOP("transcoin-core", "Warning: This version is obsolete, upgrade required!"), QT_TRANSLATE_NOOP("transcoin-core", "Warning: Unsupported argument -benchmark ignored, use -debug=bench."), QT_TRANSLATE_NOOP("transcoin-core", "Warning: Unsupported argument -debugnet ignored, use -debug=net."), QT_TRANSLATE_NOOP("transcoin-core", "Will retry..."), QT_TRANSLATE_NOOP("transcoin-core", "You need to rebuild the database using -reindex to change -txindex"), QT_TRANSLATE_NOOP("transcoin-core", "Your entries added successfully."), QT_TRANSLATE_NOOP("transcoin-core", "Your transaction was accepted into the pool!"), QT_TRANSLATE_NOOP("transcoin-core", "Zapping all transactions from wallet..."), QT_TRANSLATE_NOOP("transcoin-core", "ZeroMQ notification options:"), QT_TRANSLATE_NOOP("transcoin-core", "Zerocoin options:"), QT_TRANSLATE_NOOP("transcoin-core", "failed to validate zerocoin"), QT_TRANSLATE_NOOP("transcoin-core", "on startup"), QT_TRANSLATE_NOOP("transcoin-core", "wallet.dat corrupt, salvage failed"), };
[ "admin@transcoin.cc" ]
admin@transcoin.cc
288d64c5cf5cbf7a934932c409b40be5c8c853ff
b120d2bcfda25c930657a31ebb8690416391dd80
/cpp/tmp/Enemy.class.hpp
64078b048f9fc6c45630e1975b660c3407327d5a
[]
no_license
Fingalar/MyOwnProjects
881526ffc4fd3396ec46a2957c5862b49508b781
dd87d58d7cf6e200eaa63ee618909adddd1e1026
refs/heads/master
2020-05-30T20:16:48.901279
2018-07-29T20:13:12
2018-07-29T20:13:12
19,348,252
0
0
null
null
null
null
UTF-8
C++
false
false
1,417
hpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Enemy.class.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: tmertz <tmertz@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/01/11 02:48:55 by tmertz #+# #+# */ /* Updated: 2015/04/12 02:00:23 by tmertz ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef ENEMY_HPP # define ENEMY_HPP #include "A_GameEntity.class.hpp" # define CYLON 0 # define CRUISER 1 # define TAU 2 # define ELDARI 3 # define TETRIS 4 class Enemy : public AGameEntity { private : int _direction; int _id; int _shape; public : Enemy(); Enemy(int x, int y, int direction, int id, int shape); Enemy(Enemy & src); ~Enemy(); Enemy & operator=(Enemy & rhs); int getDirection() const; void setId(int nbr); int getId(); int getShape(); }; #endif
[ "tmertz@e3r10p18.42.fr" ]
tmertz@e3r10p18.42.fr
42e4af95080075c0f57bb5f1e4c77b587f3ab522
ccbc8c175866c2687698e232557d91239cecc0f3
/03-默认参数/03-默认参数/main.cpp
072abd8beb15162307922f6519aea6664492054d
[]
no_license
tank-developer/CPP_learn
6c18c279edeeb741dc1d280fbf2286c436ca7f1d
76fb1593a7c2b6c0959bba01de84e2f1df0d9380
refs/heads/master
2023-09-04T05:52:38.158760
2021-09-27T15:02:26
2021-09-27T15:02:26
null
0
0
null
null
null
null
UTF-8
C++
false
false
728
cpp
#include <iostream> using namespace std; //int age = 20; // //int sum(int v1, int v2 = 20) { // return v1 + v2; //} //void test(int a) { // cout << "test(int) - " << a << endl; //} // //void func(int v1, void(*p)(int) = test) { // p(v1); //} int sum(int v1 = 3, int v2 = 4) { return v1 + v2; } int main() { sum(1, 4); sum(2, 4); sum(3, 4); /*sum(1); sum(2); sum(3); sum(4); sum(5); sum(6, 15); sum(7);*/ /*func(30); func(20, test);*/ /*void(*p)(int) = test; p(10);*/ //cout << sum() << endl; // 11 //cout << sum(10) << endl; // 16 //cout << sum(10, 20) << endl; // 30 getchar(); return 0; } //int sum(int v1, int v2) { // return v1 + v2; //}
[ "1051136697@qq.com" ]
1051136697@qq.com
6a31495d1f262c2d4b8650c7cdaef13a2f4113cf
bb45457a262f50af34d76d7e9558a8ced9f5d423
/0.0019/lagrangian/sprayCloud/Cp
8794f1ef5631514df7e74b608de7a7f571a16970
[]
no_license
KrystianPi/SKPS_improved
581ce6a46fbc6830c0922e6b74dfe6a851fbd3c8
06d445eb1302bfcc1b09a94d7cdd7eace7e3bde8
refs/heads/main
2023-06-04T00:55:48.629789
2021-06-12T09:37:37
2021-06-12T09:37:37
null
0
0
null
null
null
null
ISO-8859-6
C++
false
false
1,685
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format binary; class scalarField; arch "LSB;label=32;scalar=64"; location "0.0019/lagrangian/sprayCloud"; object Cp; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 69 (5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@5ط:^رك@) // ************************************************************************* //
[ "krystek.pietrzak@gmail.com" ]
krystek.pietrzak@gmail.com
6f3686ab7e8e46b65ccc4a87de35462e7806646a
c108dcae9b586530e0afcb6b0cd86d690babe94a
/Serial/SerialEventSample.cpp
444548feff4b93dd737c2cdd025a5d27860b68af
[]
no_license
killtodo/arduino_sample_codes
0f136fc13b75a1585bd334297b23da34548f6519
fda10b4e970eb0a10a6f8be4a55f054d4211a599
refs/heads/master
2021-01-22T03:40:34.149393
2017-03-08T14:46:58
2017-03-08T14:46:58
81,450,866
0
0
null
null
null
null
UTF-8
C++
false
false
439
cpp
/* * SerialEventSample.cpp * * Created by bribin on Mar 1, 2017. */ //Called when data is available. //Use Serial.read() to capture this data. //NB : Currently, serialEvent() is not compatible with the Esplora, Leonardo, or Micro // //void serialEvent(){ ////statements //} // //Arduino Mega only: // //void serialEvent1(){ ////statements //} // //void serialEvent2(){ ////statements //} // //void serialEvent3(){ ////statements //}
[ "bribin@163.com" ]
bribin@163.com
46d210685c9cab0fc680f61889e35476c8396de9
0196a13e88e223713e43cd660fc31638e1a89fb6
/src/split.cpp
d6250e86056402b455b38895a624290654057eb3
[]
no_license
Kat-Jump/bigreadr
49fb59c8cd5bbf941928cd09ed362bd1eb0bacb0
9d4a4cbde6ebb6b8fa5d8321143b89fca9a657dd
refs/heads/master
2020-07-12T14:13:37.594285
2019-07-11T05:33:48
2019-07-11T05:33:48
204,838,325
1
0
null
null
null
null
UTF-8
C++
false
false
1,962
cpp
/******************************************************************************/ #include <Rcpp.h> using namespace Rcpp; #define BUFLEN (64 * 1024) /******************************************************************************/ // [[Rcpp::export]] List split_every_nlines(std::string name_in, std::string prefix_out, int every_nlines) { FILE *fp_in = fopen(name_in.c_str(), "rb"), *fp_out; setvbuf(fp_in, NULL, _IOLBF, BUFLEN); const char *fn_out = prefix_out.c_str(); char *name_out = new char[strlen(fn_out) + 20]; size_t line_size; size_t size = 100; size_t last = size - 2; char *line = new char[size]; bool not_eol, not_eof = true; int i, k = 0, c = 0; while (not_eof) { // Open file number 'k' sprintf(name_out, "%s_%d.txt", fn_out, ++k); fp_out = fopen(name_out, "wb"); setvbuf(fp_out, NULL, _IOFBF, BUFLEN); // Fill it with 'every_nlines' lines i = 0; while (i < every_nlines) { if (fgets(line, size, fp_in) == NULL) { not_eof = false; break; } line_size = strlen(line); fputs(line, fp_out); if (line_size > last) { not_eol = (line[last] != '\n'); fflush(fp_out); size *= 2; delete[] line; line = new char[size]; last = size - 2; if (not_eol) continue; } // End of line i++; } c += i; // Close file number 'k' fflush(fp_out); fclose(fp_out); if (i == 0) { // nothing has been written because of EOF -> rm file remove(name_out); k--; } } fclose(fp_in); delete[] name_out; delete[] line; return List::create( _["name_in"] = name_in, _["prefix_out"] = prefix_out, _["nfiles"] = k, _["nlines_part"] = every_nlines, _["nlines_all"] = c ); } /******************************************************************************/
[ "privef@timc-bcm-30.imag.fr" ]
privef@timc-bcm-30.imag.fr
7d474014bcd9bae326a625620bb5179fff221ff2
04a83a86bc4cda44722907bac26a7c8a57703197
/src/qt/transactiondesc.cpp
5135ef0b3fffaa7c36e835c9d11eae76797c93a9
[ "MIT", "BSD-3-Clause" ]
permissive
ywzqhl/sapcoin
04f946f7907c9395c55efaf7e868ab373ec4da93
0cd944fd97a4fd94ac428548369630f15dfd579c
refs/heads/master
2021-01-12T05:45:15.315724
2016-05-27T08:57:28
2016-05-27T08:57:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
11,455
cpp
#include "transactiondesc.h" #include "guiutil.h" #include "bitcoinunits.h" #include "main.h" #include "wallet.h" #include "db.h" #include "ui_interface.h" #include "base58.h" #include <string> QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx) { if (!wtx.IsFinal()) { if (wtx.nLockTime < LOCKTIME_THRESHOLD) return tr("Open for %n more block(s)", "", wtx.nLockTime - nBestHeight + 1); else return tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx.nLockTime)); } else { int nDepth = wtx.GetDepthInMainChain(); if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0) return tr("%1/offline").arg(nDepth); else if (nDepth < 6) return tr("%1/unconfirmed").arg(nDepth); else return tr("%1 confirmations").arg(nDepth); } } QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx) { QString strHTML; { LOCK(wallet->cs_wallet); strHTML.reserve(4000); strHTML += "<html><font face='verdana, arial, helvetica, sans-serif'>"; int64 nTime = wtx.GetTxTime(); int64 nCredit = wtx.GetCredit(); int64 nDebit = wtx.GetDebit(); int64 nNet = nCredit - nDebit; strHTML += "<b>" + tr("Status") + ":</b> " + FormatTxStatus(wtx); int nRequests = wtx.GetRequestCount(); if (nRequests != -1) { if (nRequests == 0) strHTML += tr(", has not been successfully broadcast yet"); else if (nRequests > 0) strHTML += tr(", broadcast through %n node(s)", "", nRequests); } strHTML += "<br>"; strHTML += "<b>" + tr("Date") + ":</b> " + (nTime ? GUIUtil::dateTimeStr(nTime) : "") + "<br>"; // // From // if (wtx.IsCoinBase()) { strHTML += "<b>" + tr("Source") + ":</b> " + tr("Generated") + "<br>"; } else if (wtx.mapValue.count("from") && !wtx.mapValue["from"].empty()) { // Online transaction strHTML += "<b>" + tr("From") + ":</b> " + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "<br>"; } else { // Offline transaction if (nNet > 0) { // Credit BOOST_FOREACH(const CTxOut& txout, wtx.vout) { if (wallet->IsMine(txout)) { CTxDestination address; if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address)) { if (wallet->mapAddressBook.count(address)) { strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>"; strHTML += "<b>" + tr("To") + ":</b> "; strHTML += GUIUtil::HtmlEscape(CBitcoinAddress(address).ToString()); if (!wallet->mapAddressBook[address].empty()) strHTML += " (" + tr("own address") + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address]) + ")"; else strHTML += " (" + tr("own address") + ")"; strHTML += "<br>"; } } break; } } } } // // To // if (wtx.mapValue.count("to") && !wtx.mapValue["to"].empty()) { // Online transaction std::string strAddress = wtx.mapValue["to"]; strHTML += "<b>" + tr("To") + ":</b> "; CTxDestination dest = CBitcoinAddress(strAddress).Get(); if (wallet->mapAddressBook.count(dest) && !wallet->mapAddressBook[dest].empty()) strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[dest]) + " "; strHTML += GUIUtil::HtmlEscape(strAddress) + "<br>"; } // // Amount // if (wtx.IsCoinBase() && nCredit == 0) { // // Coinbase // int64 nUnmatured = 0; BOOST_FOREACH(const CTxOut& txout, wtx.vout) nUnmatured += wallet->GetCredit(txout); strHTML += "<b>" + tr("Credit") + ":</b> "; if (wtx.IsInMainChain()) strHTML += BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, nUnmatured)+ " (" + tr("matures in %n more block(s)", "", wtx.GetBlocksToMaturity()) + ")"; else strHTML += "(" + tr("not accepted") + ")"; strHTML += "<br>"; } else if (nNet > 0) { // // Credit // strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, nNet) + "<br>"; } else { bool fAllFromMe = true; BOOST_FOREACH(const CTxIn& txin, wtx.vin) fAllFromMe = fAllFromMe && wallet->IsMine(txin); bool fAllToMe = true; BOOST_FOREACH(const CTxOut& txout, wtx.vout) fAllToMe = fAllToMe && wallet->IsMine(txout); if (fAllFromMe) { // // Debit // BOOST_FOREACH(const CTxOut& txout, wtx.vout) { if (wallet->IsMine(txout)) continue; if (!wtx.mapValue.count("to") || wtx.mapValue["to"].empty()) { // Offline transaction CTxDestination address; if (ExtractDestination(txout.scriptPubKey, address)) { strHTML += "<b>" + tr("To") + ":</b> "; if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].empty()) strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address]) + " "; strHTML += GUIUtil::HtmlEscape(CBitcoinAddress(address).ToString()); strHTML += "<br>"; } } strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, -txout.nValue) + "<br>"; } if (fAllToMe) { // Payment to self int64 nChange = wtx.GetChange(); int64 nValue = nCredit - nChange; strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, -nValue) + "<br>"; strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, nValue) + "<br>"; } int64 nTxFee = nDebit - wtx.GetValueOut(); if (nTxFee > 0) strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, -nTxFee) + "<br>"; } else { // // Mixed debit transaction // BOOST_FOREACH(const CTxIn& txin, wtx.vin) if (wallet->IsMine(txin)) strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, -wallet->GetDebit(txin)) + "<br>"; BOOST_FOREACH(const CTxOut& txout, wtx.vout) if (wallet->IsMine(txout)) strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, wallet->GetCredit(txout)) + "<br>"; } } strHTML += "<b>" + tr("Net amount") + ":</b> " + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, nNet, true) + "<br>"; // // Message // if (wtx.mapValue.count("message") && !wtx.mapValue["message"].empty()) strHTML += "<br><b>" + tr("Message") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["message"], true) + "<br>"; if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty()) strHTML += "<br><b>" + tr("Comment") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>"; strHTML += "<b>" + tr("Transaction ID") + ":</b> " + wtx.GetHash().ToString().c_str() + "<br>"; if (wtx.IsCoinBase()) strHTML += "<br>" + tr("Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to \"not accepted\" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.") + "<br>"; // // Debug view // if (fDebug) { strHTML += "<hr><br>" + tr("Debug information") + "<br><br>"; BOOST_FOREACH(const CTxIn& txin, wtx.vin) if(wallet->IsMine(txin)) strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, -wallet->GetDebit(txin)) + "<br>"; BOOST_FOREACH(const CTxOut& txout, wtx.vout) if(wallet->IsMine(txout)) strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, wallet->GetCredit(txout)) + "<br>"; strHTML += "<br><b>" + tr("Transaction") + ":</b><br>"; strHTML += GUIUtil::HtmlEscape(wtx.ToString(), true); strHTML += "<br><b>" + tr("Inputs") + ":</b>"; strHTML += "<ul>"; { LOCK(wallet->cs_wallet); BOOST_FOREACH(const CTxIn& txin, wtx.vin) { COutPoint prevout = txin.prevout; CCoins prev; if(pcoinsTip->GetCoins(prevout.hash, prev)) { if (prevout.n < prev.vout.size()) { strHTML += "<li>"; const CTxOut &vout = prev.vout[prevout.n]; CTxDestination address; if (ExtractDestination(vout.scriptPubKey, address)) { if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].empty()) strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address]) + " "; strHTML += QString::fromStdString(CBitcoinAddress(address).ToString()); } strHTML = strHTML + " " + tr("Amount") + "=" + BitcoinUnits::formatWithUnit(BitcoinUnits::SAP, vout.nValue); strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) ? tr("true") : tr("false")) + "</li>"; } } } } strHTML += "</ul>"; } strHTML += "</font></html>"; } return strHTML; }
[ "viraj.santapaz@gmail.com" ]
viraj.santapaz@gmail.com
7b9509fcde5c562d352e6eb2d115395b663e6531
c7f14ba53098a55e94780678c0ba815cf7954930
/homework 2/mazestack.cpp
34d73f569f9ef1355de585ebb2884e9f88d09a20
[]
no_license
TheodoreNguyen/CS32
0a07f29bba944a76e3f8b6b1e1d530ccdd900dc0
9b95a20f8572e439f8d4d97c1d06acdc1c8ffb63
refs/heads/master
2021-01-12T12:35:47.460095
2015-11-06T04:55:03
2015-11-06T04:55:03
31,944,858
0
0
null
null
null
null
UTF-8
C++
false
false
2,233
cpp
//Theodore Nguyen 704-156-701 W2015 CS32 homework 2 #include <iostream> #include <string> #include <stack> using namespace std; class Coord { public: Coord(int rr, int cc) : m_r(rr), m_c(cc) {} int r() const { return m_r; } int c() const { return m_c; } private: int m_r; int m_c; }; bool pathExists(string maze[], int nRows, int nCols, int sr, int sc, int er, int ec) { stack<Coord> coordStack; coordStack.push(Coord(sr,sc)); maze[sr][sc] = 'D'; do { Coord current = coordStack.top(); // cout << "Current position is (" << current.r() << "," << current.c() << ")." << endl; //for (int i = 0; i != nRows; i++) // { // cout << maze[i] << endl; // } // cout << "------------------------------------------------------" << endl; coordStack.pop(); if(current.r() == er && current.c() == ec) return true; else { if(maze[current.r() - 1][current.c()] != 'X' && maze[current.r() - 1][current.c()] != 'D') { coordStack.push(Coord(current.r() -1,current.c())); maze[current.r()-1][ current.c()] = 'D'; } if(maze[current.r()][current.c()+1] != 'X' && maze[current.r()][current.c()+1] != 'D') { coordStack.push(Coord(current.r(), current.c() +1)); maze[current.r()][current.c()+1] = 'D'; } if(maze[current.r() + 1][current.c()] != 'X' && maze[current.r() + 1][current.c()] != 'D') { coordStack.push(Coord(current.r()+1, current.c())); maze[current.r()+1][current.c()] = 'D'; } if(maze[current.r()][current.c()-1] != 'X' && maze[current.r()][current.c()-1] != 'D') { coordStack.push(Coord(current.r(), current.c()-1)); maze[current.r()][current.c()-1] = 'D'; } } }while(!coordStack.empty()); return false; } /* int main() { string maze[10] = { "XXXXXXXXXX", "X........X", "XX.X.XXXXX", "X..X.X...X", "X..X...X.X", "XXXX.XXX.X", "X.X....XXX", "X..XX.XX.X", "X...X....X", "XXXXXXXXXX" }; if (pathExists(maze, 10,10, 6,4, 1,1)) cout << "Solvable!" << endl; else cout << "Out of luck!" << endl; }*/
[ "theodore.h.nguyen@outlook.com" ]
theodore.h.nguyen@outlook.com
13620069bb8efcc73910a2819a017104655e72ab
ed22390bb473ebe316f66a0f74ff29e6a3a0abe5
/CG/settings.h
0be88075c5c18428eb19743f98c9e19446180ee0
[]
no_license
defisis/someOpenGL1
ad9d30e68db83de1655845b10de9df6e3f6a1d50
e921ee1759fcda41db156f4acc725df8086f4aa1
refs/heads/master
2022-11-20T02:09:28.802177
2020-07-10T08:55:19
2020-07-10T08:55:19
278,572,400
0
0
null
null
null
null
UTF-8
C++
false
false
361
h
#pragma once #include <stdlib.h> #include "glut.h" namespace settings { GLint width = 1200; GLint height = 600; GLubyte ColorR = 0, ColorG = 0, ColorB = 0; int selectedObject = 0; bool isRandomColor = true; bool isDisplayGrid = false; bool isTextureEnable = false; bool isLogicEnable = false; int logicOp = 0; int rastrMode = 0; int cellSize = 12; }
[ "koptev.artyom@gmail.com" ]
koptev.artyom@gmail.com
66b4f89ee1469869e2e395fa940ae987fe2b58cf
d77471349c1fa1989875a3d914c8f6395fc0c77b
/Source/Room3D/3D/TexturePool.h
b8d61c27a478b4ea453d81b65332c5aebe857dee
[]
no_license
wagdev1919/PickMe3D
0f6065ab0dd87dd3f31603abca05dd3276b16aa7
199e0b53334aa607249fc542525971be983614fd
refs/heads/master
2022-02-21T13:16:38.958754
2019-09-24T11:40:32
2019-09-24T11:40:32
210,482,030
1
0
null
null
null
null
UTF-8
C++
false
false
783
h
#ifndef _TexturePool_H #define _TexturePool_H #include <windows.h> #include <algorithm> #include <vector> #include <string.h> #include <gl/gl.h> #include <gl/glu.h> struct TextureInfo { char * name; unsigned int id; unsigned int width; unsigned int height; int bpp; unsigned char* pData; }; class CTexturePool { public: CTexturePool(); ~CTexturePool(); long Load(char *filename); bool SetTex(long id); long GetId(const char *name); void ConvertARGBtoRGBA(unsigned char* pData, unsigned int nWidth, unsigned int nHeight, unsigned int nBpp); void FllipVerticale(unsigned char* pData, unsigned int nWidth, unsigned int nHeight, unsigned int nBpp); private: std::vector<TextureInfo> m_vecTexInf; }; #endif // _TexturePool_H
[ "wagdev1919@gmail.com" ]
wagdev1919@gmail.com
33e7baeae22269fec9a2d95a827929c1f8af3569
447b44e7a6304e09e870f7ad9b6c574d905fd706
/engine/view/main_view.cpp
ebd7a5b05cfe44482ea512e3c7438557a82fd1a6
[]
no_license
VDraks/Spacewar_cpp
fe3d838280d37d35beb8713ebf32965db2a077e5
254c898c68d165a83a275b4b7f48b9b2e4f12fd1
refs/heads/master
2023-02-04T11:58:11.360237
2020-12-23T14:30:21
2020-12-23T14:30:21
322,544,899
0
0
null
null
null
null
UTF-8
C++
false
false
3,303
cpp
#include "main_view.h" #include <SDL.h> #include <SDL_ttf.h> #include <iostream> #include "model/components/transform.h" #include "model/components/shape.h" #include "model/world.h" #include "view/visualiser_context.h" namespace view { using namespace model::component; void drawShape(const Shape& shape, SDL_Renderer* renderer, const Transform& transform) { const SDL_Color& color = shape.color; SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, color.a); const auto drawLine = [renderer, &transform](const math::Vec2& start, const math::Vec2& end) { const auto newStart = transform.applyToPoint(start); const auto newEnd = transform.applyToPoint(end); SDL_RenderDrawLineF(renderer, newStart.x, newStart.y, newEnd.x, newEnd.y); }; for (std::size_t i = 0; i < shape.points.size() - 1; ++i) { drawLine(shape.points[i], shape.points[i + 1]); } drawLine(shape.points.back(), shape.points[0]); SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); } struct MainView::Impl { const model::World& world; SDL_Window* win = nullptr; SDL_Renderer* rend = nullptr; TTF_Font* font = nullptr; std::unique_ptr<VisualiserContext> context; std::vector<std::unique_ptr<IVisualiser>> visualisers; explicit Impl(const model::World& world) : world(world) { initSdl(); context = std::make_unique<VisualiserContext>(rend, font); } ~Impl() { SDL_DestroyRenderer(rend); SDL_DestroyWindow(win); TTF_CloseFont(font); } void initSdl() { if (SDL_Init(SDL_INIT_EVERYTHING) != 0) { std::cout << "error initializing SDL: " << SDL_GetError() << std::endl; exit(1); } if (TTF_Init() == -1) { std::cout << "TTF_Init: " << TTF_GetError() << std::endl; exit(2); } font = TTF_OpenFont("OpenSans-Regular.ttf", 30); if (font == nullptr) { std::cout << "TTF_OpenFont" << std::endl; exit(3); } win = SDL_CreateWindow("Spacewar", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, static_cast<int>(world.worldSize().x), static_cast<int>(world.worldSize().y), 0); Uint32 render_flags = SDL_RENDERER_ACCELERATED; rend = SDL_CreateRenderer(win, -1, render_flags); SDL_SetHint( SDL_HINT_RENDER_SCALE_QUALITY, "2" ); } }; MainView::MainView(const model::World& world) : _d(std::make_unique<Impl>(world)) { } MainView::~MainView() = default; void MainView::render() { SDL_SetRenderDrawColor(_d->rend, 0, 0, 0, 255); SDL_RenderClear(_d->rend); const auto& shapes = _d->world.entityManager().getEntitySet<model::component::Transform, model::component::Shape>(); for (const auto& [entity, components] : shapes) { const auto& [transform, shape] = components; drawShape(shape, _d->rend, transform); } for (const auto& visualiser : _d->visualisers) { visualiser->render(_d->context.get()); } SDL_RenderPresent(_d->rend); } void MainView::addVisualiser(std::unique_ptr<IVisualiser>&& visualiser) { _d->visualisers.push_back(std::move(visualiser)); } } // namespace view
[ "kytinvasya@gmail.com" ]
kytinvasya@gmail.com
7712d74351d8a2f4ce9504517fb3b8a9935d9159
bd51b8626ee07a692964a511228a6cfce694cfbd
/mockmon/include/mockmon_conditions/paralysis_condition_pulse.h
4dce29c571c34f4aa826ecefb99764a713c0f9b8
[]
no_license
BenjaminShinar/FlexingMyCode
937de5e0f71d9c3e79f88e27b4cb35fa71f990a2
d873bd2b0e92ed76c234c2ce7766a6ab400a330e
refs/heads/main
2023-06-11T06:09:34.240872
2021-07-06T14:24:29
2021-07-06T14:24:29
324,566,900
0
0
null
null
null
null
UTF-8
C++
false
false
767
h
#pragma once #include "base_condition_mockmon_effecting.h" #include "../random_gen.h" #include <numeric> namespace mockmon::condition { class ParalysisCondition : public MockmonEffectingCondition { public: explicit ParalysisCondition(Mockmon & paralyzedMockmon): MockmonEffectingCondition{PulsingConditionId::Paralysis,paralyzedMockmon},m_full_paralysis_chance(25) { } void PulseBeforeTurn() override { if(random::Randomer::CheckPercentage(m_full_paralysis_chance)) { r_effected_mockmon.m_currentCondtion.StoreChargedMove(moves::MoveId::ParalysisCantMove); } } private: const unsigned int m_full_paralysis_chance; }; }
[ "benjaminShinar@gmail.com" ]
benjaminShinar@gmail.com
20d89137af119c960e559db627747216f0403e7e
6736c015a5b43c895ffd20029b86b687dc1ce1d0
/src/qt/utilitydialog.cpp
b871142cdbef722121bb0ddcc06b84ba7212ffea
[ "MIT" ]
permissive
MixAir/MIACore
611c31b37f726d4234f70be2eaebae4652ee4542
99311b712d1c99e1b9559702015a915dc9738d4f
refs/heads/master
2020-03-27T16:13:23.376832
2018-09-08T13:02:40
2018-09-08T13:02:40
146,767,183
1
1
MIT
2018-09-06T13:29:47
2018-08-30T15:06:43
C++
UTF-8
C++
false
false
10,331
cpp
// Copyright (c) 2011-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The MIA Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "utilitydialog.h" #include "ui_helpmessagedialog.h" #include "bitcoingui.h" #include "clientmodel.h" #include "guiconstants.h" #include "intro.h" #include "paymentrequestplus.h" #include "guiutil.h" #include "clientversion.h" #include "init.h" #include "util.h" #include <stdio.h> #include <QCloseEvent> #include <QLabel> #include <QRegExp> #include <QTextTable> #include <QTextCursor> #include <QVBoxLayout> /** "Help message" or "About" dialog box */ HelpMessageDialog::HelpMessageDialog(QWidget *parent, HelpMode helpMode) : QDialog(parent), ui(new Ui::HelpMessageDialog) { ui->setupUi(this); QString version = tr("MIA Core") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion()); /* On x86 add a bit specifier to the version so that users can distinguish between * 32 and 64 bit builds. On other architectures, 32/64 bit may be more ambigious. */ #if defined(__x86_64__) version += " " + tr("(%1-bit)").arg(64); #elif defined(__i386__ ) version += " " + tr("(%1-bit)").arg(32); #endif if (helpMode == about) { setWindowTitle(tr("About MIA Core")); /// HTML-format the license message from the core QString licenseInfo = QString::fromStdString(LicenseInfo()); QString licenseInfoHTML = licenseInfo; // Make URLs clickable QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2); uri.setMinimal(true); // use non-greedy matching licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>"); // Replace newlines with HTML breaks licenseInfoHTML.replace("\n\n", "<br><br>"); ui->aboutMessage->setTextFormat(Qt::RichText); ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); text = version + "\n" + licenseInfo; ui->aboutMessage->setText(version + "<br><br>" + licenseInfoHTML); ui->aboutMessage->setWordWrap(true); ui->helpMessage->setVisible(false); } else if (helpMode == cmdline) { setWindowTitle(tr("Command-line options")); QString header = tr("Usage:") + "\n" + " mia-qt [" + tr("command-line options") + "] " + "\n"; QTextCursor cursor(ui->helpMessage->document()); cursor.insertText(version); cursor.insertBlock(); cursor.insertText(header); cursor.insertBlock(); std::string strUsage = HelpMessage(HMM_BITCOIN_QT); const bool showDebug = GetBoolArg("-help-debug", false); strUsage += HelpMessageGroup(tr("UI Options:").toStdString()); if (showDebug) { strUsage += HelpMessageOpt("-allowselfsignedrootcertificates", strprintf("Allow self signed root certificates (default: %u)", DEFAULT_SELFSIGNED_ROOTCERTS)); } strUsage += HelpMessageOpt("-choosedatadir", strprintf(tr("Choose data directory on startup (default: %u)").toStdString(), DEFAULT_CHOOSE_DATADIR)); strUsage += HelpMessageOpt("-lang=<lang>", tr("Set language, for example \"de_DE\" (default: system locale)").toStdString()); strUsage += HelpMessageOpt("-min", tr("Start minimized").toStdString()); strUsage += HelpMessageOpt("-rootcertificates=<file>", tr("Set SSL root certificates for payment request (default: -system-)").toStdString()); strUsage += HelpMessageOpt("-splash", strprintf(tr("Show splash screen on startup (default: %u)").toStdString(), DEFAULT_SPLASHSCREEN)); strUsage += HelpMessageOpt("-resetguisettings", tr("Reset all settings changed in the GUI").toStdString()); if (showDebug) { strUsage += HelpMessageOpt("-uiplatform", strprintf("Select platform to customize UI for (one of windows, macosx, other; default: %s)", BitcoinGUI::DEFAULT_UIPLATFORM)); } QString coreOptions = QString::fromStdString(strUsage); text = version + "\n" + header + "\n" + coreOptions; QTextTableFormat tf; tf.setBorderStyle(QTextFrameFormat::BorderStyle_None); tf.setCellPadding(2); QVector<QTextLength> widths; widths << QTextLength(QTextLength::PercentageLength, 35); widths << QTextLength(QTextLength::PercentageLength, 65); tf.setColumnWidthConstraints(widths); QTextCharFormat bold; bold.setFontWeight(QFont::Bold); Q_FOREACH (const QString &line, coreOptions.split("\n")) { if (line.startsWith(" -")) { cursor.currentTable()->appendRows(1); cursor.movePosition(QTextCursor::PreviousCell); cursor.movePosition(QTextCursor::NextRow); cursor.insertText(line.trimmed()); cursor.movePosition(QTextCursor::NextCell); } else if (line.startsWith(" ")) { cursor.insertText(line.trimmed()+' '); } else if (line.size() > 0) { //Title of a group if (cursor.currentTable()) cursor.currentTable()->appendRows(1); cursor.movePosition(QTextCursor::Down); cursor.insertText(line.trimmed(), bold); cursor.insertTable(1, 2, tf); } } ui->helpMessage->moveCursor(QTextCursor::Start); ui->scrollArea->setVisible(false); ui->aboutLogo->setVisible(false); } else if (helpMode == pshelp) { setWindowTitle(tr("PrivateSend information")); ui->aboutMessage->setTextFormat(Qt::RichText); ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); ui->aboutMessage->setText(tr("\ <h3>PrivateSend Basics</h3> \ PrivateSend gives you true financial privacy by obscuring the origins of your funds. \ All the MIA in your wallet is comprised of different \"inputs\" which you can think of as separate, discrete coins.<br> \ PrivateSend uses an innovative process to mix your inputs with the inputs of two other mia, without having your coins ever leave your wallet. \ You retain control of your money at all times..<hr> \ <b>The PrivateSend process works like this:</b>\ <ol type=\"1\"> \ <li>PrivateSend begins by breaking your transaction inputs down into standard denominations. \ These denominations are 0.01 MIA, 0.1 MIA, 1 MIA and 10 MIA -- sort of like the paper money you use every day.</li> \ <li>Your wallet then sends requests to specially configured software nodes on the network, called \"masternodes.\" \ These masternodes are informed then that you are interested in mixing a certain denomination. \ No identifiable information is sent to the masternodes, so they never know \"who\" you are.</li> \ <li>When two other mia send similar messages, indicating that they wish to mix the same denomination, a mixing session begins. \ The masternode mixes up the inputs and instructs all three users' wallets to pay the now-transformed input back to themselves. \ Your wallet pays that denomination directly to itself, but in a different address (called a change address).</li> \ <li>In order to fully obscure your funds, your wallet must repeat this process a number of times with each denomination. \ Each time the process is completed, it's called a \"round.\" Each round of PrivateSend makes it exponentially more difficult to determine where your funds originated.</li> \ <li>This mixing process happens in the background without any intervention on your part. When you wish to make a transaction, \ your funds will already be anonymized. No additional waiting is required.</li> \ </ol> <hr>\ <b>IMPORTANT:</b> Your wallet only contains 1000 of these \"change addresses.\" Every time a mixing event happens, up to 9 of your addresses are used up. \ This means those 1000 addresses last for about 100 mixing events. When 900 of them are used, your wallet must create more addresses. \ It can only do this, however, if you have automatic backups enabled.<br> \ Consequently, users who have backups disabled will also have PrivateSend disabled. <hr>\ For more info see <a href=\"https://MixAir.atlassian.net/wiki/display/DOC/PrivateSend\">https://MixAir.atlassian.net/wiki/display/DOC/PrivateSend</a> \ ")); ui->aboutMessage->setWordWrap(true); ui->helpMessage->setVisible(false); ui->aboutLogo->setVisible(false); } // Theme dependent Gfx in About popup QString helpMessageGfx = ":/images/" + GUIUtil::getThemeName() + "/about"; QPixmap pixmap = QPixmap(helpMessageGfx); ui->aboutLogo->setPixmap(pixmap); } HelpMessageDialog::~HelpMessageDialog() { delete ui; } void HelpMessageDialog::printToConsole() { // On other operating systems, the expected action is to print the message to the console. fprintf(stdout, "%s\n", qPrintable(text)); } void HelpMessageDialog::showOrPrint() { #if defined(WIN32) // On Windows, show a message box, as there is no stderr/stdout in windowed applications exec(); #else // On other operating systems, print help text to console printToConsole(); #endif } void HelpMessageDialog::on_okButton_accepted() { close(); } /** "Shutdown" window */ ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f): QWidget(parent, f) { QVBoxLayout *layout = new QVBoxLayout(); layout->addWidget(new QLabel( tr("MIA Core is shutting down...") + "<br /><br />" + tr("Do not shut down the computer until this window disappears."))); setLayout(layout); } QWidget *ShutdownWindow::showShutdownWindow(BitcoinGUI *window) { if (!window) return nullptr; // Show a simple window indicating shutdown status QWidget *shutdownWindow = new ShutdownWindow(); shutdownWindow->setWindowTitle(window->windowTitle()); // Center shutdown window at where main window was const QPoint global = window->mapToGlobal(window->rect().center()); shutdownWindow->move(global.x() - shutdownWindow->width() / 2, global.y() - shutdownWindow->height() / 2); shutdownWindow->show(); return shutdownWindow; } void ShutdownWindow::closeEvent(QCloseEvent *event) { event->ignore(); }
[ "mixairdev@protonmail.com" ]
mixairdev@protonmail.com
ccc53b0661c6ab5e7e9bb5bdba1115b3c43418ee
97e53e8028ffb9d3f736a0999cc470f9942ddcd0
/10 打印与报表技术/01 基 础 打 印/003 打印对话框及其控件中的数据-例1/PrintForm/adodc.cpp
1517a18ca3f251f9ce6ead9785308e1e933ede1f
[]
no_license
BambooMa/VC_openSource
3da1612ca8285eaba9b136fdc2c2034c7b92f300
8c519e73ef90cdb2bad3de7ba75ec74115aab745
refs/heads/master
2021-05-14T15:22:10.563149
2017-09-11T07:59:18
2017-09-11T07:59:18
115,991,286
1
0
null
2018-01-02T08:12:01
2018-01-02T08:12:00
null
UTF-8
C++
false
false
7,968
cpp
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ // NOTE: Do not modify the contents of this file. If this class is regenerated by // Microsoft Visual C++, your modifications will be overwritten. #include "stdafx.h" #include "adodc.h" // Dispatch interfaces referenced by this interface #include "_Recordset.h" #include "Font.h" ///////////////////////////////////////////////////////////////////////////// // CAdodc IMPLEMENT_DYNCREATE(CAdodc, CWnd) ///////////////////////////////////////////////////////////////////////////// // CAdodc properties ///////////////////////////////////////////////////////////////////////////// // CAdodc operations CString CAdodc::GetConnectionString() { CString result; InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void CAdodc::SetConnectionString(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } CString CAdodc::GetUserName_() { CString result; InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void CAdodc::SetUserName(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x7, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } CString CAdodc::GetPassword() { CString result; InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void CAdodc::SetPassword(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x8, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } long CAdodc::GetMode() { long result; InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetMode(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0x9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } long CAdodc::GetCursorLocation() { long result; InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetCursorLocation(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0xa, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } long CAdodc::GetConnectionTimeout() { long result; InvokeHelper(0xc, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetConnectionTimeout(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0xc, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } long CAdodc::GetCommandTimeout() { long result; InvokeHelper(0xd, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetCommandTimeout(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0xd, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } CString CAdodc::GetRecordSource() { CString result; InvokeHelper(0xe, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void CAdodc::SetRecordSource(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0xe, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } long CAdodc::GetCursorType() { long result; InvokeHelper(0xf, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetCursorType(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0xf, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } long CAdodc::GetLockType() { long result; InvokeHelper(0x10, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetLockType(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0x10, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } long CAdodc::GetCommandType() { long result; InvokeHelper(0x11, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetCommandType(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0x11, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } long CAdodc::GetCacheSize() { long result; InvokeHelper(0x13, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetCacheSize(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0x13, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } long CAdodc::GetMaxRecords() { long result; InvokeHelper(0x14, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetMaxRecords(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0x14, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } long CAdodc::GetBOFAction() { long result; InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetBOFAction(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0x15, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } long CAdodc::GetEOFAction() { long result; InvokeHelper(0x16, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetEOFAction(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0x16, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } CString CAdodc::GetCaption() { CString result; InvokeHelper(DISPID_CAPTION, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void CAdodc::SetCaption(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(DISPID_CAPTION, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } long CAdodc::GetAppearance() { long result; InvokeHelper(DISPID_APPEARANCE, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetAppearance(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(DISPID_APPEARANCE, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } unsigned long CAdodc::GetBackColor() { unsigned long result; InvokeHelper(DISPID_BACKCOLOR, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetBackColor(unsigned long newValue) { static BYTE parms[] = VTS_I4; InvokeHelper(DISPID_BACKCOLOR, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue); } unsigned long CAdodc::GetForeColor() { unsigned long result; InvokeHelper(DISPID_FORECOLOR, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetForeColor(unsigned long newValue) { static BYTE parms[] = VTS_I4; InvokeHelper(DISPID_FORECOLOR, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, newValue); } long CAdodc::GetOrientation() { long result; InvokeHelper(0x17, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } void CAdodc::SetOrientation(long nNewValue) { static BYTE parms[] = VTS_I4; InvokeHelper(0x17, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, nNewValue); } C_Recordset CAdodc::GetRecordset() { LPDISPATCH pDispatch; InvokeHelper(0x18, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL); return C_Recordset(pDispatch); } void CAdodc::SetRefRecordset(LPDISPATCH newValue) { static BYTE parms[] = VTS_DISPATCH; InvokeHelper(0x18, DISPATCH_PROPERTYPUTREF, VT_EMPTY, NULL, parms, newValue); } COleFont CAdodc::GetFont() { LPDISPATCH pDispatch; InvokeHelper(DISPID_FONT, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&pDispatch, NULL); return COleFont(pDispatch); } void CAdodc::SetRefFont(LPDISPATCH newValue) { static BYTE parms[] = VTS_DISPATCH; InvokeHelper(DISPID_FONT, DISPATCH_PROPERTYPUTREF, VT_EMPTY, NULL, parms, newValue); } BOOL CAdodc::GetEnabled() { BOOL result; InvokeHelper(DISPID_ENABLED, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL); return result; } void CAdodc::SetEnabled(BOOL bNewValue) { static BYTE parms[] = VTS_BOOL; InvokeHelper(DISPID_ENABLED, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, bNewValue); } void CAdodc::Refresh() { InvokeHelper(0x19, DISPATCH_METHOD, VT_EMPTY, NULL, NULL); }
[ "xiaohuh421@qq.com" ]
xiaohuh421@qq.com
b777a008b0a6c580a7c77a99ac3603e751141c1e
684cd7096ff7428173ff524d4020bfe86f79eaf0
/inc/algo/AStarSorter.ipp
bdd76c2af2e5ea8ca6e7173343d82be60ed76d13
[ "Apache-2.0" ]
permissive
Aracthor/pathfindingplusplus
04978128c59bdae4c88d11da64c54deab8d4ef74
628516348906c808a866579a41bd2184fa140b8c
refs/heads/master
2016-09-01T11:35:02.041967
2016-03-29T01:28:06
2016-03-29T01:28:06
53,559,721
0
0
null
null
null
null
UTF-8
C++
false
false
112
ipp
namespace algo { void AStarSorter::setObjective(const Position* objective) { m_objective = objective; } }
[ "pourvivien@hotmail.fr" ]
pourvivien@hotmail.fr
8d5fa25a27a3fa35b2ea0e9cbf96f9f91ef58724
dbe63a279c38a526333078c1115a72cfb2361ad5
/BOJ/동적 계획법(DP)/12865_평범한 배낭.cpp
818d9bd455484f02ff2c1051607adf5d109abef8
[]
no_license
vividswan/Algorithm
a44be0e7f3825f4328253938625920cfc0292b36
5a71e7c2a217ef5d47f5dfa711559f9a83c6cf69
refs/heads/master
2023-09-01T07:56:25.193571
2023-07-30T11:18:15
2023-07-30T11:18:15
207,740,964
3
0
null
null
null
null
UTF-8
C++
false
false
600
cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; vector<pair<int,int>> adj; int dp[101][100001]; int n, k; int main(){ cin >> n >> k; adj.resize(n+1); for(int i=1;i<=n;i++){ int w,v; cin >> w >> v; adj[i]={w,v}; } for(int i=1;i<=n;i++){ for(int j=1;j<=k;j++){ dp[i][j]=dp[i-1][j]; if(j-adj[i].first>=0){ int value = dp[i-1][j-adj[i].first]+adj[i].second; dp[i][j]=max(dp[i][j],value); } } } cout << dp[n][k] << '\n'; return 0; }
[ "vividswan@naver.com" ]
vividswan@naver.com
80e3ab2a1fa6e626b54e0b88b6a220b06f798080
1ed1ed934e4175bb20024311a007d60ae784b046
/LIETKE3/LIETKE3.cpp
24f6e87bc51f829000836f795031a934933433c6
[]
no_license
kkkcoder/Code_in_thptchuyen.ntucoder.net
f568cddc01b641c9a6a3c033a4b48ca59bb6435e
c4c0e19ea56a6560014cbb6e4d7489fb16e8aad7
refs/heads/master
2023-07-16T16:15:39.421817
2021-08-29T15:56:35
2021-08-29T15:56:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,691
cpp
// LIETKE3 – LIỆT KÊ 3 // Một xâu X = x1x2 ... xm được gọi là xâu con của xâu Y = y1y2 ... yn nếu ta có thể nhận được xâu X từ // xâu Y bằng cách xoá đi một số kí tự, tức là tồn tại một dãy các chỉ số // 1 ≤ i1 < i2 < ⋯ < im ≤ n để x1 = yi1 // , x2 = yi2 // , ... , xm = yim // Ví dụ: X = ′adz′ là xâu con của xâu Y = ′baczdtz′ với i1 = 2 < i2 = 5 < i3 = 7 // Yêu cầu: Nhập vào một xâu S (độ dài không quá 15, chỉ gồm các kí tự ′a′ đến ′z′), hãy liệt kê tất cả các // xâu con khác nhau của S // Input: //  Một dòng duy nhất là xâu S // Output: //  In ra nhiều dòng, mỗi dòng là một xâu con của xâu S //  Các xâu được in ra theo thứ tự từ điển #include <bits/stdc++.h> #define ll long long #define fo(i, a, b) for (int i = a; i <= b; i++) #define nmax 1000005 #define fi first #define se second #define ii pair<int, int> const ll mod = 1e9 + 7; using namespace std; string s, a[nmax]; ll n, b[nmax + 5], k = 0; void in() { string x = ""; fo(i, 1, n) if (b[i] == 0) x += s[i]; a[++k] = x; } void np(int j) { fo(i, 0, 1) { b[j] = i; if (j == n) in(); else np(j + 1); } } int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifndef ONLINE_JUDGE freopen("lietke3.inp", "r", stdin); freopen("lietke3.out", "w", stdout); #endif // ONLINE_JUDGE cin >> s; n = s.size(); s = ' ' + s; np(0); sort(a + 1, a + k + 1); fo(i, 1, k) if (a[i].size() != 0) if (a[i] != a[i + 1]) cout << a[i] << "\n"; }
[ "lam3082004@gmail.com" ]
lam3082004@gmail.com
a33417fbf18865ebed3d4ef5167160160b7d3215
b0d155985e5a84f3499171997ef51722602c150a
/CodeForces/1084C.cpp
24b8da8b5ca4b8e52c7322559c45e70a4d5cfe38
[]
no_license
mickey-lab/Competitive-Programming
26ec16e3b1a05b52a0a79d45435bb2da11baed02
4dfd59ba0ec08108be555d72936fc56e4d07b522
refs/heads/master
2022-04-12T20:08:27.129243
2020-04-12T23:18:21
2020-04-12T23:18:21
280,275,044
1
0
null
2020-07-16T22:52:23
2020-07-16T22:52:22
null
UTF-8
C++
false
false
1,359
cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define mp make_pair #define pub push_back #define puf push_front #define pob pop_back #define pof pop_front #define ins insert #define f first #define s second #define lb lower_bound #define ub upper_bound #define sz(x) (size_t)x.size() #define all(x) begin(x), end(x) #define rsz resize const ll INF = 1e18; const ld PI = 4*atan((ld)1); const int MOD = 1e9 + 7; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define ook order_of_key #define fbo find_by_order vector<ll> as; int main(){ //CF cin.sync_with_stdio(false); cin.tie(NULL); string str; cin >> str; for(int i = 0; i < sz(str); ++i){ if(str[i] == 'a'){ ll tmp = 1; while(i < sz(str) && str[++i] != 'b') if(str[i] == 'a') ++tmp; as.pub(tmp); } } ll ans = 0; for(auto a : as){ ans += (a + a * ans); ans %= MOD; } cout << ans << endl; } /* Keep It Simple, Stupid! Caution: - integer overflow (check num constraints) - segfault (check array / other ds bounds) - special / edge cases Stay organized and think before you type. */
[ "williamhyzhang@gmail.com" ]
williamhyzhang@gmail.com
0585fb7c4992edf5c2f900a1885740a13a696614
19fc869f00e8ab70d596166494f825d4ad8801dd
/SilentG.h
abd370d0ef94694d383368c39a40edae4e6b5104
[]
no_license
zincpete/SilentG
752527f3aaed0412a64ff6f7d5b631225a886db7
61f61a58f1a5b927d6a10d7ce5d3834a355e37b0
refs/heads/master
2021-06-29T23:09:58.280683
2017-09-17T20:44:11
2017-09-17T20:44:11
103,816,457
2
0
null
null
null
null
UTF-8
C++
false
false
3,169
h
#ifndef _SILENT_G_H__INCLUDED_ #define _SILENT_G_H__INCLUDED_ #include <stdint.h> #include <bitset> #include <atomic> #include <array> // Developed and Tested for Silent Gliss AutoGlide 5100 B electric curtains. // // 433 MHz remote control protocol // // Sync bit followed by 64 data bits // Sync bit : 5200uS on, 600uS off // Data bits 0 = 600uS on, 200uS off // Data bits 1 = 200uS on, 600uS off // // | Sync | Data 1 | Data 1 | Data 0 | Data 0 | // | | | | | | // | _______________________ | __ | __ | ______ | __ | ___ ... // / \ / \ / \ / \ / \ / // / \______/ \______/ \______/ \__/ \______/ // //----------------------------------------------------------------------------- class AtomicBuffers { public: struct Buffer { std::bitset<128> m_Bits; size_t m_Size = 0; void Push(bool one) { if (m_Size < m_Bits.size()) { m_Bits.set(m_Size, one); ++m_Size; } } }; public: AtomicBuffers(); const Buffer * const StartReadBuffer(); void EndReadBuffer(const Buffer * const buffer); Buffer * GetWriteBuffer(); void EndWriteBuffer(Buffer * buffer); uint16_t GetReadWrite() const { return m_ReadWriteIndex.load(); } private: uint8_t Next(uint8_t i) const { return (i + 1) % m_Buffers.size(); } using Buffers = std::array<Buffer, 8>; Buffers m_Buffers; std::atomic<uint16_t> m_ReadWriteIndex; }; //----------------------------------------------------------------------------- class RadioInterface { public: RadioInterface(); void EnableTransmit(int nTransmitterPin); void DisableTransmit(); void TransmitCode(uint64_t code, uint8_t repeats); void EnableReceive(int interrupt); void EnableReceive(); void DisableReceive(); AtomicBuffers & GetReceiveBuffer() { return m_Buffer; } uint32_t GetLastDiff() const { return m_LastDiff; } struct HighLow { uint32_t high; uint32_t low; }; struct Protocol { HighLow sync; HighLow zero; HighLow one; }; struct State { enum Enum { WaitingForSync, WaitingForHigh, WaitingForLowSync, WaitingForLowZero, WaitingForLowOne, EnumCount, }; }; State::Enum GetState() const { return m_State; } private: void SendWord(uint32_t word); void Transmit(HighLow pulses); static void ReceiveInterruptHandler(); private: static RadioInterface * s_Instance; AtomicBuffers m_Buffer; Protocol m_Protocol; Protocol m_MinProtocol; Protocol m_MaxProtocol; volatile State::Enum m_State; int m_ReceiverInterrupt; int m_TransmitterPin; volatile uint32_t m_LastDiff; }; //----------------------------------------------------------------------------- #endif
[ "32031906+zincpete@users.noreply.github.com" ]
32031906+zincpete@users.noreply.github.com
52eb934142b0d9d2f06aac04ec30b5fb08d93e52
93bb53787cb3e9fb32371bb0fdc4e9227edce60e
/c++/perle/main.cpp
969fdd9a24bf34041c600c93f193b9dbb69640ae
[]
no_license
lupvasile/contest-problems
b969f6e591d1b3feaebf5675b999642b1f2ade32
a484632c23d8b62b98d550446f697675b50e9dc6
refs/heads/master
2021-07-03T22:19:41.142998
2017-09-27T21:00:02
2017-09-27T21:00:02
105,061,972
1
0
null
null
null
null
UTF-8
C++
false
false
893
cpp
#include <iostream> #include <fstream> using namespace std; #define cout g #define foor(i,a,b) for(i=a;i<=b;i++) ifstream f("perle.in"); ofstream g("perle.out"); int n,l,v[10000]; void citeste_sir() { int i; foor(i,0,l-1) f>>v[i]; } int perlaB(int x); int perlaC(int x); int main() { f>>n; for(; n; n--) { f>>l; if(l==1) citeste_sir(),cout<<"1\n"; else { citeste_sir(); if (perlaB(0)==l || perlaC(0)==l) cout<<"1\n"; else cout<<"0\n"; } } return 0; } int perlaB(int x) { if(x<l) if(v[x]==2) return perlaB(x+1); else if (v[x]==1 && v[x+2]==3) return perlaC(x+4); return 0; } int perlaC(int x) { if(x<l) if (v[x]==2) return x+1; else if (v[x]==1 && v[x+1]==2) return x+3; else if(v[x]==3) return perlaC(perlaB(x+1)); return 0; }
[ "vasile_lup2006@yahoo.com" ]
vasile_lup2006@yahoo.com
96956783a6a62df72829aff1118fa601c6f7d80c
20bd5707d96d02e8076080d2aa4a2645d8bf7078
/src/qt/notificator.h
1f780148da421fc076ebcf0ae8d6b6fd40209639
[ "MIT" ]
permissive
asaun/asacoin
0a8001fcf4bca6ac4cb127e143dc1907bd8eb7dd
d9efcbf6c46c95f832c48f88155a0b665b779bf1
refs/heads/master
2020-03-24T21:20:42.717461
2018-07-31T14:42:38
2018-07-31T14:42:38
143,026,911
0
0
null
null
null
null
UTF-8
C++
false
false
2,875
h
// Copyright (c) 2011-2013 The Asacoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef ASACOIN_QT_NOTIFICATOR_H #define ASACOIN_QT_NOTIFICATOR_H #if defined(HAVE_CONFIG_H) #include "config/asacoin-config.h" #endif #include <QIcon> #include <QObject> QT_BEGIN_NAMESPACE class QSystemTrayIcon; #ifdef USE_DBUS class QDBusInterface; #endif QT_END_NAMESPACE /** Cross-platform desktop notification client. */ class Notificator: public QObject { Q_OBJECT public: /** Create a new notificator. @note Ownership of trayIcon is not transferred to this object. */ Notificator(const QString &programName, QSystemTrayIcon *trayIcon, QWidget *parent); ~Notificator(); // Message class enum Class { Information, /**< Informational message */ Warning, /**< Notify user of potential problem */ Critical /**< An error occurred */ }; public slots: /** Show notification message. @param[in] cls general message class @param[in] title title shown with message @param[in] text message content @param[in] icon optional icon to show with message @param[in] millisTimeout notification timeout in milliseconds (defaults to 10 seconds) @note Platform implementations are free to ignore any of the provided fields except for \a text. */ void notify(Class cls, const QString &title, const QString &text, const QIcon &icon = QIcon(), int millisTimeout = 10000); private: QWidget *parent; enum Mode { None, /**< Ignore informational notifications, and show a modal pop-up dialog for Critical notifications. */ Freedesktop, /**< Use DBus org.freedesktop.Notifications */ QSystemTray, /**< Use QSystemTray::showMessage */ Growl12, /**< Use the Growl 1.2 notification system (Mac only) */ Growl13, /**< Use the Growl 1.3 notification system (Mac only) */ UserNotificationCenter /**< Use the 10.8+ User Notification Center (Mac only) */ }; QString programName; Mode mode; QSystemTrayIcon *trayIcon; #ifdef USE_DBUS QDBusInterface *interface; void notifyDBus(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout); #endif void notifySystray(Class cls, const QString &title, const QString &text, const QIcon &icon, int millisTimeout); #ifdef Q_OS_MAC void notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon); void notifyMacUserNotificationCenter(Class cls, const QString &title, const QString &text, const QIcon &icon); #endif }; #endif // ASACOIN_QT_NOTIFICATOR_H
[ "719591157@qq.com" ]
719591157@qq.com
bbbe2dea2a80f63edf86f79397534f83c97e0e8b
a5306ddde493da2d616e5dab5b95267d9428cf0b
/Private Lessons Planner - Console Version/PLP Old Console Version/Klasa_Plan.cpp
031bc4d628bf59c164cb2f63a50e0319f870bc54
[ "MIT" ]
permissive
kubiesh/PUT-Projects
d911b86bbf0bdd990f3e588371c3a39f1219fa20
090b930d1ab591c67a0b722ca284025ad83ae48d
refs/heads/master
2020-03-06T15:54:12.396494
2018-03-27T22:29:37
2018-03-27T22:29:37
126,963,769
0
0
null
null
null
null
UTF-8
C++
false
false
572
cpp
#include "stdafx.h" Plan::Plan() { this->przychod = 0; this->iloscZajec = 0; for (int i = 0; i < 7; i++) { czySaZajeciaDzien[i] = false; } for (int i = 0; i < 7; i++) { for (int j = 0; j < 720; j++) { this->rozkladZajec[i][j] = Parametry::Dostepnosc[i][j]; } } } Plan::Plan(int rozkladZajec[7][720]) { this->przychod = 0; this->iloscZajec = 0; for (int i = 0; i < 7; i++) { czySaZajeciaDzien[i] = false; } //rozkladZajec for (int i = 0; i < 7; i++) { for (int j = 0; j < 720; j++) { this->rozkladZajec[i][j] = rozkladZajec[i][j]; } } }
[ "jakub.z.dabrowski@student.put.poznan.pl" ]
jakub.z.dabrowski@student.put.poznan.pl
646b2c3dc6d807fe36981caac9e7351d6b4c1dcc
a42333839fe2aa38c28d0fd39cc4e72743e18967
/FBXLoader/fbxsdk/core/fbxloadingstrategy.h
07cd46411869dbef45817cdd5d2b9db63d5adba5
[]
no_license
ebithril/ModelViewer
d3f4bfe5eea998e96d6f2ce123f8934e92ae80d1
1f4414bd7d86e11b3a846a5107e513030d7053d7
refs/heads/master
2021-01-10T12:29:55.010567
2016-02-19T18:42:23
2016-02-19T18:42:23
52,108,402
0
0
null
null
null
null
UTF-8
C++
false
false
2,870
h
/**************************************************************************************** Copyright (C) 2014 Autodesk, Inc. All rights reserved. Use of this software is subject to the terms of the Autodesk license agreement provided at the time of installation or download, or which otherwise accompanies this software in either electronic or hard copy form. ****************************************************************************************/ //! \file fbxloadingstrategy.h #ifndef _FBXSDK_CORE_LOADING_STRATEGY_H_ #define _FBXSDK_CORE_LOADING_STRATEGY_H_ #include "fbxsdk/fbxsdk_def.h" #ifndef FBXSDK_ENV_WINSTORE #include "fbxsdk/core/fbxplugin.h" #include "fbxsdk/core/fbxplugincontainer.h" #include "fbxsdk/fbxsdk_nsbegin.h" /** * Abstract class used to implemented some plug-in loading strategy. * A loading strategy dictate how some plug-ins will be loaded for instance. * We could have a simple strategy that loads only a single dll on PC. * We could also implement a strategy that load multiple dlls from a directory. */ class FBXSDK_DLL FbxLoadingStrategy : public FbxPluginContainer { public: /** Result state of loading plug-in. */ enum EState { eAllLoaded, //!< All plug-in are loaded. eNoneLoaded, //!< No plug-in is loaded, i.e., there is not plug-in to load. eAllFailed, //!< All plug-in are failed to load. eSomeFailed //!< Some plug-ins are loaded but some are failed. }; /** *\name Public interface */ //@{ /** Execute the operation of loading the plug-in(s). The way it is executed is determined by the specific implementations. * \param pData Plug in data that can be access inside the plug-ins. * \return If the plugin loading is successful return \c true, otherwise return \c false. */ EState Load(FbxPluginData& pData); /** Execute the operation of unloading the plug-in(s). The way it is executed is determined by the specific implementations. */ void Unload(); //@} protected: /** *\name User implementation */ //@{ /** Called by the Load method, it contains the specific user implementation strategy to load the desired plug-in(s). * \param pData Plug in data that can be access inside the plug-ins. * \return If the plugin loading is successful return \c true, otherwise return \c false */ virtual bool SpecificLoad(FbxPluginData& pData) = 0; /** Called by the Unload method, it contains the specific user implementation strategy to unload the desired plug-in(s). */ virtual void SpecificUnload(FbxPluginData& pData) = 0; //@} //! Whether the plugin is loaded or not. EState mPluginsLoadedState; private: FbxPluginData mData; }; #include "fbxsdk/fbxsdk_nsend.h" #endif /* !FBXSDK_ENV_WINSTORE */ #endif /* _FBXSDK_CORE_LOADING_STRATEGY_H_ */
[ "stpago1@hermods.local" ]
stpago1@hermods.local
e7a0377c6b3c522997241f6d10e1de0e2240b692
8a19eff3c6a856e4f56ea46b3e2858d7a80bddd1
/cpp/algos/LST.cpp
7782a31420a743340e39d088b4dd3d1f36c4e4bd
[]
no_license
soutiwari/Scheduling-Simulator
29e956897a981ef0e662d7e7bd714e4229d5fbeb
27e2f386a7442238449df7a40d9e2d361d9306bd
refs/heads/master
2020-12-03T00:03:04.329256
2017-07-01T18:26:26
2017-07-01T18:26:26
95,979,478
0
0
null
null
null
null
UTF-8
C++
false
false
4,765
cpp
#include<bits/stdc++.h> #define INF_MAX 99999 using namespace std; struct process{ int pno,arrival,deadline,execution; bool flag; int temparrival,tempdeadline,tempexecution,slack; }; struct startend{ int start[2000]; int end[2000]; int k; int pno; char clock[2000]; }; int hyperperiod=1; int gcd(int a,int b) { if(b == 0) return a; else return gcd(b,a%b); } void lcm(struct process l[], int n) { if(n == 0) return; hyperperiod = hyperperiod*l[n-1].deadline/ gcd(hyperperiod, l[n-1].deadline); lcm(l, n-1); } int cmpfunc(const void *a_, const void *b_) { process *a = (process *)a_; process *b = (process *)b_; if (a->temparrival < b->temparrival) return -1; if (a->temparrival > b->temparrival) return 1; if (a->slack < b->slack) return -1; if (a->slack > b->slack ) return 1; return 0; } int main(int arg, char* argv[]) { char *filename; if(arg>1) { filename = argv[1]; //cout<<filename; } else{ cout<<"no arguments"; exit(1); } fstream file; file.open(filename,ios::in | ios::out); int n; file>>n; struct process p[n+1]; struct startend s[n+1]; for(int i=0;i<n;i++) { // cin>>p[i].pno>>p[i].arrival>>p[i].execution>>p[i].deadline; p[i].pno = i+1; file>>p[i].arrival; file>>p[i].execution; file>>p[i].deadline; p[i].temparrival=p[i].arrival; p[i].tempdeadline=p[i].deadline+p[i].arrival; p[i].tempexecution=p[i].execution; p[i].flag=false; s[i].k=0; } s[n].k=0; float sum=0; int clock=0; for(int i=0;i<n;i++) { sum+=(float)p[i].execution/p[i].deadline; } cout<<sum<<endl; if(sum<=1) { for(int i=0;i<n;i++) { if(p[i].arrival<=clock) p[i].slack=p[i].tempdeadline-p[i].tempexecution-clock; else p[i].slack=INF_MAX; } qsort(p,n,sizeof(process),cmpfunc); /*cout<<"clock-"<<clock<<endl; for(int i=0;i<n;i++) cout<<p[i].pno<<" "<<p[i].temparrival<<" "<<p[i].tempexecution<<" "<<p[i].tempdeadline<<" "<<p[i].slack<<endl; cout<<endl<<endl;*/ lcm(p,n); //cout<<hyperperiod<<endl; for(int i=0;i<=n;i++) { for(int j=0;j<=hyperperiod;j++) { s[i].clock[j]='_'; } } while(hyperperiod>=clock) { if(p[0].slack!=INF_MAX) { p[0].tempexecution--; if(clock==p[0].arrival) { s[p[0].pno].clock[clock]='#'; } else { s[p[0].pno].clock[clock]='*'; if(s[p[0].pno].clock[p[0].arrival]!='#') s[p[0].pno].clock[p[0].arrival]='|'; } if(p[0].flag==false) { s[p[0].pno].start[s[p[0].pno].k]=clock; p[0].flag=true; } if(p[0].tempexecution==0) { p[0].arrival=p[0].arrival+p[0].deadline; p[0].tempdeadline=p[0].deadline+p[0].tempdeadline; p[0].tempexecution=p[0].execution; p[0].temparrival=p[0].arrival; s[p[0].pno].end[s[p[0].pno].k]=clock; s[p[0].pno].k++; p[0].flag=false; } } clock++; for(int i=0;i<n;i++) { if(p[i].arrival<=clock) { p[i].temparrival=0; } } for(int i=0;i<n;i++) { if(p[i].arrival<=clock) p[i].slack=p[i].tempdeadline-p[i].tempexecution-clock; else p[i].slack=INF_MAX; } qsort(p,n,sizeof(process),cmpfunc); /*cout<<"clock-"<<clock<<endl; for(int i=0;i<n;i++) cout<<p[i].pno<<" "<<p[i].temparrival<<" "<<p[i].tempexecution<<" "<<p[i].tempdeadline<<" "<<p[i].slack<<endl; cout<<endl<<endl;*/ } /* for(int i=1;i<n+1;i++) { cout<<"process "<<i<<endl; for(int j=0;j<s[i].k;j++) { //cout<<s[i].start[j]<<" Hello"<<endl; cout<<s[i].start[j]<<" "<<++s[i].end[j]<<endl; } }*/ for(int i=1;i<=n;i++) { for(int j=0;j<=hyperperiod;j++) { cout<<s[i].clock[j]; } cout<<endl; } } else { cout<<"Not Schedulable"; } }
[ "soumyatiwari95@gmail.com" ]
soumyatiwari95@gmail.com
b68aa7035b940f45d62768cb9cfc1675b2fa912c
df959637cb06fa8cdb4ab332d331ec45f226f7e3
/OpenGlBasics/src/Renderer.h
9c95041266422cdc1add4699e20ad5321af61578
[]
no_license
Lyon77/OpenGLBasicFramework
2e17219bef5d187091892fb6fbd5c51c5ffefbad
35d569c2c459be34783b7c7057a251225a58e4e4
refs/heads/master
2020-08-25T00:51:46.514515
2020-04-11T21:14:43
2020-04-11T21:14:43
216,937,101
0
0
null
null
null
null
UTF-8
C++
false
false
568
h
#pragma once #include <GL/glew.h> #include "VertexArray.h" #include "IndexBuffer.h" #include "Shader.h" #define ASSERT(x) if (!(x)) __debugbreak(); #define GLCall(x) GLClearError();\ x;\ ASSERT(GLLogCall(#x, __FILE__, __LINE__)) void GLClearError(); bool GLLogCall(const char* function, const char* file, int line); class Renderer { private: public: void Clear() const; void Draw(const VertexArray& va, const IndexBuffer& ib, const Shader& shader) const; void DrawTriangleStrips(const VertexArray& va, const IndexBuffer& ib, const Shader& shader) const; };
[ "rjl7799@gmail.com" ]
rjl7799@gmail.com
8e6be21d4d033618fc53c1de683837b0cdd75aad
3ff1fe3888e34cd3576d91319bf0f08ca955940f
/emr/src/v20190103/model/ScaleOutClusterRequest.cpp
d56965d00455b08961effe403510828622c5ff26
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-cpp
9f5df8220eaaf72f7eaee07b2ede94f89313651f
42a76b812b81d1b52ec6a217fafc8faa135e06ca
refs/heads/master
2023-08-30T03:22:45.269556
2023-08-30T00:45:39
2023-08-30T00:45:39
188,991,963
55
37
Apache-2.0
2023-08-17T03:13:20
2019-05-28T08:56:08
C++
UTF-8
C++
false
false
16,256
cpp
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * 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. */ #include <tencentcloud/emr/v20190103/model/ScaleOutClusterRequest.h> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> using namespace TencentCloud::Emr::V20190103::Model; using namespace std; ScaleOutClusterRequest::ScaleOutClusterRequest() : m_instanceChargeTypeHasBeenSet(false), m_instanceIdHasBeenSet(false), m_scaleOutNodeConfigHasBeenSet(false), m_clientTokenHasBeenSet(false), m_instanceChargePrepaidHasBeenSet(false), m_scriptBootstrapActionConfigHasBeenSet(false), m_softDeployInfoHasBeenSet(false), m_serviceNodeInfoHasBeenSet(false), m_disasterRecoverGroupIdsHasBeenSet(false), m_tagsHasBeenSet(false), m_hardwareSourceTypeHasBeenSet(false), m_podSpecInfoHasBeenSet(false), m_clickHouseClusterNameHasBeenSet(false), m_clickHouseClusterTypeHasBeenSet(false), m_yarnNodeLabelHasBeenSet(false), m_enableStartServiceFlagHasBeenSet(false), m_resourceSpecHasBeenSet(false), m_zoneHasBeenSet(false), m_subnetIdHasBeenSet(false) { } string ScaleOutClusterRequest::ToJsonString() const { rapidjson::Document d; d.SetObject(); rapidjson::Document::AllocatorType& allocator = d.GetAllocator(); if (m_instanceChargeTypeHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "InstanceChargeType"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_instanceChargeType.c_str(), allocator).Move(), allocator); } if (m_instanceIdHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "InstanceId"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_instanceId.c_str(), allocator).Move(), allocator); } if (m_scaleOutNodeConfigHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "ScaleOutNodeConfig"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(rapidjson::kObjectType).Move(), allocator); m_scaleOutNodeConfig.ToJsonObject(d[key.c_str()], allocator); } if (m_clientTokenHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "ClientToken"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_clientToken.c_str(), allocator).Move(), allocator); } if (m_instanceChargePrepaidHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "InstanceChargePrepaid"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(rapidjson::kObjectType).Move(), allocator); m_instanceChargePrepaid.ToJsonObject(d[key.c_str()], allocator); } if (m_scriptBootstrapActionConfigHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "ScriptBootstrapActionConfig"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator); int i=0; for (auto itr = m_scriptBootstrapActionConfig.begin(); itr != m_scriptBootstrapActionConfig.end(); ++itr, ++i) { d[key.c_str()].PushBack(rapidjson::Value(rapidjson::kObjectType).Move(), allocator); (*itr).ToJsonObject(d[key.c_str()][i], allocator); } } if (m_softDeployInfoHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "SoftDeployInfo"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator); for (auto itr = m_softDeployInfo.begin(); itr != m_softDeployInfo.end(); ++itr) { d[key.c_str()].PushBack(rapidjson::Value().SetInt64(*itr), allocator); } } if (m_serviceNodeInfoHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "ServiceNodeInfo"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator); for (auto itr = m_serviceNodeInfo.begin(); itr != m_serviceNodeInfo.end(); ++itr) { d[key.c_str()].PushBack(rapidjson::Value().SetInt64(*itr), allocator); } } if (m_disasterRecoverGroupIdsHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "DisasterRecoverGroupIds"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator); for (auto itr = m_disasterRecoverGroupIds.begin(); itr != m_disasterRecoverGroupIds.end(); ++itr) { d[key.c_str()].PushBack(rapidjson::Value().SetString((*itr).c_str(), allocator), allocator); } } if (m_tagsHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "Tags"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(rapidjson::kArrayType).Move(), allocator); int i=0; for (auto itr = m_tags.begin(); itr != m_tags.end(); ++itr, ++i) { d[key.c_str()].PushBack(rapidjson::Value(rapidjson::kObjectType).Move(), allocator); (*itr).ToJsonObject(d[key.c_str()][i], allocator); } } if (m_hardwareSourceTypeHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "HardwareSourceType"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_hardwareSourceType.c_str(), allocator).Move(), allocator); } if (m_podSpecInfoHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "PodSpecInfo"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(rapidjson::kObjectType).Move(), allocator); m_podSpecInfo.ToJsonObject(d[key.c_str()], allocator); } if (m_clickHouseClusterNameHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "ClickHouseClusterName"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_clickHouseClusterName.c_str(), allocator).Move(), allocator); } if (m_clickHouseClusterTypeHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "ClickHouseClusterType"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_clickHouseClusterType.c_str(), allocator).Move(), allocator); } if (m_yarnNodeLabelHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "YarnNodeLabel"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_yarnNodeLabel.c_str(), allocator).Move(), allocator); } if (m_enableStartServiceFlagHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "EnableStartServiceFlag"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, m_enableStartServiceFlag, allocator); } if (m_resourceSpecHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "ResourceSpec"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(rapidjson::kObjectType).Move(), allocator); m_resourceSpec.ToJsonObject(d[key.c_str()], allocator); } if (m_zoneHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "Zone"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_zone.c_str(), allocator).Move(), allocator); } if (m_subnetIdHasBeenSet) { rapidjson::Value iKey(rapidjson::kStringType); string key = "SubnetId"; iKey.SetString(key.c_str(), allocator); d.AddMember(iKey, rapidjson::Value(m_subnetId.c_str(), allocator).Move(), allocator); } rapidjson::StringBuffer buffer; rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); d.Accept(writer); return buffer.GetString(); } string ScaleOutClusterRequest::GetInstanceChargeType() const { return m_instanceChargeType; } void ScaleOutClusterRequest::SetInstanceChargeType(const string& _instanceChargeType) { m_instanceChargeType = _instanceChargeType; m_instanceChargeTypeHasBeenSet = true; } bool ScaleOutClusterRequest::InstanceChargeTypeHasBeenSet() const { return m_instanceChargeTypeHasBeenSet; } string ScaleOutClusterRequest::GetInstanceId() const { return m_instanceId; } void ScaleOutClusterRequest::SetInstanceId(const string& _instanceId) { m_instanceId = _instanceId; m_instanceIdHasBeenSet = true; } bool ScaleOutClusterRequest::InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } ScaleOutNodeConfig ScaleOutClusterRequest::GetScaleOutNodeConfig() const { return m_scaleOutNodeConfig; } void ScaleOutClusterRequest::SetScaleOutNodeConfig(const ScaleOutNodeConfig& _scaleOutNodeConfig) { m_scaleOutNodeConfig = _scaleOutNodeConfig; m_scaleOutNodeConfigHasBeenSet = true; } bool ScaleOutClusterRequest::ScaleOutNodeConfigHasBeenSet() const { return m_scaleOutNodeConfigHasBeenSet; } string ScaleOutClusterRequest::GetClientToken() const { return m_clientToken; } void ScaleOutClusterRequest::SetClientToken(const string& _clientToken) { m_clientToken = _clientToken; m_clientTokenHasBeenSet = true; } bool ScaleOutClusterRequest::ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } InstanceChargePrepaid ScaleOutClusterRequest::GetInstanceChargePrepaid() const { return m_instanceChargePrepaid; } void ScaleOutClusterRequest::SetInstanceChargePrepaid(const InstanceChargePrepaid& _instanceChargePrepaid) { m_instanceChargePrepaid = _instanceChargePrepaid; m_instanceChargePrepaidHasBeenSet = true; } bool ScaleOutClusterRequest::InstanceChargePrepaidHasBeenSet() const { return m_instanceChargePrepaidHasBeenSet; } vector<ScriptBootstrapActionConfig> ScaleOutClusterRequest::GetScriptBootstrapActionConfig() const { return m_scriptBootstrapActionConfig; } void ScaleOutClusterRequest::SetScriptBootstrapActionConfig(const vector<ScriptBootstrapActionConfig>& _scriptBootstrapActionConfig) { m_scriptBootstrapActionConfig = _scriptBootstrapActionConfig; m_scriptBootstrapActionConfigHasBeenSet = true; } bool ScaleOutClusterRequest::ScriptBootstrapActionConfigHasBeenSet() const { return m_scriptBootstrapActionConfigHasBeenSet; } vector<int64_t> ScaleOutClusterRequest::GetSoftDeployInfo() const { return m_softDeployInfo; } void ScaleOutClusterRequest::SetSoftDeployInfo(const vector<int64_t>& _softDeployInfo) { m_softDeployInfo = _softDeployInfo; m_softDeployInfoHasBeenSet = true; } bool ScaleOutClusterRequest::SoftDeployInfoHasBeenSet() const { return m_softDeployInfoHasBeenSet; } vector<int64_t> ScaleOutClusterRequest::GetServiceNodeInfo() const { return m_serviceNodeInfo; } void ScaleOutClusterRequest::SetServiceNodeInfo(const vector<int64_t>& _serviceNodeInfo) { m_serviceNodeInfo = _serviceNodeInfo; m_serviceNodeInfoHasBeenSet = true; } bool ScaleOutClusterRequest::ServiceNodeInfoHasBeenSet() const { return m_serviceNodeInfoHasBeenSet; } vector<string> ScaleOutClusterRequest::GetDisasterRecoverGroupIds() const { return m_disasterRecoverGroupIds; } void ScaleOutClusterRequest::SetDisasterRecoverGroupIds(const vector<string>& _disasterRecoverGroupIds) { m_disasterRecoverGroupIds = _disasterRecoverGroupIds; m_disasterRecoverGroupIdsHasBeenSet = true; } bool ScaleOutClusterRequest::DisasterRecoverGroupIdsHasBeenSet() const { return m_disasterRecoverGroupIdsHasBeenSet; } vector<Tag> ScaleOutClusterRequest::GetTags() const { return m_tags; } void ScaleOutClusterRequest::SetTags(const vector<Tag>& _tags) { m_tags = _tags; m_tagsHasBeenSet = true; } bool ScaleOutClusterRequest::TagsHasBeenSet() const { return m_tagsHasBeenSet; } string ScaleOutClusterRequest::GetHardwareSourceType() const { return m_hardwareSourceType; } void ScaleOutClusterRequest::SetHardwareSourceType(const string& _hardwareSourceType) { m_hardwareSourceType = _hardwareSourceType; m_hardwareSourceTypeHasBeenSet = true; } bool ScaleOutClusterRequest::HardwareSourceTypeHasBeenSet() const { return m_hardwareSourceTypeHasBeenSet; } PodSpecInfo ScaleOutClusterRequest::GetPodSpecInfo() const { return m_podSpecInfo; } void ScaleOutClusterRequest::SetPodSpecInfo(const PodSpecInfo& _podSpecInfo) { m_podSpecInfo = _podSpecInfo; m_podSpecInfoHasBeenSet = true; } bool ScaleOutClusterRequest::PodSpecInfoHasBeenSet() const { return m_podSpecInfoHasBeenSet; } string ScaleOutClusterRequest::GetClickHouseClusterName() const { return m_clickHouseClusterName; } void ScaleOutClusterRequest::SetClickHouseClusterName(const string& _clickHouseClusterName) { m_clickHouseClusterName = _clickHouseClusterName; m_clickHouseClusterNameHasBeenSet = true; } bool ScaleOutClusterRequest::ClickHouseClusterNameHasBeenSet() const { return m_clickHouseClusterNameHasBeenSet; } string ScaleOutClusterRequest::GetClickHouseClusterType() const { return m_clickHouseClusterType; } void ScaleOutClusterRequest::SetClickHouseClusterType(const string& _clickHouseClusterType) { m_clickHouseClusterType = _clickHouseClusterType; m_clickHouseClusterTypeHasBeenSet = true; } bool ScaleOutClusterRequest::ClickHouseClusterTypeHasBeenSet() const { return m_clickHouseClusterTypeHasBeenSet; } string ScaleOutClusterRequest::GetYarnNodeLabel() const { return m_yarnNodeLabel; } void ScaleOutClusterRequest::SetYarnNodeLabel(const string& _yarnNodeLabel) { m_yarnNodeLabel = _yarnNodeLabel; m_yarnNodeLabelHasBeenSet = true; } bool ScaleOutClusterRequest::YarnNodeLabelHasBeenSet() const { return m_yarnNodeLabelHasBeenSet; } bool ScaleOutClusterRequest::GetEnableStartServiceFlag() const { return m_enableStartServiceFlag; } void ScaleOutClusterRequest::SetEnableStartServiceFlag(const bool& _enableStartServiceFlag) { m_enableStartServiceFlag = _enableStartServiceFlag; m_enableStartServiceFlagHasBeenSet = true; } bool ScaleOutClusterRequest::EnableStartServiceFlagHasBeenSet() const { return m_enableStartServiceFlagHasBeenSet; } NodeResourceSpec ScaleOutClusterRequest::GetResourceSpec() const { return m_resourceSpec; } void ScaleOutClusterRequest::SetResourceSpec(const NodeResourceSpec& _resourceSpec) { m_resourceSpec = _resourceSpec; m_resourceSpecHasBeenSet = true; } bool ScaleOutClusterRequest::ResourceSpecHasBeenSet() const { return m_resourceSpecHasBeenSet; } string ScaleOutClusterRequest::GetZone() const { return m_zone; } void ScaleOutClusterRequest::SetZone(const string& _zone) { m_zone = _zone; m_zoneHasBeenSet = true; } bool ScaleOutClusterRequest::ZoneHasBeenSet() const { return m_zoneHasBeenSet; } string ScaleOutClusterRequest::GetSubnetId() const { return m_subnetId; } void ScaleOutClusterRequest::SetSubnetId(const string& _subnetId) { m_subnetId = _subnetId; m_subnetIdHasBeenSet = true; } bool ScaleOutClusterRequest::SubnetIdHasBeenSet() const { return m_subnetIdHasBeenSet; }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
9507a3bb8fc85b52f32f87c59567d3dd3befde42
a1eaea61c86c9539378db94519855e7acea4a0f1
/tdai/boardUtilOperation.h
a411ccd8faac62fd4546a64b15c4aab97c415c2a
[]
no_license
EricCheng2222/tdai
2d9da8913b4422429efc49f8c8aee2c18320151c
31dddcf4fa674ab5b1bd22f633005f12de4f6014
refs/heads/master
2020-04-01T09:21:17.419445
2018-10-25T15:53:19
2018-10-25T15:53:19
153,071,499
0
0
null
null
null
null
UTF-8
C++
false
false
1,095
h
// // boardUtilOperation.h // Threes // // Created by Eric Cheng on 10/1/18. // Copyright © 2018 Eric Cheng. All rights reserved. // #ifndef boardUtilOperation_h #define boardUtilOperation_h void transpose(vector<vector<int> > &tile) { for (int r = 0; r < 4; r++) { for (int c = r + 1; c < 4; c++) { std::swap(tile[r][c], tile[c][r]); } } } void reflect_horizontal(vector<vector<int> > &tile) { for (int r = 0; r < 4; r++) { std::swap(tile[r][0], tile[r][3]); std::swap(tile[r][1], tile[r][2]); } } void reflect_vertical(vector<vector<int> > &tile) { for (int c = 0; c < 4; c++) { std::swap(tile[0][c], tile[3][c]); std::swap(tile[1][c], tile[2][c]); } } void rotate_right(vector<vector<int> > &tile) { transpose(tile); reflect_horizontal(tile); } // clockwise void rotate_left(vector<vector<int> > &tile) { transpose(tile); reflect_vertical(tile); } // counterclockwise void reverse(vector<vector<int> > &tile) { reflect_horizontal(tile); reflect_vertical(tile); } #endif /* boardUtilOperation_h */
[ "ericjang@kimo.com" ]
ericjang@kimo.com
b68b059776644361360c951e09fa9439bf5508ab
b61f6e2610805ec81bcfc9a92710840f6c96b8d4
/src/thread_pool/thread_pool.h
d549188a99b58dbd05ea2a54799d6cb43a12b49e
[ "MIT" ]
permissive
elenial/parallel-packed-csr
a8c216b5371d14d2def1d06edf2ab75b76c08c7a
197516e5b56ddf2d2282403e42724b08ebd8ebd5
refs/heads/master
2022-11-11T06:23:51.304723
2020-06-25T16:19:20
2020-06-25T16:19:20
274,905,191
4
2
null
null
null
null
UTF-8
C++
false
false
1,287
h
// // Created by Eleni Alevra on 02/06/2020. // #include <queue> #include <vector> #include "../pcsr/PCSR.cpp" using namespace std; #ifndef PCSR2_THREAD_POOL_H #define PCSR2_THREAD_POOL_H /** Struct for tasks to the threads */ struct task { bool add; // True if this is an add task. If this is false it means it's a delete. bool read; // True if this is a read task. int src; // Source vertex for this task's edge int target; // Target vertex for this task's edge }; class ThreadPool { public: PCSR* pcsr; explicit ThreadPool(const int NUM_OF_THREADS, bool lock_search); ~ThreadPool() { } /** Public API */ void submit_add(int thread_id, int src, int dest); // submit task to thread {thread_id} to insert edge {src, dest} void submit_delete(int thread_id, int src, int dest); // submit task to thread {thread_id} to delete edge {src, dest} void submit_read(int, int); // submit task to thread {thread_id} to read the neighbourhood of vertex {src} void start(int threads); // start the threads void stop(); // stop the threads private: vector<thread> thread_pool; vector<queue<task>> tasks; chrono::steady_clock::time_point s; chrono::steady_clock::time_point end; bool finished = false; void execute(int); }; #endif //PCSR2_THREAD_POOL_H
[ "ea1516@ic.ac.uk" ]
ea1516@ic.ac.uk
e5a73718d9dbe170694734c792ed46a4eb59c03b
c3e0b4d2516247d42922df1c7dc81e90fef3020c
/Projects/TestMqtt/src/main.cpp
664bb09d265f66abb6ed97e9d60588701b60c029
[]
no_license
MauroMP1/Projects_Iots
59d621ecab0a566b3707785d082fb1ea405b14a9
625c782c1bcb50f9968a46048803abe81c71a2cb
refs/heads/main
2023-07-16T18:05:21.275842
2021-09-04T15:05:46
2021-09-04T15:05:46
380,040,102
0
0
null
null
null
null
UTF-8
C++
false
false
6,444
cpp
//ItKindaWorks - Creative Commons 2016 //github.com/ItKindaWorks // //Requires PubSubClient found here: https://github.com/knolleary/pubsubclient // //ESP8266 Simple MQTT light controller //#include <Arduino.h> #include <DHT.h> //#include <DHT_U.h> //#include <Adafruit_Sensor.h> #include <PubSubClient.h> #include <ESP8266Wifi.h> //EDIT THESE LINES TO MATCH YOUR SETUP #define DHTPIN 12 #define DHTTYPE DHT22 char ssid[] = "Guifi"; char password[] = "siteconectasmarchas"; IPAddress mqttServer (183,153,0,112); const int mqttPort = 1883; const char* mqttUser = "mauro"; const char* mqttPassword = "moscoraspi4"; const char* clientID = "NoDeMCU"; float celsiusTemperature; char t[2]; float hum; char h[2]; DHT dht(DHTPIN, DHTTYPE); //void callback(char* topic, byte* payload, unsigned int length); WiFiClient wifiClient; PubSubClient client; //sensor_t sensor; //generate unique name from MAC addr String macToStr(const uint8_t* mac){ String result; for (int i = 0; i < 6; ++i) { result += String(mac[i], 16); if (i < 5){ result += ':'; } } return result; } /*void reconnect() { //attempt to connect to the wifi if connection is lost if(WiFi.status() != WL_CONNECTED){ //debug printing Serial.print("Connecting to "); Serial.println(ssid); //loop while we wait for connection while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } //print out some more debug once connected Serial.println(""); Serial.println("WiFi connected"); Serial.println("IP address: "); Serial.println(WiFi.localIP()); } //make sure we are connected to WIFI before attemping to reconnect to MQTT if(WiFi.status() == WL_CONNECTED){ // Loop until we're reconnected to the MQTT server while (!client.connected()) { Serial.print("Attempting MQTT connection..."); // Generate client name based on MAC address and last 8 bits of microsecond counter String clientName; clientName = "esp8266"; Serial.println(clientName); //uint8_t mac[6]; //WiFi.macAddress(mac); //clientName += macToStr(mac); //if connected, subscribe to the topic(s) we want to be notified about if (client.connect((char*) clientName.c_str())) { Serial.print("\tMTQQ Connected"); client.subscribe("/test/tempyhum"); } //otherwise print failed for debugging else{Serial.println("\tFailed."); abort();} } } }*/ void setup() { Serial.begin(115200); delay(100); dht.begin(); WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.println("Conectando a red WiFi..."); } WiFi.printDiag(Serial); Serial.println(WiFi.localIP()); client.setClient(wifiClient); //client.setCallback(callback); client.setServer(mqttServer, mqttPort); while (!client.connected()) { Serial.println("Conectando a Broquer MQTT..."); Serial.println(clientID); Serial.println(""); //Serial.println(mqttUser); //Serial.println(mqttPassword); Serial.println(mqttServer); Serial.println(""); Serial.println(mqttPort); if (client.connect(clientID, mqttUser, mqttPassword)) { Serial.println("conectado"); } else { Serial.println("conexion fallida "); Serial.println(client.state()); Serial.println(""); // WiFi.printDiag(Serial); Serial.println(WiFi.localIP()); Serial.println(""); } } delay(1000); } void loop(){ //sensors_event_t event; celsiusTemperature = dht.readTemperature(false); hum = dht.readHumidity(); //reconnect if connection is lost /*if (!client.connected() && WiFi.status() == 3) { connectD(); }*/ //dht.temperature().getEvent(&event); if (isnan(celsiusTemperature)) { Serial.println("Error reading temperature!"); } else { int temp = ((int)celsiusTemperature); Serial.print("Temperature: "); Serial.print(temp); Serial.print(" "); Serial.println("C"); String b; b = (String)temp; b.toCharArray(t,temp); } if (isnan(hum)) { Serial.println("Error reading humedad!"); } else { int humus = ((int)hum); Serial.print("Humedad: "); Serial.print(humus); Serial.print(" "); Serial.println("%"); String b; b = (String)humus; b.toCharArray(h,humus); } client.publish("/test/tempyhum", "Temperatura:"); client.publish("/test/tempyhum", t); client.publish("/test/tempyhum", "Humedad"); client.publish("/test/tempyhum", h); client.publish("/test/tempyhum", " "); //maintain MQTT connection delay(1000); //client.loop(); } /*void callback (char* topic, byte* payload, unsigned int length) { //convert topic to string to make it easier to work with String topicStr = topic; sensors_event_t event; //Print out some debugging info Serial.println("Callback update."); Serial.print("Topic: "); Serial.println(topicStr); //turn the light on if the payload is '1' and publish to the MQTT server a confirmation message if(payload[0] == '1'){ //digitalWrite(lightPin, HIGH); if (isnan(event.temperature)) { Serial.println(F("Error reading temperature!")); } else { Serial.print(F("Temperature: ")); Serial.print(event.temperature); Serial.println(F("°C")); t = event.temperature; int j = int(t); temp += j; } client.publish("/test/tempyhum", temp); } //turn the light off if the payload is '0' and publish to the MQTT server a confirmation message if (payload[0] == '0'){ //digitalWrite(lightPin, LOW); if (isnan(event.relative_humidity)) { Serial.println(F("Error reading humidity!")); } else { Serial.print(F("Humidity: ")); Serial.print(event.relative_humidity); Serial.println(F("%")); h=event.relative_humidity; int i = int(h); hum += i; } client.publish("/test/tempyhum", hum); } }*/ void connectD(){ while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.println("Conectando a red WiFi..."); } Serial.println("Conectado a la red WiFi"); //start the serial line for debugging Serial.begin(115200); delay(100); client.setClient(wifiClient); client.setServer(mqttServer, mqttPort); while (!client.connected()) { Serial.println("Conectando a Broquer MQTT..."); if (client.connect("IOT-ESP32", mqttUser, mqttPassword )) { Serial.println("conectado"); } else { Serial.print("conexion fallida "); Serial.print(client.state()); delay(2000); } } }
[ "mmartinezpastre@gmail.com" ]
mmartinezpastre@gmail.com
2f9df00fd6009237669162ad64980e1b30c3974c
a5b566fe7906ec05fa0e638eab99d623eac8564e
/sources/FastBranchOmega.cpp
76027b789c626956dce97e6b09e5138dce0ba3a3
[]
no_license
bayesiancook/bayescode
6d44f97ee617164538ac977cb5219ae670135674
855ac3b331267b9626d2ac25952d36a6a9374bdd
refs/heads/master
2023-08-29T03:37:01.202960
2022-10-05T16:06:57
2022-10-05T16:06:57
92,596,965
4
4
null
2022-04-14T08:36:06
2017-05-27T12:20:15
C++
UTF-8
C++
false
false
5,577
cpp
#include <cmath> #include <fstream> #include "Chain.hpp" #include "FastBranchOmegaModel.hpp" using namespace std; /** * \brief Chain object for running an MCMC under FastBranchOmegaModel */ class FastBranchOmegaChain : public Chain { private: // Chain parameters string modeltype; string taxonfile, treefile, dsomsuffstatfile; public: //! constructor for a new chain: datafile, treefile, saving frequency, final //! chain size, chain name and overwrite flag -- calls New FastBranchOmegaChain(string intaxonfile, string intreefile, string indsomsuffstatfile, int inevery, int inuntil, string inname, int force) : modeltype("FASTBRANCHOMEGA"), taxonfile(intaxonfile), treefile(intreefile), dsomsuffstatfile(indsomsuffstatfile) { every = inevery; until = inuntil; name = inname; New(force); } //! constructor for re-opening an already existing chain from file -- calls //! Open FastBranchOmegaChain(string filename) { name = filename; Open(); Save(); } void New(int force) override { model = new FastBranchOmegaModel(taxonfile, treefile, dsomsuffstatfile); GetModel()->Allocate(); GetModel()->Update(); cerr << "-- Reset" << endl; Reset(force); cerr << "-- initial ln prob = " << GetModel()->GetLogProb() << "\n"; model->Trace(cerr); } void Open() override { ifstream is((name + ".param").c_str()); if (!is) { cerr << "-- Error : cannot find file : " << name << ".param\n"; exit(1); } is >> modeltype; is >> taxonfile >> treefile >> dsomsuffstatfile; int tmp; is >> tmp; if (tmp) { cerr << "-- Error when reading model\n"; exit(1); } is >> every >> until >> size; if (modeltype == "FASTBRANCHOMEGA") { model = new FastBranchOmegaModel(taxonfile, treefile, dsomsuffstatfile); } else { cerr << "-- Error when opening file " << name << " : does not recognise model type : " << modeltype << '\n'; exit(1); } GetModel()->Allocate(); model->FromStream(is); model->Update(); cerr << size << " points saved, current ln prob = " << GetModel()->GetLogProb() << "\n"; model->Trace(cerr); } void Save() override { ofstream param_os((name + ".param").c_str()); param_os << GetModelType() << '\n'; param_os << taxonfile << '\t' << treefile << '\t' << dsomsuffstatfile << '\n'; param_os << 0 << '\n'; param_os << every << '\t' << until << '\t' << size << '\n'; model->ToStream(param_os); } void SavePoint() override { Chain::SavePoint(); ofstream pos((name + ".branchomega").c_str(), ios_base::app); GetModel()->TraceBranchOmega(pos); } void MakeFiles(int force) override { Chain::MakeFiles(force); ofstream pos((name + ".branchomega").c_str()); } //! return the model, with its derived type (unlike ProbModel::GetModel) FastBranchOmegaModel *GetModel() { return static_cast<FastBranchOmegaModel *>(model); } //! return model type string GetModelType() override { return modeltype; } }; int main(int argc, char *argv[]) { string name = ""; FastBranchOmegaChain *chain = 0; // starting a chain from existing files if (argc == 2 && argv[1][0] != '-') { name = argv[1]; chain = new FastBranchOmegaChain(name); } // new chain else { string taxonfile = ""; string treefile = ""; string dsomsuffstatfile = ""; name = ""; int force = 1; int every = 1; int until = -1; try { if (argc == 1) { throw(0); } int i = 1; while (i < argc) { string s = argv[i]; if (s == "-tax") { i++; taxonfile = argv[i]; } else if ((s == "-t") || (s == "-T")) { i++; treefile = argv[i]; } else if (s == "-f") { force = 1; } else if (s == "-ss") { i++; dsomsuffstatfile = argv[i]; } else if ((s == "-x") || (s == "-extract")) { i++; if (i == argc) throw(0); every = atoi(argv[i]); i++; if (i == argc) throw(0); until = atoi(argv[i]); } else { if (i != (argc - 1)) { throw(0); } name = argv[i]; } i++; } if ((taxonfile == "") || (treefile == "") || (name == "")) { throw(0); } } catch (...) { cerr << "globom -d <alignment> -t <tree> <chainname> \n"; cerr << '\n'; exit(1); } chain = new FastBranchOmegaChain(taxonfile, treefile, dsomsuffstatfile, every, until, name, force); } cerr << "chain " << name << " started\n"; chain->Start(); cerr << "chain " << name << " stopped\n"; cerr << chain->GetSize() << "-- Points saved, current ln prob = " << chain->GetModel()->GetLogProb() << "\n"; chain->GetModel()->Trace(cerr); }
[ "nicolas.lartillot@gmail.com" ]
nicolas.lartillot@gmail.com
c13079ad584cf4f87be68d24f8dfa9830ce7f0f0
330647f32b52af816722c2fac54e5a3642a26ba5
/bomb.h
c784d064068fd359307bb62494c1bf57c0703a28
[]
no_license
NeeXxx/bomb
aed54e057f5b332285a954ea0ac14ddfe0fdd789
b2d07ecccd01676820273af551a18678dcd6b9e2
refs/heads/master
2020-12-03T03:39:10.080318
2017-07-06T07:49:24
2017-07-06T07:49:24
95,755,835
0
0
null
2017-06-30T13:54:52
2017-06-29T08:28:07
C++
UTF-8
C++
false
false
383
h
#ifndef BOMB_H #define BOMB_H class bomb { public: bomb(int tx,int ty,int tp,int tst):x(tx),y(ty),power(tp),setTime(tst) {} int getPower() const { return power; } void explode(); bool canExplode(int); int getX() { return x; } int getY() { return y; } private: int x,y; int power; int setTime; const int explodeTime=30; }; #endif // BOMB_H
[ "neexgzyx@163.com" ]
neexgzyx@163.com
7d1b6a326fa37bcd816c9373526a09926001d81f
5b03755aba33e19b90fb7b61ae2fb68d159510f0
/MISC ARDUINO/remote_lvc/remote_lvc.ino
0698b39dd9de1d54ce7784dd863ee083e1dca683
[]
no_license
x64616e/Mobile-Robotics
d296d16d80d46f8a085c862097d8bd1927ef7479
b7356919f8e483dc06325a7300fb74a4782b5b77
refs/heads/master
2022-04-21T13:24:04.019300
2020-04-16T22:52:25
2020-04-16T22:52:25
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,608
ino
/* remote_lvc.ino 2013 Copyright (c) Seeed Technology Inc. All right reserved. Author:Loovee 2013-3-18 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110- 1301 USA */ #include <RFBeeSendRev.h> #include <EEPROM.h> #define VAL1MIN -263 #define VAL1MAX 263 #define VAL2MIN -257 #define VAL2MAX 257 #define START1 0x53 #define START2 0x01 #define END1 0x2f #define END2 0x45 #define DTALEN 6 #define DIRFF 0 #define DEIRR 1 #define __DEBUG 1 #if __DEBUG #define __print(X) Serial.print(X) #define __println(X) Serial.println(X) #else #define __print(X) #define __println(X) #endif int speedLeft = 0; int speedRight = 0; unsigned char dtaSend[6] = {START1, START2, 0, 0, END1, END2}; int val1 = 0; int valbuf1 = 0; int val2 = 0; int valbuf2 = 0; int comVal1 = 0; int comVal2 = 0; /********************************************************************************************************* ** Function name: getAnalog ** Descriptions: read analog value *********************************************************************************************************/ int getAnalog(int pin) { unsigned int sum = 0; for(int i = 0; i<32; i++) { sum += analogRead(pin); } sum = ((sum >> 5) & 0x03ff); // diff return sum; } /********************************************************************************************************* ** Function name: cmpLvc ** Descriptions: compare *********************************************************************************************************/ bool cmpLvc(int a, int b) { int tmp = a - b; return abs(tmp) > 1 ? 1 : 0; } /********************************************************************************************************* ** Function name: sendToRfbee ** Descriptions: send data to rfbee *********************************************************************************************************/ void sendToRfbee() { dtaSend[2] = speedLeft; dtaSend[3] = speedRight; RFBEE.sendDta(6, dtaSend); } /********************************************************************************************************* ** Function name: makeDirSpeed ** Descriptions: make direction and speed *********************************************************************************************************/ void makeDirSpeed(int x, int y) { if(x > 900){ speedRight = 100; speedLeft = 100; } if(y == 0) // go ahead or go back { speedLeft = abs(x); speedRight = speedLeft; if(x >= 0) { __println("forward"); } else { speedLeft = 0x80 | speedLeft; speedRight = speedLeft; __println("goback"); } } else if(x == 0) { speedLeft = map(abs(y), 0, 100, 0, 50); speedRight = speedLeft; if(y > 0) // right-rev { speedRight = speedRight | 0x80; } else // left-rev { speedLeft = speedLeft | 0x80; } } else if(x >= 0 && y<= 0 && abs(x) >= abs(y)) // ahead-left { __println("forward-left"); speedLeft = x+y; speedRight = x; } else if(x >= 0 && y <= 0 && abs(x) < abs(y)) // left-reverse { __println("left-rev"); speedLeft = 100 - min(abs(x), abs(y)); speedLeft = map(speedLeft, 0, 100, 0, 60); speedRight = speedLeft; speedLeft = speedLeft | 0x80; } else if(x >=0 && y >= 0 && abs(x) >= abs(y)) // ahead-right { __println("forward-right"); speedLeft = x; speedRight = x-y; } else if(x >= 0 && y >= 0 && abs(x) < abs(y)) // right-reverse { __println("right-rev"); speedLeft = 100 - min(abs(x), abs(y)); speedLeft = map(speedLeft, 0, 100, 0, 60); speedRight = speedLeft; speedRight = speedRight | 0x80; } else if(x <= 0 && y <= 0 && abs(x) > abs(y)) // back-left { speedRight = 0x80 + abs(x); speedLeft = 0x80 + abs(x) - abs(y); __println("back-left"); } else if(x <= 0 && y >=0 && abs(x) > abs(y)) { speedLeft = 0x80 + abs(x); speedRight = 0x80 + abs(x) - abs(y); __println("back-right"); } else return ; __print("right speed: "); __println(speedRight); __print("left speed: "); __println(speedLeft); sendToRfbee(); } /********************************************************************************************************* ** Function name: setup ** Descriptions: setup *********************************************************************************************************/ void setup() { pinMode(A3, OUTPUT); // turn on power regulation MOSFET digitalWrite(A3, LOW); // RFBEE.init(); comVal1 = getAnalog(A4); comVal2 = getAnalog(A5); __println("init over"); } /********************************************************************************************************* ** Function name: loop ** Descriptions: loop *********************************************************************************************************/ void loop() { val1 = getAnalog(A4) - comVal1; val2 = getAnalog(A5) - comVal2; val1 = constrain(val1, VAL1MIN, VAL1MAX); val2 = constrain(val2, VAL2MIN, VAL2MAX); val1 = map(val1, VAL1MIN, VAL1MAX, 80, -80); val2 = map(val2, VAL2MIN, VAL2MAX, 80, -80); //if((cmpLvc(val1, valbuf1) || cmpLvc(val2, valbuf2))) if(val1 != valbuf1 || val2 != valbuf2) { __print("A4: ");__println(val1); __print("A5: ");__println(val2); makeDirSpeed(val1, val2); __println(); } valbuf1 = val1; valbuf2 = val2; delay(10); } /********************************************************************************************************* END FILE *********************************************************************************************************/
[ "daniel.rios663@myci.csuci.edu" ]
daniel.rios663@myci.csuci.edu
15f66354416b503789a19ac9ab30b72415a1f8ee
e426e7e2f7054adf72c453c77c757d9886ec720f
/GifConvertorLib/src/maker/GIfMaker/GifMaker.cpp
5b20f6fba554f9fc7304ada7fc25c857487af118
[]
no_license
TMAI42/gifMaker
2e4ead7f9336a441b612ead726d82434cf7ecebe
89c8d3047df427e6704eb5d2804f1e811bcc8db2
refs/heads/master
2022-12-15T08:16:45.672198
2020-09-02T11:10:21
2020-09-02T11:10:21
289,280,114
0
0
null
null
null
null
UTF-8
C++
false
false
8,337
cpp
#include "GifMaker.h" extern "C" { #include <libavutil/mathematics.h> #include <libavutil/imgutils.h> #include <libswscale/swscale.h> #include <libavutil/pixdesc.h> } #include <limits> GifMaker::GifMaker(std::string filename, int width, int height, AVPixelFormat inputPixelFormat, int scale, int bitrate, int framerate) :outFormatContext(nullptr, StreamCloser()), codec(nullptr), frameCount(1), pts(std::numeric_limits<int64_t>::min()) { /* allocate the output media context */ InitOutFormatContext(filename); /* Add the video streams using the default format codecs * and initialize the codecs. */ InitCodecAndVideoStream(framerate); /* Now that all the parameters are set, we can open the audio and * video codecs and allocate the necessary encode buffers. */ /* put sample parameters */ outCodecContext->codec_id = outputFormat->video_codec; outCodecContext->bit_rate = bitrate; // resolution must be a multiple of two InitSize(width, height, scale); // frames per second outCodecContext->time_base = { 1,framerate }; outCodecContext->pix_fmt = AV_PIX_FMT_RGB8; //c->gop_size = 10; // emit one intra frame every ten frames //c->max_b_frames=1; int ret = 0; /* open it */ AVDictionary* options = NULL; if ((ret = avcodec_open2(outCodecContext, codec, &options)) < 0) throw std::exception("could not open codec"); /** * Init input frames * Get size of input frame for copy */ size = InitFrames(width, height, inputPixelFormat); #ifdef _DEBUG av_dump_format(outFormatContext.get(), 0, filename.c_str(), 1); #endif /* open the output file, if needed */ if (!(outputFormat->flags & AVFMT_NOFILE)) if ((ret = avio_open(&outFormatContext->pb, filename.c_str(), AVIO_FLAG_WRITE)) < 0) throw std::exception("Could not open file"); /* Write the stream header, if any. */ ret = avformat_write_header(outFormatContext.get(), NULL); if (ret < 0) throw std::exception("Error occurred when opening output file"); /** * Init pixel convertion context * Should be use after InitFrames() */ InitPixelConvertionContext(width, height); } GifMaker::GifMaker(std::string filename,const AVCodecContext* inputcodcecContext, int farmerate, int scale): GifMaker(filename, inputcodcecContext->width, inputcodcecContext->height, inputcodcecContext->pix_fmt, scale, static_cast<int>(inputcodcecContext->bit_rate), farmerate){} void GifMaker::InitOutFormatContext(std::string filename) { AVFormatContext* fmt_cxt {nullptr}; avformat_alloc_output_context2(&fmt_cxt, NULL, NULL, filename.c_str()); if (!fmt_cxt) avformat_alloc_output_context2(&fmt_cxt, NULL, "gif", filename.c_str()); if (!fmt_cxt) throw std::exception("problems with context"); outFormatContext.reset(fmt_cxt); outputFormat = outFormatContext->oformat; } void GifMaker::InitCodecAndVideoStream(int framerate){ if (outputFormat->video_codec != AV_CODEC_ID_NONE) { /* find the video encoder */ codec = avcodec_find_encoder(outputFormat->video_codec); if (!codec) throw std::exception("problems with codec"); videoStream = avformat_new_stream(outFormatContext.get(), codec); if (!videoStream) throw std::exception("problems with video stream"); videoStream->id = outFormatContext->nb_streams - 1; videoStream->time_base = { 1,framerate }; outCodecContext = videoStream->codec; /* Some formats want stream headers to be separate. */ if (outFormatContext->oformat->flags & AVFMT_GLOBALHEADER) outCodecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; } } void GifMaker::InitSize(int width, int height, int scale) { // resolution must be a multiple of two //if (width >= 300 || height >= 300) { // int k = (width > height) ? width : height; int nWidth = width/scale; int nHeight = height/scale; if (nWidth % 2) nWidth--; if (nHeight % 2) nHeight--; outCodecContext->width = nWidth; outCodecContext->height = nHeight; //} //else { // // outCodecContext->width = width; // outCodecContext->height = height; //} } int GifMaker::InitFrames(int width, int height, AVPixelFormat inputPixelFormat) { /*we interested only in inputframe size*/ int size{}; /*Init input frame*/ { std::unique_ptr<AVFrame, FrameDeleter> pictureTmp1{ av_frame_alloc(), FrameDeleter() }; pictureInput.swap(pictureTmp1); } pictureInput->format = inputPixelFormat; if ((size = av_image_alloc(pictureInput->data, pictureInput->linesize, width, height, (AVPixelFormat)pictureInput->format, 32)) < 0) throw std::exception("can not allocate temp frame"); #ifdef _DEBUG else printf("allocated picture of size %d (ptr %x), linesize %d %d %d %d\n", size, pictureInput->data[0], pictureInput->linesize[0], pictureInput->linesize[1], pictureInput->linesize[2], pictureInput->linesize[3]); #endif pictureInput->height = height; pictureInput->width = width; /*Init aditional frame for color convertion */ { std::unique_ptr<AVFrame, FrameDeleter> pictureTmp2{ av_frame_alloc(), FrameDeleter() }; pictureYUV420P.swap(pictureTmp2); } pictureYUV420P->format = AV_PIX_FMT_RGB24; if ((av_image_alloc(pictureYUV420P->data, pictureYUV420P->linesize, width, height, (AVPixelFormat)pictureInput->format, 32)) < 0) throw std::exception("can not allocate temp frame"); #ifdef _DEBUG else printf("allocated picture of size %d (ptr %x), linesize %d %d %d %d\n", 0, pictureYUV420P->data[0], pictureYUV420P->linesize[0], pictureYUV420P->linesize[1], pictureYUV420P->linesize[2], pictureYUV420P->linesize[3]); #endif pictureYUV420P->height = height; pictureYUV420P->width = width; return size; } void GifMaker::InitPixelConvertionContext(int width, int height) { /* get sws context for Input->YUV420P conversion */ swsContextToYUV420P = sws_getContext(width, height, (AVPixelFormat)pictureInput->format, width, height, AV_PIX_FMT_YUV420P, SWS_BILINEAR, NULL, NULL, NULL); /* get sws context for YUV420P->RGB8 conversion */ swsContextToRGB8 = sws_getContext(width, height, AV_PIX_FMT_YUV420P, outCodecContext->width, outCodecContext->height, AV_PIX_FMT_RGB8, SWS_BILINEAR, NULL, NULL, NULL); if (!swsContextToYUV420P || !swsContextToRGB8) throw std::exception("Could not initialize the conversion context"); } void GifMaker::AddFrame(std::unique_ptr<AVFrame, FrameDeleter> frame) { av_frame_copy(pictureInput.get(), frame.get()); std::unique_ptr<AVFrame, FrameDeleter> picture{ av_frame_alloc(), FrameDeleter() }; picture->data[0] = nullptr; picture->linesize[0] = -1; picture->format = outCodecContext->pix_fmt; picture->pts = pts; if (av_image_alloc(picture->data, picture->linesize, outCodecContext->width, outCodecContext->height, (AVPixelFormat)picture->format, 32) < 0) throw std::exception("error allocating with frames"); #ifdef _DEBUG else printf("allocated picture of size %d (ptr %x), linesize %d %d %d %d\n", 0, picture->data[0], picture->linesize[0], picture->linesize[1], picture->linesize[2], picture->linesize[3]); #endif picture->height = outCodecContext->height; picture->width = outCodecContext->width; /* convert input to YUV420P*/ sws_scale(swsContextToYUV420P, pictureInput->data, pictureInput->linesize, 0, frame->height, pictureYUV420P->data, pictureYUV420P->linesize); /* convert YUV420P to RGB8 and scaling*/ sws_scale(swsContextToRGB8, pictureYUV420P->data, pictureYUV420P->linesize, 0, frame->height, picture->data, picture->linesize); /*init packet*/ AVPacket pkt = { 0 }; int got_packet; av_init_packet(&pkt); /* encode the image */ int ret = -1; ret = avcodec_encode_video2(outCodecContext, &pkt, picture.get(), &got_packet); if (ret < 0) throw std::exception("Error encoding video frame"); /* If size is zero, it means the image was buffered. */ if (!ret && got_packet && pkt.size) { pkt.stream_index = videoStream->index; /* Write the compressed frame to the media file. */ ret = av_interleaved_write_frame(outFormatContext.get(), &pkt); } pts += av_rescale_q(1, videoStream->codec->time_base, videoStream->time_base); frameCount++; } void GifMaker::CloseWriteing() { av_write_trailer(outFormatContext.get()); /* Close each codec. */ avcodec_close(videoStream->codec); /* Close the output file. */ if (!(outputFormat->flags & AVFMT_NOFILE)) avio_close(outFormatContext->pb); frameCount = 0; }
[ "andrragon@gmail.com" ]
andrragon@gmail.com
6e49a47788f024f57917d945c3998d07eefe8a2c
d939ea588d1b215261b92013e050993b21651f9a
/tiw/src/v20190919/model/SetWhiteboardPushCallbackResponse.cpp
a973fc9e752402b80ccd49f20db31d7eeefc561d
[ "Apache-2.0" ]
permissive
chenxx98/tencentcloud-sdk-cpp
374e6d1349f8992893ded7aa08f911dd281f1bda
a9e75d321d96504bc3437300d26e371f5f4580a0
refs/heads/master
2023-03-27T05:35:50.158432
2021-03-26T05:18:10
2021-03-26T05:18:10
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,483
cpp
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * 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. */ #include <tencentcloud/tiw/v20190919/model/SetWhiteboardPushCallbackResponse.h> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> using TencentCloud::CoreInternalOutcome; using namespace TencentCloud::Tiw::V20190919::Model; using namespace rapidjson; using namespace std; SetWhiteboardPushCallbackResponse::SetWhiteboardPushCallbackResponse() { } CoreInternalOutcome SetWhiteboardPushCallbackResponse::Deserialize(const string &payload) { Document d; d.Parse(payload.c_str()); if (d.HasParseError() || !d.IsObject()) { return CoreInternalOutcome(Error("response not json format")); } if (!d.HasMember("Response") || !d["Response"].IsObject()) { return CoreInternalOutcome(Error("response `Response` is null or not object")); } Value &rsp = d["Response"]; if (!rsp.HasMember("RequestId") || !rsp["RequestId"].IsString()) { return CoreInternalOutcome(Error("response `Response.RequestId` is null or not string")); } string requestId(rsp["RequestId"].GetString()); SetRequestId(requestId); if (rsp.HasMember("Error")) { if (!rsp["Error"].IsObject() || !rsp["Error"].HasMember("Code") || !rsp["Error"]["Code"].IsString() || !rsp["Error"].HasMember("Message") || !rsp["Error"]["Message"].IsString()) { return CoreInternalOutcome(Error("response `Response.Error` format error").SetRequestId(requestId)); } string errorCode(rsp["Error"]["Code"].GetString()); string errorMsg(rsp["Error"]["Message"].GetString()); return CoreInternalOutcome(Error(errorCode, errorMsg).SetRequestId(requestId)); } return CoreInternalOutcome(true); }
[ "tencentcloudapi@tenent.com" ]
tencentcloudapi@tenent.com
5742815f92bdaff6cc66f0311cab3507eb3d4a37
bf88997b2286473627efe4d0ae3f963a1ae0ddac
/libraries/CZ80Cpu/CMegaZoneSoundGame.h
38d225dfbcffe52549d39f2c80b496f2be3580be
[ "BSD-2-Clause", "Zlib" ]
permissive
prswan/arduino-mega-ict
6cc973094cb71949a261b8641ed549b7b29e80a7
36b1afa81ee1c45a753e35bcdfc18c6540ac0d32
refs/heads/master
2023-07-19T18:13:35.338078
2023-07-10T14:04:38
2023-07-10T14:04:38
37,755,686
20
20
BSD-2-Clause
2021-08-30T18:54:06
2015-06-20T02:59:12
C++
UTF-8
C++
false
false
1,951
h
// // Copyright (c) 2019, Paul R. Swan // 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 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 HOLDER 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. // #ifndef CMegaZoneSoundGame_h #define CMegaZoneSoundGame_h #include "CMegaZoneSoundBaseGame.h" class CMegaZoneSoundGame : public CMegaZoneSoundBaseGame { public: // // Constructors for this game. // static IGame* createInstanceSet1( ); // // IGame Interface - wholly implemented in the Base game. // private: // // Different ROM sets supplied. // CMegaZoneSoundGame( const ROM_DATA2N *romData2n, const ROM_REGION *romRegion ); }; #endif
[ "prswan@gmail.com" ]
prswan@gmail.com