LCOV - code coverage report
Current view: top level - src/components/verilog - bsim4v30nMOS.core.cpp (source / functions) Hit Total Coverage
Test: qucs-core-0.0.19 Code Coverage Lines: 3574 7588 47.1 %
Date: 2015-01-05 16:01:02 Functions: 12 28 42.9 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 566 2378 23.8 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * bsim4v30nMOS.core.cpp - device implementations for bsim4v30nMOS module
       3                 :            :  *
       4                 :            :  * This is free software; you can redistribute it and/or modify
       5                 :            :  * it under the terms of the GNU General Public License as published by
       6                 :            :  * the Free Software Foundation; either version 2, or (at your option)
       7                 :            :  * any later version.
       8                 :            :  *
       9                 :            :  */
      10                 :            : 
      11                 :            : #if HAVE_CONFIG_H
      12                 :            : #include <config.h>
      13                 :            : #endif
      14                 :            : 
      15                 :            : #include "bsim4v30nMOS.analogfunction.h"
      16                 :            : #include "component.h"
      17                 :            : #include "device.h"
      18                 :            : #include "bsim4v30nMOS.core.h"
      19                 :            : 
      20                 :            : #ifndef CIR_bsim4v30nMOS
      21                 :            : #define CIR_bsim4v30nMOS -1
      22                 :            : #endif
      23                 :            : 
      24                 :            : // external nodes
      25                 :            : #define drain 0
      26                 :            : #define gate 1
      27                 :            : #define source 2
      28                 :            : #define bulk 3
      29                 :            : // internal nodes
      30                 :            : #define drainp 4
      31                 :            : #define sourcep 5
      32                 :            : #define gatep 6
      33                 :            : #define gatem 7
      34                 :            : #define drainb 8
      35                 :            : #define sourceb 9
      36                 :            : #define bulkp 10
      37                 :            : 
      38                 :            : // useful macro definitions
      39                 :            : #define NP(node) real (getV (node))
      40                 :            : #define BP(pnode,nnode) (NP(pnode) - NP(nnode))
      41                 :            : #define _load_static_residual2(pnode,nnode,current)\
      42                 :            :         _rhs[pnode] -= current;\
      43                 :            :         _rhs[nnode] += current;
      44                 :            : #define _load_static_augmented_residual2(pnode,nnode,current)\
      45                 :            :         _rhs[pnode] -= current;\
      46                 :            :         _rhs[nnode] += current;
      47                 :            : #define _load_static_residual1(node,current)\
      48                 :            :         _rhs[node] -= current;
      49                 :            : #define _load_static_augmented_residual1(node,current)\
      50                 :            :         _rhs[node] -= current;
      51                 :            : #define _load_static_jacobian4(pnode,nnode,vpnode,vnnode,conductance)\
      52                 :            :         _jstat[pnode][vpnode] += conductance;\
      53                 :            :         _jstat[nnode][vnnode] += conductance;\
      54                 :            :         _jstat[pnode][vnnode] -= conductance;\
      55                 :            :         _jstat[nnode][vpnode] -= conductance;\
      56                 :            :         if (doHB) {\
      57                 :            :         _ghs[pnode] += conductance * BP(vpnode,vnnode);\
      58                 :            :         _ghs[nnode] -= conductance * BP(vpnode,vnnode);\
      59                 :            :         } else {\
      60                 :            :         _rhs[pnode] += conductance * BP(vpnode,vnnode);\
      61                 :            :         _rhs[nnode] -= conductance * BP(vpnode,vnnode);\
      62                 :            :         }
      63                 :            : #define _load_static_jacobian2p(node,vpnode,vnnode,conductance)\
      64                 :            :         _jstat[node][vpnode] += conductance;\
      65                 :            :         _jstat[node][vnnode] -= conductance;\
      66                 :            :         if (doHB) {\
      67                 :            :         _ghs[node] += conductance * BP(vpnode,vnnode);\
      68                 :            :         } else {\
      69                 :            :         _rhs[node] += conductance * BP(vpnode,vnnode);\
      70                 :            :         }
      71                 :            : #define _load_static_jacobian2s(pnode,nnode,node,conductance)\
      72                 :            :         _jstat[pnode][node] += conductance;\
      73                 :            :         _jstat[nnode][node] -= conductance;\
      74                 :            :         if (doHB) {\
      75                 :            :         _ghs[pnode] += conductance * NP(node);\
      76                 :            :         _ghs[nnode] -= conductance * NP(node);\
      77                 :            :         } else {\
      78                 :            :         _rhs[pnode] += conductance * NP(node);\
      79                 :            :         _rhs[nnode] -= conductance * NP(node);\
      80                 :            :         }
      81                 :            : #define _load_static_jacobian1(node,vnode,conductance)\
      82                 :            :         _jstat[node][vnode] += conductance;\
      83                 :            :         if (doHB) {\
      84                 :            :         _ghs[node] += conductance * NP(vnode);\
      85                 :            :         } else {\
      86                 :            :         _rhs[node] += conductance * NP(vnode);\
      87                 :            :         }
      88                 :            : #define _load_dynamic_residual2(pnode,nnode,charge)\
      89                 :            :         if (doTR) _charges[pnode][nnode] += charge;\
      90                 :            :         if (doHB) {\
      91                 :            :         _qhs[pnode] -= charge;\
      92                 :            :         _qhs[nnode] += charge;\
      93                 :            :         }
      94                 :            : #define _load_dynamic_residual1(node,charge)\
      95                 :            :         if (doTR) _charges[node][node] += charge;\
      96                 :            :         if (doHB) {\
      97                 :            :         _qhs[node] -= charge;\
      98                 :            :         }
      99                 :            : #define _load_dynamic_jacobian4(pnode,nnode,vpnode,vnnode,capacitance)\
     100                 :            :         if (doAC) {\
     101                 :            :         _jdyna[pnode][vpnode] += capacitance;\
     102                 :            :         _jdyna[nnode][vnnode] += capacitance;\
     103                 :            :         _jdyna[pnode][vnnode] -= capacitance;\
     104                 :            :         _jdyna[nnode][vpnode] -= capacitance;\
     105                 :            :         }\
     106                 :            :         if (doTR) {\
     107                 :            :         _caps[pnode][nnode][vpnode][vnnode] += capacitance;\
     108                 :            :         }\
     109                 :            :         if (doHB) {\
     110                 :            :         _chs[pnode] += capacitance * BP(vpnode,vnnode);\
     111                 :            :         _chs[nnode] -= capacitance * BP(vpnode,vnnode);\
     112                 :            :         }
     113                 :            : #define _load_dynamic_jacobian2s(pnode,nnode,vnode,capacitance)\
     114                 :            :         if (doAC) {\
     115                 :            :         _jdyna[pnode][vnode] += capacitance;\
     116                 :            :         _jdyna[nnode][vnode] -= capacitance;\
     117                 :            :         }\
     118                 :            :         if (doTR) {\
     119                 :            :         _caps[pnode][nnode][vnode][vnode] += capacitance;\
     120                 :            :         }\
     121                 :            :         if (doHB) {\
     122                 :            :         _chs[pnode] += capacitance * NP(vnode);\
     123                 :            :         _chs[nnode] -= capacitance * NP(vnode);\
     124                 :            :         }
     125                 :            : #define _load_dynamic_jacobian2p(node,vpnode,vnnode,capacitance)\
     126                 :            :         if (doAC) {\
     127                 :            :         _jdyna[node][vpnode] += capacitance;\
     128                 :            :         _jdyna[node][vnnode] -= capacitance;\
     129                 :            :         }\
     130                 :            :         if (doTR) {\
     131                 :            :         _caps[node][node][vpnode][vnnode] += capacitance;\
     132                 :            :         }\
     133                 :            :         if (doHB) {\
     134                 :            :         _chs[node] += capacitance * BP(vpnode,vnnode);\
     135                 :            :         }
     136                 :            : #define _load_dynamic_jacobian1(node,vnode,capacitance)\
     137                 :            :         if (doAC) {\
     138                 :            :         _jdyna[node][vnode] += capacitance;\
     139                 :            :         }\
     140                 :            :         if (doTR) {\
     141                 :            :         _caps[node][node][vnode][vnode] += capacitance;\
     142                 :            :         }\
     143                 :            :         if (doHB) {\
     144                 :            :         _chs[node] += capacitance * NP(vnode);\
     145                 :            :         }
     146                 :            : 
     147                 :            : #define _save_whitenoise1(n1,pwr,type)\
     148                 :            :         _white_pwr[n1][n1] += pwr;
     149                 :            : #define _save_whitenoise2(n1,n2,pwr,type)\
     150                 :            :         _white_pwr[n1][n2] += pwr;
     151                 :            : #define _save_flickernoise1(n1,pwr,exp,type)\
     152                 :            :         _flicker_pwr[n1][n1] += pwr;\
     153                 :            :         _flicker_exp[n1][n1] += exp;
     154                 :            : #define _save_flickernoise2(n1,n2,pwr,exp,type)\
     155                 :            :         _flicker_pwr[n1][n2] += pwr;\
     156                 :            :         _flicker_exp[n1][n2] += exp;
     157                 :            : #define _load_whitenoise2(n1,n2,pwr)\
     158                 :            :         cy (n1,n2) -= pwr/kB/T0; cy (n2,n1) -= pwr/kB/T0;\
     159                 :            :         cy (n1,n1) += pwr/kB/T0; cy (n2,n2) += pwr/kB/T0;
     160                 :            : #define _load_whitenoise1(n1,pwr)\
     161                 :            :         cy (n1,n1) += pwr/kB/T0;
     162                 :            : #define _load_flickernoise2(n1,n2,pwr,exp)\
     163                 :            :         cy (n1,n2) -= pwr*pow(_freq,-exp)/kB/T0;\
     164                 :            :         cy (n2,n1) -= pwr*pow(_freq,-exp)/kB/T0;\
     165                 :            :         cy (n1,n1) += pwr*pow(_freq,-exp)/kB/T0;\
     166                 :            :         cy (n2,n2) += pwr*pow(_freq,-exp)/kB/T0;
     167                 :            : #define _load_flickernoise1(n1,pwr,exp)\
     168                 :            :         cy (n1,n1) += pwr*pow(_freq,-exp)/kB/T0;
     169                 :            : 
     170                 :            : // derivative helper macros
     171                 :            : // transcendental LRM p. 59
     172                 :            : #define m00_cos(v00,x)          v00 = cos(x);
     173                 :            : #define m10_cos(v10,v00,x)      v10 = (-sin(x));
     174                 :            : #define m00_sin(v00,x)          v00 = sin(x);
     175                 :            : #define m10_sin(v10,v00,x)      v10 = (cos(x));
     176                 :            : #define m00_tan(v00,x)          v00 = tan(x);
     177                 :            : #define m10_tan(v10,v00,x)      v10 = (1.0/cos(x)/cos(x));
     178                 :            : #define m00_cosh(v00,x)         v00 = cosh(x);
     179                 :            : #define m10_cosh(v10,v00,x)     v10 = (sinh(x));
     180                 :            : #define m00_sinh(v00,x)         v00 = sinh(x);
     181                 :            : #define m10_sinh(v10,v00,x)     v10 = (cosh(x));
     182                 :            : #define m00_tanh(v00,x)         v00 = tanh(x);
     183                 :            : #define m10_tanh(v10,v00,x)     v10 = (1.0/cosh(x)/cosh(x));
     184                 :            : #define m00_acos(v00,x)         v00 = acos(x);
     185                 :            : #define m10_acos(v10,v00,x)     v10 = (-1.0/sqrt(1-x*x));
     186                 :            : #define m00_asin(v00,x)         v00 = asin(x);
     187                 :            : #define m10_asin(v10,v00,x)     v10 = (+1.0/sqrt(1-x*x));
     188                 :            : #define m00_atan(v00,x)         v00 = atan(x);
     189                 :            : #define m10_atan(v10,v00,x)     v10 = (+1.0/(1+x*x));
     190                 :            : #define m00_hypot(v00,x,y)      v00 = sqrt((x)*(x)+(y)*(y));
     191                 :            : #define m10_hypot(v10,v00,x,y)  v10 = (x)/(v00);
     192                 :            : #define m11_hypot(v11,v00,x,y)  v11 = (y)/(v00);
     193                 :            : #define m00_atan2(v00,x,y)      v00 = atan2(x,y);
     194                 :            : // TODO atan2 derivatives ?
     195                 :            : #define m00_acosh(v00,x)        v00 = acosh(x);
     196                 :            : #define m10_acosh(v10,v00,x)    v10 = (1.0/(sqrt(x-1)*sqrt(x+1)));
     197                 :            : #define m00_asinh(v00,x)        v00 = asinh(x);
     198                 :            : #define m10_asinh(v10,v00,x)    v10 = (1.0/(sqrt(x*x+1)));
     199                 :            : #define m00_atanh(v00,x)        v00 = atanh(x);
     200                 :            : #define m10_atanh(v10,v00,x)    v10 = (1.0/(1-x*x));
     201                 :            : 
     202                 :            : 
     203                 :            : // standard functions LRM p.58
     204                 :            : #define m00_logE(v00,x)         v00 = log(x);
     205                 :            : #define m10_logE(v10,v00,x)     v10 = (1.0/x);
     206                 :            : #define m00_log10(v00,x)        v00 = log10(x);
     207                 :            : #define m10_log10(v10,v00,x)    v10 = (1.0/x/M_LN10);
     208                 :            : #define m00_exp(v00,x)          v00 = exp(x);
     209                 :            : #define m10_exp(v10,v00,x)      v10 = v00;
     210                 :            : #define m00_sqrt(v00,x)         v00 = sqrt(x);
     211                 :            : #define m10_sqrt(v10,v00,x)     v10 = (0.5/v00);
     212                 :            : #define m00_min(v00,x,y)        v00 = ((x)<(y))?(x):(y);
     213                 :            : #define m10_min(v10,v00,x,y)    v10 = ((x)<(y))?1.0:0.0;
     214                 :            : #define m11_min(v11,v00,x,y)    v11 = ((x)<(y))?0.0:1.0;
     215                 :            : #define m00_max(v00,x,y)        v00 = ((x)>(y))?(x):(y);
     216                 :            : #define m10_max(v10,v00,x,y)    v10 = ((x)>(y))?1.0:0.0;
     217                 :            : #define m11_max(v11,v00,x,y)    v11 = ((x)>(y))?0.0:1.0;
     218                 :            : #define m00_pow(v00,x,y)        v00 = pow(x,y);
     219                 :            : #define m10_pow(v10,v00,x,y)    v10 = (x==0.0)?0.0:(v00)*(y)/(x);
     220                 :            : #define m11_pow(v11,v00,x,y)    v11 = (x==0.0)?0.0:(log(x)*(v00));
     221                 :            : #define m00_abs(v00,x)          v00 = ((x)<(0)?(-(x)):(x));
     222                 :            : #define m10_abs(v10,v00,x)      v10 = (((x)>=0)?(+1.0):(-1.0));
     223                 :            : #define m00_floor(v00,x)        v00 = floor(x);
     224                 :            : #define m10_floor(v10,v00,x)    v10 = 1.0;
     225                 :            : 
     226                 :            : #define m00_ceil(v00,x)         v00 = ceil(x);
     227                 :            : // TODO ceil derivative, needed?
     228                 :            : 
     229                 :            : // analog operator, LRM p.61
     230                 :            : #define m00_limexp(v00,x)       v00 = ((x)<80.0?exp(x):exp(80.0)*(x-79.0));
     231                 :            : #define m10_limexp(v10,v00,x)   v10 = ((x)<80.0?(v00):exp(80.0));
     232                 :            : 
     233                 :            : // analog kernel parameter system functions, LRM p.215
     234                 :            : #define m00_vt(x)               (kBoverQ*(x))
     235                 :            : #define m10_vt(x)               (kBoverQ)
     236                 :            : 
     237                 :            : // extra functions (?)
     238                 :            : #define m00_div(v00,v10,x,y)    double v10=1/(y); double v00=(x)*v10;
     239                 :            : #define m10_div(v10,v00,vv,x,y)
     240                 :            : #define m11_div(v11,v00,vv,x,y) double v11 = -v00*vv;
     241                 :            : #define m00_mult(v00,v10,v11,x,y) double v10=(x); double v11=(y); double v00=v10*v11;
     242                 :            : #define m00_add(v00,x,y)        double v00=(x)+(y);
     243                 :            : 
     244                 :            : // second derivatives
     245                 :            : #define m20_logE(v00)           (-1.0/v00/v00)
     246                 :            : #define m20_exp(v00)            exp(v00)
     247                 :            : #define m20_limexp(v00)         ((v00)<80.0?exp(v00):0.0)
     248                 :            : #define m20_sqrt(v00)           (-0.25/(v00)/sqrt(v00))
     249                 :            : #define m20_abs(v00)           0.0
     250                 :            : #define m20_pow(x,y)            ((y)*((y)-1.0)*pow(x,y)/(x)/(x))
     251                 :            : 
     252                 :            : 
     253                 :            : // simulator specific definitions
     254                 :            : #define _modelname              "bsim4v30nMOS"
     255                 :            : #define _instancename           getName()
     256                 :            : #define _circuit_temp           (getPropertyDouble("Temp")+273.15)
     257                 :            : #define _param_given(p)         (isPropertyGiven(p)?1:0)
     258                 :            : 
     259                 :            : 
     260                 :            : // $vt and $vt() functions
     261                 :            : #define _vt_nom                 (kBoverQ*_circuit_temp)
     262                 :            : 
     263                 :            : using namespace qucs::device;
     264                 :            : using qucs::matrix;
     265                 :            : 
     266                 :            : /* Device constructor. */
     267                 :          4 : bsim4v30nMOS::bsim4v30nMOS() : circuit (11)
     268                 :            : {
     269                 :          4 :   type = CIR_bsim4v30nMOS;
     270                 :          4 : }
     271                 :            : 
     272                 :            : /* Initialization of model. */
     273                 :       2000 : void bsim4v30nMOS::initModel (void)
     274                 :            : {
     275                 :            :   // create internal nodes
     276                 :       2000 :   setInternalNode (drainp, "drainp");
     277                 :       2000 :   setInternalNode (sourcep, "sourcep");
     278                 :       2000 :   setInternalNode (gatep, "gatep");
     279                 :       2000 :   setInternalNode (gatem, "gatem");
     280                 :       2000 :   setInternalNode (drainb, "drainb");
     281                 :       2000 :   setInternalNode (sourceb, "sourceb");
     282                 :       2000 :   setInternalNode (bulkp, "bulkp");
     283                 :            : 
     284                 :            :   // get device model parameters
     285                 :       2000 :   loadVariables ();
     286                 :            :   // evaluate global model equations
     287                 :       2000 :   initializeModel ();
     288                 :            :   // evaluate initial step equations
     289                 :       2000 :   initialStep ();
     290                 :            :   // evaluate global instance equations
     291                 :       2000 :   initializeInstance ();
     292                 :       2000 : }
     293                 :            : 
     294                 :            : /* Initialization of DC analysis. */
     295                 :       2000 : void bsim4v30nMOS::initDC (void)
     296                 :            : {
     297                 :       2000 :   allocMatrixMNA ();
     298                 :       2000 :   initModel ();
     299                 :       2000 :   pol = 1;
     300                 :       2000 :   restartDC ();
     301                 :       2000 :   doAC = 1;
     302                 :       2000 :   doTR = 0;
     303                 :       2000 :   doHB = 0;
     304                 :       2000 : }
     305                 :            : 
     306                 :            : /* Run when DC is restarted (fallback algorithms). */
     307                 :       2000 : void bsim4v30nMOS::restartDC (void)
     308                 :            : {
     309                 :       2000 : }
     310                 :            : 
     311                 :            : /* Initialize Verilog-AMS code. */
     312                 :       7356 : void bsim4v30nMOS::initVerilog (void)
     313                 :            : {
     314                 :            :   // initialization of noise variables
     315                 :       7356 :   _white_pwr[sourcep][source] = 0.0;
     316                 :       7356 :   _white_pwr[drain][drainp] = 0.0;
     317                 :       7356 :   _white_pwr[drainp][sourcep] = 0.0;
     318                 :       7356 :   _flicker_pwr[drainp][sourcep] = 0.0;
     319                 :       7356 :   _flicker_exp[drainp][sourcep] = 0.0;
     320                 :            : 
     321                 :            :   int i1, i2, i3, i4;
     322                 :            : 
     323                 :            :   // zero charges
     324         [ +  + ]:      88272 :   for (i1 = 0; i1 < 11; i1++) {
     325         [ +  + ]:     970992 :   for (i2 = 0; i2 < 11; i2++) {
     326                 :     890076 :     _charges[i1][i2] = 0.0;
     327                 :            :   } }
     328                 :            : 
     329                 :            :   // zero capacitances
     330         [ +  + ]:      88272 :   for (i1 = 0; i1 < 11; i1++) {
     331         [ +  + ]:     970992 :   for (i2 = 0; i2 < 11; i2++) {
     332         [ +  + ]:   10680912 :   for (i3 = 0; i3 < 11; i3++) {
     333         [ +  + ]:  117490032 :   for (i4 = 0; i4 < 11; i4++) {
     334                 :  107699196 :     _caps[i1][i2][i3][i4] = 0.0;
     335                 :            :   } } } }
     336                 :            : 
     337                 :            :   // zero right hand side, static and dynamic jacobian
     338         [ +  + ]:      88272 :   for (i1 = 0; i1 < 11; i1++) {
     339                 :      80916 :     _rhs[i1] = 0.0;
     340                 :      80916 :     _qhs[i1] = 0.0;
     341                 :      80916 :     _chs[i1] = 0.0;
     342                 :      80916 :     _ghs[i1] = 0.0;
     343         [ +  + ]:     970992 :     for (i2 = 0; i2 < 11; i2++) {
     344                 :     890076 :       _jstat[i1][i2] = 0.0;
     345                 :     890076 :       _jdyna[i1][i2] = 0.0;
     346                 :            :     }
     347                 :            :   }
     348                 :       7356 : }
     349                 :            : 
     350                 :            : /* Load device model input parameters. */
     351                 :       2000 : void bsim4v30nMOS::loadVariables (void)
     352                 :            : {
     353                 :       2000 :   GMIN = getPropertyDouble ("GMIN");
     354                 :       2000 :   PS = getPropertyDouble ("PS");
     355                 :       2000 :   PD = getPropertyDouble ("PD");
     356                 :       2000 :   AS = getPropertyDouble ("AS");
     357                 :       2000 :   AD = getPropertyDouble ("AD");
     358                 :       2000 :   CGBO = getPropertyDouble ("CGBO");
     359                 :       2000 :   CGDO = getPropertyDouble ("CGDO");
     360                 :       2000 :   CGSO = getPropertyDouble ("CGSO");
     361                 :       2000 :   L = getPropertyDouble ("L");
     362                 :       2000 :   W = getPropertyDouble ("W");
     363                 :       2000 :   MOBMOD = getPropertyDouble ("MOBMOD");
     364                 :       2000 :   RDSMOD = getPropertyDouble ("RDSMOD");
     365                 :       2000 :   IGCMOD = getPropertyDouble ("IGCMOD");
     366                 :       2000 :   IGBMOD = getPropertyDouble ("IGBMOD");
     367                 :       2000 :   CAPMOD = getPropertyDouble ("CAPMOD");
     368                 :       2000 :   RGATEMOD = getPropertyDouble ("RGATEMOD");
     369                 :       2000 :   RBODYMOD = getPropertyDouble ("RBODYMOD");
     370                 :       2000 :   DIOMOD = getPropertyDouble ("DIOMOD");
     371                 :       2000 :   TEMPMOD = getPropertyDouble ("TEMPMOD");
     372                 :       2000 :   GEOMOD = getPropertyDouble ("GEOMOD");
     373                 :       2000 :   RGEOMOD = getPropertyDouble ("RGEOMOD");
     374                 :       2000 :   PERMOD = getPropertyDouble ("PERMOD");
     375                 :       2000 :   TNOIMOD = getPropertyDouble ("TNOIMOD");
     376                 :       2000 :   FNOIMOD = getPropertyDouble ("FNOIMOD");
     377                 :       2000 :   EPSROX = getPropertyDouble ("EPSROX");
     378                 :       2000 :   TOXE = getPropertyDouble ("TOXE");
     379                 :       2000 :   TOXP = getPropertyDouble ("TOXP");
     380                 :       2000 :   TOXM = getPropertyDouble ("TOXM");
     381                 :       2000 :   DTOX = getPropertyDouble ("DTOX");
     382                 :       2000 :   XJ = getPropertyDouble ("XJ");
     383                 :       2000 :   GAMMA1 = getPropertyDouble ("GAMMA1");
     384                 :       2000 :   GAMMA2 = getPropertyDouble ("GAMMA2");
     385                 :       2000 :   NDEP = getPropertyDouble ("NDEP");
     386                 :       2000 :   NSUB = getPropertyDouble ("NSUB");
     387                 :       2000 :   NGATE = getPropertyDouble ("NGATE");
     388                 :       2000 :   NSD = getPropertyDouble ("NSD");
     389                 :       2000 :   VBX = getPropertyDouble ("VBX");
     390                 :       2000 :   XT = getPropertyDouble ("XT");
     391                 :       2000 :   RSH = getPropertyDouble ("RSH");
     392                 :       2000 :   RSHG = getPropertyDouble ("RSHG");
     393                 :       2000 :   VTH0 = getPropertyDouble ("VTH0");
     394                 :       2000 :   VFB = getPropertyDouble ("VFB");
     395                 :       2000 :   PHIN = getPropertyDouble ("PHIN");
     396                 :       2000 :   K1 = getPropertyDouble ("K1");
     397                 :       2000 :   K2 = getPropertyDouble ("K2");
     398                 :       2000 :   K3 = getPropertyDouble ("K3");
     399                 :       2000 :   K3B = getPropertyDouble ("K3B");
     400                 :       2000 :   W0 = getPropertyDouble ("W0");
     401                 :       2000 :   LPE0 = getPropertyDouble ("LPE0");
     402                 :       2000 :   LPEB = getPropertyDouble ("LPEB");
     403                 :       2000 :   VBM = getPropertyDouble ("VBM");
     404                 :       2000 :   DVT0 = getPropertyDouble ("DVT0");
     405                 :       2000 :   DVT1 = getPropertyDouble ("DVT1");
     406                 :       2000 :   DVT2 = getPropertyDouble ("DVT2");
     407                 :       2000 :   DVTP0 = getPropertyDouble ("DVTP0");
     408                 :       2000 :   DVTP1 = getPropertyDouble ("DVTP1");
     409                 :       2000 :   DVT0W = getPropertyDouble ("DVT0W");
     410                 :       2000 :   DVT1W = getPropertyDouble ("DVT1W");
     411                 :       2000 :   DVT2W = getPropertyDouble ("DVT2W");
     412                 :       2000 :   U0 = getPropertyDouble ("U0");
     413                 :       2000 :   UA = getPropertyDouble ("UA");
     414                 :       2000 :   UB = getPropertyDouble ("UB");
     415                 :       2000 :   UC = getPropertyDouble ("UC");
     416                 :       2000 :   EU = getPropertyDouble ("EU");
     417                 :       2000 :   VSAT = getPropertyDouble ("VSAT");
     418                 :       2000 :   A0 = getPropertyDouble ("A0");
     419                 :       2000 :   AGS = getPropertyDouble ("AGS");
     420                 :       2000 :   B0 = getPropertyDouble ("B0");
     421                 :       2000 :   B1 = getPropertyDouble ("B1");
     422                 :       2000 :   KETA = getPropertyDouble ("KETA");
     423                 :       2000 :   A1 = getPropertyDouble ("A1");
     424                 :       2000 :   A2 = getPropertyDouble ("A2");
     425                 :       2000 :   WINT = getPropertyDouble ("WINT");
     426                 :       2000 :   LINT = getPropertyDouble ("LINT");
     427                 :       2000 :   DWG = getPropertyDouble ("DWG");
     428                 :       2000 :   DWB = getPropertyDouble ("DWB");
     429                 :       2000 :   VOFF = getPropertyDouble ("VOFF");
     430                 :       2000 :   VOFFL = getPropertyDouble ("VOFFL");
     431                 :       2000 :   MINV = getPropertyDouble ("MINV");
     432                 :       2000 :   NFACTOR = getPropertyDouble ("NFACTOR");
     433                 :       2000 :   ETA0 = getPropertyDouble ("ETA0");
     434                 :       2000 :   ETAB = getPropertyDouble ("ETAB");
     435                 :       2000 :   DROUT = getPropertyDouble ("DROUT");
     436                 :       2000 :   DSUB = getPropertyDouble ("DSUB");
     437                 :       2000 :   CIT = getPropertyDouble ("CIT");
     438                 :       2000 :   CDSC = getPropertyDouble ("CDSC");
     439                 :       2000 :   CDSCB = getPropertyDouble ("CDSCB");
     440                 :       2000 :   CDSCD = getPropertyDouble ("CDSCD");
     441                 :       2000 :   PCLM = getPropertyDouble ("PCLM");
     442                 :       2000 :   PDIBL1 = getPropertyDouble ("PDIBL1");
     443                 :       2000 :   PDIBL2 = getPropertyDouble ("PDIBL2");
     444                 :       2000 :   PDIBLB = getPropertyDouble ("PDIBLB");
     445                 :       2000 :   PSCBE1 = getPropertyDouble ("PSCBE1");
     446                 :       2000 :   PSCBE2 = getPropertyDouble ("PSCBE2");
     447                 :       2000 :   PVAG = getPropertyDouble ("PVAG");
     448                 :       2000 :   DELTA = getPropertyDouble ("DELTA");
     449                 :       2000 :   FPROUT = getPropertyDouble ("FPROUT");
     450                 :       2000 :   PDITS = getPropertyDouble ("PDITS");
     451                 :       2000 :   PDITSD = getPropertyDouble ("PDITSD");
     452                 :       2000 :   PDITSL = getPropertyDouble ("PDITSL");
     453                 :       2000 :   LAMBDA = getPropertyDouble ("LAMBDA");
     454                 :       2000 :   VTL = getPropertyDouble ("VTL");
     455                 :       2000 :   LC = getPropertyDouble ("LC");
     456                 :       2000 :   XN = getPropertyDouble ("XN");
     457                 :       2000 :   RDSW = getPropertyDouble ("RDSW");
     458                 :       2000 :   RDSWMIN = getPropertyDouble ("RDSWMIN");
     459                 :       2000 :   RDW = getPropertyDouble ("RDW");
     460                 :       2000 :   RDWMIN = getPropertyDouble ("RDWMIN");
     461                 :       2000 :   RSW = getPropertyDouble ("RSW");
     462                 :       2000 :   RSWMIN = getPropertyDouble ("RSWMIN");
     463                 :       2000 :   PRWG = getPropertyDouble ("PRWG");
     464                 :       2000 :   PRWB = getPropertyDouble ("PRWB");
     465                 :       2000 :   WR = getPropertyDouble ("WR");
     466                 :       2000 :   NRS = getPropertyDouble ("NRS");
     467                 :       2000 :   NRD = getPropertyDouble ("NRD");
     468                 :       2000 :   ALPHA0 = getPropertyDouble ("ALPHA0");
     469                 :       2000 :   ALPHA1 = getPropertyDouble ("ALPHA1");
     470                 :       2000 :   BETA0 = getPropertyDouble ("BETA0");
     471                 :       2000 :   AGIDL = getPropertyDouble ("AGIDL");
     472                 :       2000 :   BGIDL = getPropertyDouble ("BGIDL");
     473                 :       2000 :   CGIDL = getPropertyDouble ("CGIDL");
     474                 :       2000 :   EGIDL = getPropertyDouble ("EGIDL");
     475                 :       2000 :   AIGBACC = getPropertyDouble ("AIGBACC");
     476                 :       2000 :   BIGBACC = getPropertyDouble ("BIGBACC");
     477                 :       2000 :   CIGBACC = getPropertyDouble ("CIGBACC");
     478                 :       2000 :   NIGBACC = getPropertyDouble ("NIGBACC");
     479                 :       2000 :   AIGBINV = getPropertyDouble ("AIGBINV");
     480                 :       2000 :   BIGBINV = getPropertyDouble ("BIGBINV");
     481                 :       2000 :   CIGBINV = getPropertyDouble ("CIGBINV");
     482                 :       2000 :   EIGBINV = getPropertyDouble ("EIGBINV");
     483                 :       2000 :   NIGBINV = getPropertyDouble ("NIGBINV");
     484                 :       2000 :   AIGC = getPropertyDouble ("AIGC");
     485                 :       2000 :   BIGC = getPropertyDouble ("BIGC");
     486                 :       2000 :   CIGC = getPropertyDouble ("CIGC");
     487                 :       2000 :   AIGSD = getPropertyDouble ("AIGSD");
     488                 :       2000 :   BIGSD = getPropertyDouble ("BIGSD");
     489                 :       2000 :   CIGSD = getPropertyDouble ("CIGSD");
     490                 :       2000 :   DLCIG = getPropertyDouble ("DLCIG");
     491                 :       2000 :   NIGC = getPropertyDouble ("NIGC");
     492                 :       2000 :   POXEDGE = getPropertyDouble ("POXEDGE");
     493                 :       2000 :   PIGCD = getPropertyDouble ("PIGCD");
     494                 :       2000 :   NTOX = getPropertyDouble ("NTOX");
     495                 :       2000 :   TOXREF = getPropertyDouble ("TOXREF");
     496                 :       2000 :   XPART = getPropertyDouble ("XPART");
     497                 :       2000 :   CGS0 = getPropertyDouble ("CGS0");
     498                 :       2000 :   CGD0 = getPropertyDouble ("CGD0");
     499                 :       2000 :   CGB0 = getPropertyDouble ("CGB0");
     500                 :       2000 :   CGSL = getPropertyDouble ("CGSL");
     501                 :       2000 :   CGDL = getPropertyDouble ("CGDL");
     502                 :       2000 :   CKAPPAS = getPropertyDouble ("CKAPPAS");
     503                 :       2000 :   CKAPPAD = getPropertyDouble ("CKAPPAD");
     504                 :       2000 :   CF = getPropertyDouble ("CF");
     505                 :       2000 :   CLC = getPropertyDouble ("CLC");
     506                 :       2000 :   CLE = getPropertyDouble ("CLE");
     507                 :       2000 :   DLC = getPropertyDouble ("DLC");
     508                 :       2000 :   DWC = getPropertyDouble ("DWC");
     509                 :       2000 :   VFBCV = getPropertyDouble ("VFBCV");
     510                 :       2000 :   NOFF = getPropertyDouble ("NOFF");
     511                 :       2000 :   VOFFCV = getPropertyDouble ("VOFFCV");
     512                 :       2000 :   ACDE = getPropertyDouble ("ACDE");
     513                 :       2000 :   MOIN = getPropertyDouble ("MOIN");
     514                 :       2000 :   XRCRG1 = getPropertyDouble ("XRCRG1");
     515                 :       2000 :   XRCRG2 = getPropertyDouble ("XRCRG2");
     516                 :       2000 :   RBPB = getPropertyDouble ("RBPB");
     517                 :       2000 :   RBPD = getPropertyDouble ("RBPD");
     518                 :       2000 :   RBPS = getPropertyDouble ("RBPS");
     519                 :       2000 :   RBDB = getPropertyDouble ("RBDB");
     520                 :       2000 :   RBSB = getPropertyDouble ("RBSB");
     521                 :       2000 :   GBMIN = getPropertyDouble ("GBMIN");
     522                 :       2000 :   DMCG = getPropertyDouble ("DMCG");
     523                 :       2000 :   DMCI = getPropertyDouble ("DMCI");
     524                 :       2000 :   DMDG = getPropertyDouble ("DMDG");
     525                 :       2000 :   DMCGT = getPropertyDouble ("DMCGT");
     526                 :       2000 :   NF = getPropertyDouble ("NF");
     527                 :       2000 :   DWJ = getPropertyDouble ("DWJ");
     528                 :       2000 :   MIN = getPropertyDouble ("MIN");
     529                 :       2000 :   XGW = getPropertyDouble ("XGW");
     530                 :       2000 :   XGL = getPropertyDouble ("XGL");
     531                 :       2000 :   XL = getPropertyDouble ("XL");
     532                 :       2000 :   XW = getPropertyDouble ("XW");
     533                 :       2000 :   NGCON = getPropertyDouble ("NGCON");
     534                 :       2000 :   IJTHSREV = getPropertyDouble ("IJTHSREV");
     535                 :       2000 :   IJTHDREV = getPropertyDouble ("IJTHDREV");
     536                 :       2000 :   IJTHSFWD = getPropertyDouble ("IJTHSFWD");
     537                 :       2000 :   IJTHDFWD = getPropertyDouble ("IJTHDFWD");
     538                 :       2000 :   XJBVS = getPropertyDouble ("XJBVS");
     539                 :       2000 :   XJBVD = getPropertyDouble ("XJBVD");
     540                 :       2000 :   BVS = getPropertyDouble ("BVS");
     541                 :       2000 :   BVD = getPropertyDouble ("BVD");
     542                 :       2000 :   JSS = getPropertyDouble ("JSS");
     543                 :       2000 :   JSD = getPropertyDouble ("JSD");
     544                 :       2000 :   JSWS = getPropertyDouble ("JSWS");
     545                 :       2000 :   JSWD = getPropertyDouble ("JSWD");
     546                 :       2000 :   JSWGS = getPropertyDouble ("JSWGS");
     547                 :       2000 :   JSWGD = getPropertyDouble ("JSWGD");
     548                 :       2000 :   CJS = getPropertyDouble ("CJS");
     549                 :       2000 :   CJD = getPropertyDouble ("CJD");
     550                 :       2000 :   MJS = getPropertyDouble ("MJS");
     551                 :       2000 :   MJD = getPropertyDouble ("MJD");
     552                 :       2000 :   MJSWS = getPropertyDouble ("MJSWS");
     553                 :       2000 :   MJSWD = getPropertyDouble ("MJSWD");
     554                 :       2000 :   CJSWS = getPropertyDouble ("CJSWS");
     555                 :       2000 :   CJSWD = getPropertyDouble ("CJSWD");
     556                 :       2000 :   CJSWGS = getPropertyDouble ("CJSWGS");
     557                 :       2000 :   CJSWGD = getPropertyDouble ("CJSWGD");
     558                 :       2000 :   MJSWGS = getPropertyDouble ("MJSWGS");
     559                 :       2000 :   MJSWGD = getPropertyDouble ("MJSWGD");
     560                 :       2000 :   PBS = getPropertyDouble ("PBS");
     561                 :       2000 :   PBD = getPropertyDouble ("PBD");
     562                 :       2000 :   PBSWS = getPropertyDouble ("PBSWS");
     563                 :       2000 :   PBSWD = getPropertyDouble ("PBSWD");
     564                 :       2000 :   PBSWGS = getPropertyDouble ("PBSWGS");
     565                 :       2000 :   PBSWGD = getPropertyDouble ("PBSWGD");
     566                 :       2000 :   TNOM = getPropertyDouble ("TNOM");
     567                 :       2000 :   UTE = getPropertyDouble ("UTE");
     568                 :       2000 :   KT1 = getPropertyDouble ("KT1");
     569                 :       2000 :   KT1L = getPropertyDouble ("KT1L");
     570                 :       2000 :   KT2 = getPropertyDouble ("KT2");
     571                 :       2000 :   UA1 = getPropertyDouble ("UA1");
     572                 :       2000 :   UB1 = getPropertyDouble ("UB1");
     573                 :       2000 :   UC1 = getPropertyDouble ("UC1");
     574                 :       2000 :   AT = getPropertyDouble ("AT");
     575                 :       2000 :   PRT = getPropertyDouble ("PRT");
     576                 :       2000 :   NJS = getPropertyDouble ("NJS");
     577                 :       2000 :   NJD = getPropertyDouble ("NJD");
     578                 :       2000 :   XTIS = getPropertyDouble ("XTIS");
     579                 :       2000 :   XTID = getPropertyDouble ("XTID");
     580                 :       2000 :   TPB = getPropertyDouble ("TPB");
     581                 :       2000 :   TPBSW = getPropertyDouble ("TPBSW");
     582                 :       2000 :   TPBSWG = getPropertyDouble ("TPBSWG");
     583                 :       2000 :   TCJ = getPropertyDouble ("TCJ");
     584                 :       2000 :   TCJSW = getPropertyDouble ("TCJSW");
     585                 :       2000 :   TCJSWG = getPropertyDouble ("TCJSWG");
     586                 :       2000 :   SA = getPropertyDouble ("SA");
     587                 :       2000 :   SB = getPropertyDouble ("SB");
     588                 :       2000 :   SD = getPropertyDouble ("SD");
     589                 :       2000 :   SAREF = getPropertyDouble ("SAREF");
     590                 :       2000 :   SBREF = getPropertyDouble ("SBREF");
     591                 :       2000 :   WLOD = getPropertyDouble ("WLOD");
     592                 :       2000 :   KU0 = getPropertyDouble ("KU0");
     593                 :       2000 :   KVSAT = getPropertyDouble ("KVSAT");
     594                 :       2000 :   TKU0 = getPropertyDouble ("TKU0");
     595                 :       2000 :   LKU0 = getPropertyDouble ("LKU0");
     596                 :       2000 :   WKU0 = getPropertyDouble ("WKU0");
     597                 :       2000 :   PKU0 = getPropertyDouble ("PKU0");
     598                 :       2000 :   LLODKU0 = getPropertyDouble ("LLODKU0");
     599                 :       2000 :   WLODKU0 = getPropertyDouble ("WLODKU0");
     600                 :       2000 :   KVTH0 = getPropertyDouble ("KVTH0");
     601                 :       2000 :   LKVTH0 = getPropertyDouble ("LKVTH0");
     602                 :       2000 :   WKVTH0 = getPropertyDouble ("WKVTH0");
     603                 :       2000 :   PKVTH0 = getPropertyDouble ("PKVTH0");
     604                 :       2000 :   LLODVTH = getPropertyDouble ("LLODVTH");
     605                 :       2000 :   WLODVTH = getPropertyDouble ("WLODVTH");
     606                 :       2000 :   STK2 = getPropertyDouble ("STK2");
     607                 :       2000 :   LODK2 = getPropertyDouble ("LODK2");
     608                 :       2000 :   STETA0 = getPropertyDouble ("STETA0");
     609                 :       2000 :   LODETA0 = getPropertyDouble ("LODETA0");
     610                 :       2000 :   WL = getPropertyDouble ("WL");
     611                 :       2000 :   WLN = getPropertyDouble ("WLN");
     612                 :       2000 :   WW = getPropertyDouble ("WW");
     613                 :       2000 :   WWN = getPropertyDouble ("WWN");
     614                 :       2000 :   WWL = getPropertyDouble ("WWL");
     615                 :       2000 :   LL = getPropertyDouble ("LL");
     616                 :       2000 :   LLN = getPropertyDouble ("LLN");
     617                 :       2000 :   LW = getPropertyDouble ("LW");
     618                 :       2000 :   LWN = getPropertyDouble ("LWN");
     619                 :       2000 :   LWL = getPropertyDouble ("LWL");
     620                 :       2000 :   LLC = getPropertyDouble ("LLC");
     621                 :       2000 :   LWC = getPropertyDouble ("LWC");
     622                 :       2000 :   LWLC = getPropertyDouble ("LWLC");
     623                 :       2000 :   WLC = getPropertyDouble ("WLC");
     624                 :       2000 :   WWC = getPropertyDouble ("WWC");
     625                 :       2000 :   WWLC = getPropertyDouble ("WWLC");
     626                 :       2000 :   NTNOI = getPropertyDouble ("NTNOI");
     627                 :       2000 :   KF = getPropertyDouble ("KF");
     628                 :       2000 :   AF = getPropertyDouble ("AF");
     629                 :       2000 :   EF = getPropertyDouble ("EF");
     630                 :       2000 :   TEMP = getPropertyDouble ("TEMP");
     631                 :       2000 : }
     632                 :            : 
     633                 :            : /* #define's for translated code */
     634                 :            : #undef  _DDT
     635                 :            : #define _DDT(q) q
     636                 :            : #define _DYNAMIC
     637                 :            : #define _DERIVATE
     638                 :            : #define _DDX
     639                 :            : #define _DERIVATEFORDDX
     640                 :            : 
     641                 :            : /* Evaluate Verilog-AMS equations in model initialization. */
     642                 :       2000 : void bsim4v30nMOS::initializeModel (void)
     643                 :            : {
     644                 :            : double dmdgeff;
     645                 :            : double dmcieff;
     646                 :            : double dmcgeff;
     647                 :            : double deta0_lod;
     648                 :            : double dk2_lod;
     649                 :            : double dvth0_lod;
     650                 :            : double od_offset;
     651                 :            : double rho;
     652                 :            : double inv_odeff;
     653                 :            : int i;
     654                 :            : double inv_sb;
     655                 :            : double inv_sa;
     656                 :            : double rho_ref;
     657                 :            : double inv_od_ref;
     658                 :            : double inv_sbref;
     659                 :            : double inv_saref;
     660                 :            : double ku0temp;
     661                 :            : double w_tmp;
     662                 :            : double ldrn;
     663                 :            : #if defined(_DERIVATE)
     664                 :            : double tmp3_Vgatep_sourcep;
     665                 :            : double tmp3_Vdrainp_sourcep;
     666                 :            : double tmp3_Vdrainb_sourcep;
     667                 :            : double tmp3_Vbulkp_sourcep;
     668                 :            : double tmp3_Vsourceb_sourcep;
     669                 :            : #endif
     670                 :            : #if defined(_DERIVATE)
     671                 :            : double t9_Vgatep_sourcep;
     672                 :            : double t9_Vdrainp_sourcep;
     673                 :            : double t9_Vdrainb_sourcep;
     674                 :            : double t9_Vbulkp_sourcep;
     675                 :            : double t9_Vsourceb_sourcep;
     676                 :            : #endif
     677                 :            : #if defined(_DERIVATE)
     678                 :            : double t8_Vgatep_sourcep;
     679                 :            : double t8_Vdrainp_sourcep;
     680                 :            : double t8_Vdrainb_sourcep;
     681                 :            : double t8_Vbulkp_sourcep;
     682                 :            : double t8_Vsourceb_sourcep;
     683                 :            : #endif
     684                 :            : #if defined(_DERIVATE)
     685                 :            : double tmp_Vgatep_sourcep;
     686                 :            : double tmp_Vdrainp_sourcep;
     687                 :            : double tmp_Vdrainb_sourcep;
     688                 :            : double tmp_Vbulkp_sourcep;
     689                 :            : double tmp_Vsourceb_sourcep;
     690                 :            : #endif
     691                 :            : #if defined(_DERIVATE)
     692                 :            : double t5_Vgatep_sourcep;
     693                 :            : double t5_Vdrainp_sourcep;
     694                 :            : double t5_Vdrainb_sourcep;
     695                 :            : double t5_Vbulkp_sourcep;
     696                 :            : double t5_Vsourceb_sourcep;
     697                 :            : #endif
     698                 :            : double toxratioedge;
     699                 :            : #if defined(_DERIVATE)
     700                 :            : double t10_Vgatep_sourcep;
     701                 :            : double t10_Vdrainp_sourcep;
     702                 :            : double t10_Vdrainb_sourcep;
     703                 :            : double t10_Vbulkp_sourcep;
     704                 :            : double t10_Vsourceb_sourcep;
     705                 :            : #endif
     706                 :            : #if defined(_DERIVATE)
     707                 :            : double t4_Vgatep_sourcep;
     708                 :            : double t4_Vdrainp_sourcep;
     709                 :            : double t4_Vdrainb_sourcep;
     710                 :            : double t4_Vbulkp_sourcep;
     711                 :            : double t4_Vsourceb_sourcep;
     712                 :            : #endif
     713                 :            : double powweffwr;
     714                 :            : double dw;
     715                 :            : #if defined(_DERIVATE)
     716                 :            : double tmp2_Vgatep_sourcep;
     717                 :            : double tmp2_Vdrainp_sourcep;
     718                 :            : double tmp2_Vdrainb_sourcep;
     719                 :            : double tmp2_Vbulkp_sourcep;
     720                 :            : double tmp2_Vsourceb_sourcep;
     721                 :            : #endif
     722                 :            : double dl;
     723                 :            : #if defined(_DERIVATE)
     724                 :            : double tmp1_Vgatep_sourcep;
     725                 :            : double tmp1_Vdrainp_sourcep;
     726                 :            : double tmp1_Vdrainb_sourcep;
     727                 :            : double tmp1_Vbulkp_sourcep;
     728                 :            : double tmp1_Vsourceb_sourcep;
     729                 :            : #endif
     730                 :            : double wnew;
     731                 :            : double lnew;
     732                 :            : double deltemp;
     733                 :            : #if defined(_DERIVATE)
     734                 :            : double t3_Vgatep_sourcep;
     735                 :            : double t3_Vdrainp_sourcep;
     736                 :            : double t3_Vdrainb_sourcep;
     737                 :            : double t3_Vbulkp_sourcep;
     738                 :            : double t3_Vsourceb_sourcep;
     739                 :            : #endif
     740                 :            : #if defined(_DERIVATE)
     741                 :            : double t2_Vgatep_sourcep;
     742                 :            : double t2_Vdrainp_sourcep;
     743                 :            : double t2_Vdrainb_sourcep;
     744                 :            : double t2_Vbulkp_sourcep;
     745                 :            : double t2_Vsourceb_sourcep;
     746                 :            : #endif
     747                 :            : #if defined(_DERIVATE)
     748                 :            : double t1_Vgatep_sourcep;
     749                 :            : double t1_Vdrainp_sourcep;
     750                 :            : double t1_Vdrainb_sourcep;
     751                 :            : double t1_Vbulkp_sourcep;
     752                 :            : double t1_Vsourceb_sourcep;
     753                 :            : #endif
     754                 :            : #if defined(_DERIVATE)
     755                 :            : double t0_Vgatep_sourcep;
     756                 :            : double t0_Vdrainp_sourcep;
     757                 :            : double t0_Vdrainb_sourcep;
     758                 :            : double t0_Vbulkp_sourcep;
     759                 :            : double t0_Vsourceb_sourcep;
     760                 :            : #endif
     761                 :            : double eg;
     762                 :            : double ni;
     763                 :            : double eg0;
     764                 :            : double vtm0;
     765                 :            : double lwlc;
     766                 :            : double lwc;
     767                 :            : double llc;
     768                 :            : double xw;
     769                 :            : double xtis;
     770                 :            : double xtid;
     771                 :            : double xt;
     772                 :            : double xn;
     773                 :            : double xl;
     774                 :            : double xgw;
     775                 :            : double xgl;
     776                 :            : double wwn;
     777                 :            : double wwlc;
     778                 :            : double wwl;
     779                 :            : double wwc;
     780                 :            : double ww;
     781                 :            : double wr;
     782                 :            : double wlodvth;
     783                 :            : double wlodku0;
     784                 :            : double wlod;
     785                 :            : double wln;
     786                 :            : double wlc;
     787                 :            : double wl;
     788                 :            : double wkvth0;
     789                 :            : double wku0;
     790                 :            : double wint;
     791                 :            : double w;
     792                 :            : double vsat;
     793                 :            : double voffl;
     794                 :            : double voff;
     795                 :            : double vbx;
     796                 :            : double vbm;
     797                 :            : double ute;
     798                 :            : double uc1;
     799                 :            : double ub1;
     800                 :            : double ua1;
     801                 :            : double u0;
     802                 :            : double tpbswg;
     803                 :            : double tpbsw;
     804                 :            : double tpb;
     805                 :            : double toxref;
     806                 :            : double toxm;
     807                 :            : double tku0;
     808                 :            : double tempmod;
     809                 :            : double tcjswg;
     810                 :            : double tcjsw;
     811                 :            : double tcj;
     812                 :            : double stk2;
     813                 :            : double steta0;
     814                 :            : double sd;
     815                 :            : double sbref;
     816                 :            : double sb;
     817                 :            : double saref;
     818                 :            : double sa;
     819                 :            : double rsw;
     820                 :            : double rshg;
     821                 :            : double rsh;
     822                 :            : double rgeomod;
     823                 :            : double rdw;
     824                 :            : double rdsw;
     825                 :            : double rbsb;
     826                 :            : double rbps;
     827                 :            : double rbpd;
     828                 :            : double rbpb;
     829                 :            : double rbdb;
     830                 :            : double ps;
     831                 :            : double prt;
     832                 :            : double poxedge;
     833                 :            : double pkvth0;
     834                 :            : double pku0;
     835                 :            : double phin;
     836                 :            : double permod;
     837                 :            : double pdibl2;
     838                 :            : double pdibl1;
     839                 :            : double pd;
     840                 :            : double pbsws;
     841                 :            : double pbswgs;
     842                 :            : double pbswgd;
     843                 :            : double pbswd;
     844                 :            : double pbs;
     845                 :            : double pbd;
     846                 :            : double ntox;
     847                 :            : double nsub;
     848                 :            : double nsd;
     849                 :            : double nrs;
     850                 :            : double nrd;
     851                 :            : double ngcon;
     852                 :            : double ndep;
     853                 :            : double minv;
     854                 :            : double lwn;
     855                 :            : double lwl;
     856                 :            : double lw;
     857                 :            : double lodk2;
     858                 :            : double lodeta0;
     859                 :            : double llodvth;
     860                 :            : double llodku0;
     861                 :            : double lln;
     862                 :            : double ll;
     863                 :            : double lkvth0;
     864                 :            : double lku0;
     865                 :            : double lint;
     866                 :            : double lc;
     867                 :            : double l;
     868                 :            : double kvth0;
     869                 :            : double kvsat;
     870                 :            : double ku0;
     871                 :            : double k2;
     872                 :            : double jsws;
     873                 :            : double jswgs;
     874                 :            : double jswgd;
     875                 :            : double jswd;
     876                 :            : double jss;
     877                 :            : double jsd;
     878                 :            : double imin;
     879                 :            : double ijthsrev;
     880                 :            : double ijthsfwd;
     881                 :            : double ijthdrev;
     882                 :            : double ijthdfwd;
     883                 :            : double geomod;
     884                 :            : double gbmin;
     885                 :            : double gamma2;
     886                 :            : double gamma1;
     887                 :            : double epsrox;
     888                 :            : double dwj;
     889                 :            : double dwc;
     890                 :            : double dsub;
     891                 :            : double drout;
     892                 :            : double dmdg;
     893                 :            : double dmci;
     894                 :            : double dmcgt;
     895                 :            : double dmcg;
     896                 :            : double dlcig;
     897                 :            : double dlc;
     898                 :            : double cle;
     899                 :            : double clc;
     900                 :            : double cjsws;
     901                 :            : double cjswgs;
     902                 :            : double cjswgd;
     903                 :            : double cjswd;
     904                 :            : double cjs;
     905                 :            : double cjd;
     906                 :            : double cf;
     907                 :            : double at;
     908                 :            : double as;
     909                 :            : double ad;
     910                 :            : {
     911                 :       2000 : a0=A0;
     912                 :       2000 : a1=A1;
     913                 :       2000 : a2=A2;
     914                 :       2000 : acde=ACDE;
     915                 :       2000 : ad=AD;
     916                 :       2000 : agidl=AGIDL;
     917                 :       2000 : ags=AGS;
     918                 :       2000 : aigbacc=AIGBACC;
     919                 :       2000 : aigbinv=AIGBINV;
     920                 :       2000 : aigc=AIGC;
     921                 :       2000 : aigsd=AIGSD;
     922                 :       2000 : alpha0=ALPHA0;
     923                 :       2000 : alpha1=ALPHA1;
     924                 :       2000 : as=AS;
     925                 :       2000 : at=AT;
     926                 :       2000 : b0=B0;
     927                 :       2000 : b1=B1;
     928                 :       2000 : beta0=BETA0;
     929                 :       2000 : bgidl=BGIDL;
     930                 :       2000 : bigbacc=BIGBACC;
     931                 :       2000 : bigbinv=BIGBINV;
     932                 :       2000 : bigc=BIGC;
     933                 :       2000 : bigsd=BIGSD;
     934                 :       2000 : bvd=BVD;
     935                 :       2000 : bvs=BVS;
     936                 :       2000 : capmod=CAPMOD;
     937                 :       2000 : cdsc=CDSC;
     938                 :       2000 : cdscb=CDSCB;
     939                 :       2000 : cdscd=CDSCD;
     940                 :       2000 : cf=CF;
     941                 :       2000 : cgbo=CGBO;
     942                 :       2000 : cgdl=CGDL;
     943                 :       2000 : cgidl=CGIDL;
     944                 :       2000 : cgsl=CGSL;
     945                 :       2000 : cigbacc=CIGBACC;
     946                 :       2000 : cigbinv=CIGBINV;
     947                 :       2000 : cigc=CIGC;
     948                 :       2000 : cigsd=CIGSD;
     949                 :       2000 : cit=CIT;
     950                 :       2000 : cjd=CJD;
     951                 :       2000 : cjs=CJS;
     952                 :       2000 : cjswd=CJSWD;
     953                 :       2000 : cjswgd=CJSWGD;
     954                 :       2000 : cjswgs=CJSWGS;
     955                 :       2000 : cjsws=CJSWS;
     956                 :       2000 : ckappad=CKAPPAD;
     957                 :       2000 : ckappas=CKAPPAS;
     958                 :       2000 : clc=CLC;
     959                 :       2000 : cle=CLE;
     960                 :       2000 : delta=DELTA;
     961                 :       2000 : diomod=DIOMOD;
     962                 :       2000 : dlc=DLC;
     963                 :       2000 : dlcig=DLCIG;
     964                 :       2000 : dmcg=DMCG;
     965                 :       2000 : dmcgt=DMCGT;
     966                 :       2000 : dmci=DMCI;
     967                 :       2000 : dmdg=DMDG;
     968                 :       2000 : drout=DROUT;
     969                 :       2000 : dsub=DSUB;
     970                 :       2000 : dvt0=DVT0;
     971                 :       2000 : dvt0w=DVT0W;
     972                 :       2000 : dvt1=DVT1;
     973                 :       2000 : dvt1w=DVT1W;
     974                 :       2000 : dvt2=DVT2;
     975                 :       2000 : dvt2w=DVT2W;
     976                 :       2000 : dvtp0=DVTP0;
     977                 :       2000 : dvtp1=DVTP1;
     978                 :       2000 : dwb=DWB;
     979                 :       2000 : dwc=DWC;
     980                 :       2000 : dwg=DWG;
     981                 :       2000 : dwj=DWJ;
     982                 :       2000 : egidl=EGIDL;
     983                 :       2000 : eigbinv=EIGBINV;
     984                 :       2000 : epsrox=EPSROX;
     985                 :       2000 : eta0=ETA0;
     986                 :       2000 : etab=ETAB;
     987                 :       2000 : eu=EU;
     988                 :       2000 : fprout=FPROUT;
     989                 :       2000 : gamma1=GAMMA1;
     990                 :       2000 : gamma2=GAMMA2;
     991                 :       2000 : gbmin=GBMIN;
     992                 :       2000 : geomod=GEOMOD;
     993                 :       2000 : gmin=GMIN;
     994                 :       2000 : igbmod=IGBMOD;
     995                 :       2000 : igcmod=IGCMOD;
     996                 :       2000 : ijthdfwd=IJTHDFWD;
     997                 :       2000 : ijthdrev=IJTHDREV;
     998                 :       2000 : ijthsfwd=IJTHSFWD;
     999                 :       2000 : ijthsrev=IJTHSREV;
    1000                 :       2000 : imin=MIN;
    1001                 :       2000 : jsd=JSD;
    1002                 :       2000 : jss=JSS;
    1003                 :       2000 : jswd=JSWD;
    1004                 :       2000 : jswgd=JSWGD;
    1005                 :       2000 : jswgs=JSWGS;
    1006                 :       2000 : jsws=JSWS;
    1007                 :       2000 : k1=K1;
    1008                 :       2000 : k2=K2;
    1009                 :       2000 : k3=K3;
    1010                 :       2000 : k3b=K3B;
    1011                 :       2000 : keta=KETA;
    1012                 :       2000 : kt1=KT1;
    1013                 :       2000 : kt1l=KT1L;
    1014                 :       2000 : kt2=KT2;
    1015                 :       2000 : ku0=KU0;
    1016                 :       2000 : kvsat=KVSAT;
    1017                 :       2000 : kvth0=KVTH0;
    1018                 :       2000 : l=L;
    1019                 :       2000 : lambda=LAMBDA;
    1020                 :       2000 : lc=LC;
    1021                 :       2000 : lint=LINT;
    1022                 :       2000 : lku0=LKU0;
    1023                 :       2000 : lkvth0=LKVTH0;
    1024                 :       2000 : ll=LL;
    1025                 :       2000 : lln=LLN;
    1026                 :       2000 : llodku0=LLODKU0;
    1027                 :       2000 : llodvth=LLODVTH;
    1028                 :       2000 : lodeta0=LODETA0;
    1029                 :       2000 : lodk2=LODK2;
    1030                 :       2000 : lpe0=LPE0;
    1031                 :       2000 : lpeb=LPEB;
    1032                 :       2000 : lw=LW;
    1033                 :       2000 : lwl=LWL;
    1034                 :       2000 : lwn=LWN;
    1035                 :       2000 : minv=MINV;
    1036                 :       2000 : mjd=MJD;
    1037                 :       2000 : mjs=MJS;
    1038                 :       2000 : mjswd=MJSWD;
    1039                 :       2000 : mjswgd=MJSWGD;
    1040                 :       2000 : mjswgs=MJSWGS;
    1041                 :       2000 : mjsws=MJSWS;
    1042                 :       2000 : mobmod=MOBMOD;
    1043                 :       2000 : moin=MOIN;
    1044                 :       2000 : ndep=NDEP;
    1045                 :       2000 : nf=NF;
    1046                 :       2000 : nfactor=NFACTOR;
    1047                 :       2000 : ngate=NGATE;
    1048                 :       2000 : ngcon=NGCON;
    1049                 :       2000 : nigbacc=NIGBACC;
    1050                 :       2000 : nigbinv=NIGBINV;
    1051                 :       2000 : nigc=NIGC;
    1052                 :       2000 : njd=NJD;
    1053                 :       2000 : njs=NJS;
    1054                 :       2000 : noff=NOFF;
    1055                 :       2000 : nrd=NRD;
    1056                 :       2000 : nrs=NRS;
    1057                 :       2000 : nsd=NSD;
    1058                 :       2000 : nsub=NSUB;
    1059                 :       2000 : ntox=NTOX;
    1060                 :       2000 : param_cgdo=CGDO;
    1061                 :       2000 : param_cgso=CGSO;
    1062                 :       2000 : pbd=PBD;
    1063                 :       2000 : pbs=PBS;
    1064                 :       2000 : pbswd=PBSWD;
    1065                 :       2000 : pbswgd=PBSWGD;
    1066                 :       2000 : pbswgs=PBSWGS;
    1067                 :       2000 : pbsws=PBSWS;
    1068                 :       2000 : pclm=PCLM;
    1069                 :       2000 : pd=PD;
    1070                 :       2000 : pdibl1=PDIBL1;
    1071                 :       2000 : pdibl2=PDIBL2;
    1072                 :       2000 : pdiblb=PDIBLB;
    1073                 :       2000 : pdits=PDITS;
    1074                 :       2000 : pditsd=PDITSD;
    1075                 :       2000 : pditsl=PDITSL;
    1076                 :       2000 : permod=PERMOD;
    1077                 :       2000 : phin=PHIN;
    1078                 :       2000 : pigcd=PIGCD;
    1079                 :       2000 : pku0=PKU0;
    1080                 :       2000 : pkvth0=PKVTH0;
    1081                 :       2000 : poxedge=POXEDGE;
    1082                 :       2000 : prt=PRT;
    1083                 :       2000 : prwb=PRWB;
    1084                 :       2000 : prwg=PRWG;
    1085                 :       2000 : ps=PS;
    1086                 :       2000 : pscbe1=PSCBE1;
    1087                 :       2000 : pscbe2=PSCBE2;
    1088                 :       2000 : pvag=PVAG;
    1089                 :       2000 : rbdb=RBDB;
    1090                 :       2000 : rbodymod=RBODYMOD;
    1091                 :       2000 : rbpb=RBPB;
    1092                 :       2000 : rbpd=RBPD;
    1093                 :       2000 : rbps=RBPS;
    1094                 :       2000 : rbsb=RBSB;
    1095                 :       2000 : rdsmod=RDSMOD;
    1096                 :       2000 : rdsw=RDSW;
    1097                 :       2000 : rdswmin=RDSWMIN;
    1098                 :       2000 : rdw=RDW;
    1099                 :       2000 : rdwmin=RDWMIN;
    1100                 :       2000 : rgatemod=RGATEMOD;
    1101                 :       2000 : rgeomod=RGEOMOD;
    1102                 :       2000 : rsh=RSH;
    1103                 :       2000 : rshg=RSHG;
    1104                 :       2000 : rsw=RSW;
    1105                 :       2000 : rswmin=RSWMIN;
    1106                 :       2000 : sa=SA;
    1107                 :       2000 : saref=SAREF;
    1108                 :       2000 : sb=SB;
    1109                 :       2000 : sbref=SBREF;
    1110                 :       2000 : sd=SD;
    1111                 :       2000 : steta0=STETA0;
    1112                 :       2000 : stk2=STK2;
    1113                 :       2000 : tcj=TCJ;
    1114                 :       2000 : tcjsw=TCJSW;
    1115                 :       2000 : tcjswg=TCJSWG;
    1116                 :       2000 : tempmod=TEMPMOD;
    1117                 :       2000 : tku0=TKU0;
    1118                 :       2000 : toxe=TOXE;
    1119                 :       2000 : toxm=TOXM;
    1120                 :       2000 : toxp=TOXP;
    1121                 :       2000 : toxref=TOXREF;
    1122                 :       2000 : tpb=TPB;
    1123                 :       2000 : tpbsw=TPBSW;
    1124                 :       2000 : tpbswg=TPBSWG;
    1125                 :       2000 : type=1.0;
    1126                 :       2000 : u0=U0;
    1127                 :       2000 : ua=UA;
    1128                 :       2000 : ua1=UA1;
    1129                 :       2000 : ub=UB;
    1130                 :       2000 : ub1=UB1;
    1131                 :       2000 : uc=UC;
    1132                 :       2000 : uc1=UC1;
    1133                 :       2000 : ute=UTE;
    1134                 :       2000 : vbm=VBM;
    1135                 :       2000 : vbx=VBX;
    1136                 :       2000 : vfb=VFB;
    1137                 :       2000 : vfbcv=VFBCV;
    1138                 :       2000 : voff=VOFF;
    1139                 :       2000 : voffcv=VOFFCV;
    1140                 :       2000 : voffl=VOFFL;
    1141                 :       2000 : vsat=VSAT;
    1142                 :       2000 : vth0=VTH0;
    1143                 :       2000 : vtl=VTL;
    1144                 :       2000 : w=W;
    1145                 :       2000 : w0=W0;
    1146                 :       2000 : wint=WINT;
    1147                 :       2000 : wku0=WKU0;
    1148                 :       2000 : wkvth0=WKVTH0;
    1149                 :       2000 : wl=WL;
    1150                 :       2000 : wlc=WLC;
    1151                 :       2000 : wln=WLN;
    1152                 :       2000 : wlod=WLOD;
    1153                 :       2000 : wlodku0=WLODKU0;
    1154                 :       2000 : wlodvth=WLODVTH;
    1155                 :       2000 : wr=WR;
    1156                 :       2000 : ww=WW;
    1157                 :       2000 : wwc=WWC;
    1158                 :       2000 : wwl=WWL;
    1159                 :       2000 : wwlc=WWLC;
    1160                 :       2000 : wwn=WWN;
    1161                 :       2000 : xgl=XGL;
    1162                 :       2000 : xgw=XGW;
    1163                 :       2000 : xj=XJ;
    1164                 :       2000 : xjbvd=XJBVD;
    1165                 :       2000 : xjbvs=XJBVS;
    1166                 :       2000 : xl=XL;
    1167                 :       2000 : xn=XN;
    1168                 :       2000 : xrcrg1=XRCRG1;
    1169                 :       2000 : xrcrg2=XRCRG2;
    1170                 :       2000 : xt=XT;
    1171                 :       2000 : xtid=XTID;
    1172                 :       2000 : xtis=XTIS;
    1173                 :       2000 : xw=XW;
    1174                 :       2000 : xpart=XPART;
    1175                 :       2000 : llc=LLC;
    1176                 :       2000 : lwc=LWC;
    1177                 :       2000 : lwlc=LWLC;
    1178                 :       2000 : Temp=(TEMP+273.15);
    1179         [ +  - ]:       2000 : if
    1180                 :            : (mobmod==(-99.0))
    1181                 :            : {
    1182                 :       2000 : mobmod=0;
    1183                 :            : }
    1184                 :            : else
    1185                 :            : {
    1186 [ #  # ][ #  # ]:          0 : if
                 [ #  # ]
    1187                 :            : (((mobmod!=0)&&(mobmod!=1))&&(mobmod!=2))
    1188                 :            : {
    1189                 :          0 : mobmod=0;
    1190                 :          0 : logprint(LOG_ERROR,"Warning: MOBMOD has been set to its default value: 0.");
    1191                 :          0 : logprint(LOG_ERROR,"\n");
    1192                 :            : }
    1193                 :            : }
    1194         [ +  - ]:       2000 : if
    1195                 :            : (rdsmod==(-99.0))
    1196                 :            : {
    1197                 :       2000 : rdsmod=0;
    1198                 :            : }
    1199                 :            : else
    1200                 :            : {
    1201 [ #  # ][ #  # ]:          0 : if
    1202                 :            : ((rdsmod!=0)&&(rdsmod!=1))
    1203                 :            : {
    1204                 :          0 : rdsmod=0;
    1205                 :          0 : logprint(LOG_ERROR,"Warning: RDSMOD has been set to its default value: 0.");
    1206                 :          0 : logprint(LOG_ERROR,"\n");
    1207                 :            : }
    1208                 :            : }
    1209         [ +  - ]:       2000 : if
    1210                 :            : (tempmod==(-99.0))
    1211                 :            : {
    1212                 :       2000 : tempmod=0;
    1213                 :            : }
    1214                 :            : else
    1215                 :            : {
    1216 [ #  # ][ #  # ]:          0 : if
    1217                 :            : ((tempmod!=0)&&(tempmod!=1))
    1218                 :            : {
    1219                 :          0 : tempmod=0;
    1220                 :          0 : logprint(LOG_ERROR,"Warning: TEMPMOD has been set to its default value: 0.");
    1221                 :          0 : logprint(LOG_ERROR,"\n");
    1222                 :            : }
    1223                 :            : }
    1224 [ +  - ][ -  + ]:       2000 : if
                 [ #  # ]
    1225                 :            : (((diomod!=0)&&(diomod!=1))&&(diomod!=2))
    1226                 :            : {
    1227                 :          0 : diomod=1;
    1228                 :          0 : logprint(LOG_ERROR,"Warning: DIOMOD has been set to its default value: 1.");
    1229                 :          0 : logprint(LOG_ERROR,"\n");
    1230                 :            : }
    1231 [ +  - ][ +  - ]:       2000 : if
                 [ -  + ]
    1232                 :            : (((capmod!=0)&&(capmod!=1))&&(capmod!=2))
    1233                 :            : {
    1234                 :          0 : capmod=2;
    1235                 :          0 : logprint(LOG_ERROR,"Warning: CAPMOD has been set to its default value: 2.");
    1236                 :          0 : logprint(LOG_ERROR,"\n");
    1237                 :            : }
    1238 [ +  - ][ -  + ]:       2000 : if
    1239                 :            : ((permod!=0)&&(permod!=1))
    1240                 :            : {
    1241                 :          0 : permod=1;
    1242                 :          0 : logprint(LOG_ERROR,"Warning: PERMOD has been set to its default value: 1.");
    1243                 :          0 : logprint(LOG_ERROR,"\n");
    1244                 :            : }
    1245 [ -  + ][ #  # ]:       2000 : if
    1246                 :            : ((igcmod!=0)&&(igcmod!=1))
    1247                 :            : {
    1248                 :          0 : igcmod=0;
    1249                 :          0 : logprint(LOG_ERROR,"Warning: IGCMOD has been set to its default value: 0.");
    1250                 :          0 : logprint(LOG_ERROR,"\n");
    1251                 :            : }
    1252 [ -  + ][ #  # ]:       2000 : if
    1253                 :            : ((igbmod!=0)&&(igbmod!=1))
    1254                 :            : {
    1255                 :          0 : igbmod=0;
    1256                 :          0 : logprint(LOG_ERROR,"Warning: IGBMOD has been set to its default value: 0.");
    1257                 :          0 : logprint(LOG_ERROR,"\n");
    1258                 :            : }
    1259 [ -  + ][ #  # ]:       2000 : if
    1260                 :            : ((rbodymod!=0)&&(rbodymod!=1))
    1261                 :            : {
    1262                 :          0 : rbodymod=0;
    1263                 :          0 : logprint(LOG_ERROR,"Warning: RBODYMOD has been set to its default value: 0.");
    1264                 :          0 : logprint(LOG_ERROR,"\n");
    1265                 :            : }
    1266         [ -  + ]:       2000 : if
    1267                 :            : (toxref<=0.0)
    1268                 :            : {
    1269                 :          0 : logprint(LOG_ERROR,"Fatal: TOXREF = %e is not positive.",TOXREF);
    1270                 :          0 : logprint(LOG_ERROR,"\n");
    1271                 :          0 : exit(1);
    1272                 :            : }
    1273 [ -  + ][ #  # ]:       2000 : if
         [ #  # ][ #  # ]
    1274                 :            : ((((toxe!=(-99.0))&&(toxp!=(-99.0)))&&(DTOX!=0.0))&&(toxe!=(toxp+DTOX)))
    1275                 :            : {
    1276                 :          0 : logprint(LOG_ERROR,"Warning: TOXE, TOXP and DTOX all given and TOXE != TOXP + DTOX. DTOX ignored.");
    1277                 :          0 : logprint(LOG_ERROR,"\n");
    1278                 :            : }
    1279                 :            : else
    1280                 :            : {
    1281 [ -  + ][ #  # ]:       2000 : if
    1282                 :            : ((toxe!=(-99.0))&&(toxp==(-99.0)))
    1283                 :            : {
    1284                 :          0 : toxp=(toxe-DTOX);
    1285                 :            : }
    1286                 :            : else
    1287                 :            : {
    1288 [ +  - ][ -  + ]:       2000 : if
    1289                 :            : ((toxe==(-99.0))&&(toxp!=(-99.0)))
    1290                 :            : {
    1291                 :          0 : toxe=(toxp+DTOX);
    1292                 :            : }
    1293                 :            : else
    1294                 :            : {
    1295 [ +  - ][ +  - ]:       2000 : if
    1296                 :            : ((toxp==(-99.0))&&(toxe==(-99.0)))
    1297                 :            : {
    1298                 :       2000 : toxe=3.0e-9;
    1299                 :       2000 : toxp=toxe;
    1300                 :            : }
    1301                 :            : }
    1302                 :            : }
    1303                 :            : }
    1304                 :       2000 : cox=(3.45311e-11/toxe);
    1305         [ -  + ]:       2000 : if
    1306                 :            : (toxe<1.0e-10)
    1307                 :            : {
    1308                 :          0 : logprint(LOG_ERROR,"Warning: TOXE = %e is less than 1A. Recommended TOXE >= 5A",toxe);
    1309                 :          0 : logprint(LOG_ERROR,"\n");
    1310                 :            : }
    1311         [ -  + ]:       2000 : if
    1312                 :            : (toxp<1.0e-10)
    1313                 :            : {
    1314                 :          0 : logprint(LOG_ERROR,"Warning: TOXP = %e is less than 1A. Recommended TOXP >= 5A",toxp);
    1315                 :          0 : logprint(LOG_ERROR,"\n");
    1316                 :            : }
    1317         [ +  - ]:       2000 : if
    1318                 :            : (toxm==(-99.0))
    1319                 :            : {
    1320                 :       2000 : toxm=toxe;
    1321                 :            : }
    1322         [ -  + ]:       2000 : if
    1323                 :            : (toxm<=0.0)
    1324                 :            : {
    1325                 :          0 : logprint(LOG_ERROR,"Fatal: TOXM = %e is not positive.",toxm);
    1326                 :          0 : logprint(LOG_ERROR,"\n");
    1327                 :          0 : exit(1);
    1328                 :            : }
    1329         [ -  + ]:       2000 : if
    1330                 :            : (toxm<1.0e-10)
    1331                 :            : {
    1332                 :          0 : logprint(LOG_ERROR,"Warning: TOXM = %e is less than 1A. Recommended TOXM >= 5A",toxm);
    1333                 :          0 : logprint(LOG_ERROR,"\n");
    1334                 :            : }
    1335         [ -  + ]:       2000 : if
    1336                 :            : (epsrox<=0.0)
    1337                 :            : {
    1338                 :          0 : logprint(LOG_ERROR,"Warning: EPSROX is not positive. Default value taken.");
    1339                 :          0 : logprint(LOG_ERROR,"\n");
    1340                 :          0 : epsrox=3.9;
    1341                 :            : }
    1342         [ -  + ]:       2000 : if
    1343                 :            : (TNOM<(-273.15))
    1344                 :            : {
    1345                 :          0 : logprint(LOG_ERROR,"Warning: TNOM is not physically possible. Default value taken.");
    1346                 :          0 : logprint(LOG_ERROR,"\n");
    1347                 :          0 : tnom=300.15;
    1348                 :            : }
    1349                 :            : else
    1350                 :            : {
    1351                 :       2000 : tnom=(TNOM+273.15);
    1352                 :            : }
    1353         [ -  + ]:       2000 : if
    1354                 :            : (l<=0.0)
    1355                 :            : {
    1356                 :          0 : logprint(LOG_ERROR,"FATAL : L is not positive.");
    1357                 :          0 : logprint(LOG_ERROR,"\n");
    1358                 :          0 : exit(1);
    1359                 :            : }
    1360         [ -  + ]:       2000 : if
    1361                 :            : (w<=0.0)
    1362                 :            : {
    1363                 :          0 : logprint(LOG_ERROR,"FATAL : W is not positive.");
    1364                 :          0 : logprint(LOG_ERROR,"\n");
    1365                 :          0 : exit(1);
    1366                 :            : }
    1367         [ -  + ]:       2000 : if
    1368                 :            : (nf<1.0)
    1369                 :            : {
    1370                 :          0 : logprint(LOG_ERROR,"Warning : NF must be at least equal to 1.Default value taken");
    1371                 :          0 : logprint(LOG_ERROR,"\n");
    1372                 :          0 : nf=1.0;
    1373                 :            : }
    1374         [ -  + ]:       2000 : if
    1375                 :            : (phin<(-0.4))
    1376                 :            : {
    1377                 :          0 : logprint(LOG_ERROR,"Fatal: phin = %e is less than -0.4.",PHIN);
    1378                 :          0 : logprint(LOG_ERROR,"\n");
    1379                 :          0 : exit(1);
    1380                 :            : }
    1381                 :            : else
    1382                 :            : {
    1383         [ -  + ]:       2000 : if
    1384                 :            : (nsub<=0.0)
    1385                 :            : {
    1386                 :          0 : logprint(LOG_ERROR,"Fatal: NSUB = %e is not positive.",NSUB);
    1387                 :          0 : logprint(LOG_ERROR,"\n");
    1388                 :          0 : exit(1);
    1389                 :            : }
    1390                 :            : else
    1391                 :            : {
    1392         [ -  + ]:       2000 : if
    1393                 :            : (NSUB<=1.0e14)
    1394                 :            : {
    1395                 :          0 : logprint(LOG_ERROR,"Warning: NSUB = %e may be too small.",NSUB);
    1396                 :          0 : logprint(LOG_ERROR,"\n");
    1397                 :            : }
    1398                 :            : else
    1399                 :            : {
    1400         [ -  + ]:       2000 : if
    1401                 :            : (NSUB>=1.0e21)
    1402                 :            : {
    1403                 :          0 : logprint(LOG_ERROR,"Warning: NSUB = %e may be too large.",NSUB);
    1404                 :          0 : logprint(LOG_ERROR,"\n");
    1405                 :            : }
    1406                 :            : }
    1407                 :            : }
    1408                 :            : }
    1409         [ -  + ]:       2000 : if
    1410                 :            : (xj<=0.0)
    1411                 :            : {
    1412                 :          0 : logprint(LOG_ERROR,"Fatal: XJ = %e is not positive.",XJ);
    1413                 :          0 : logprint(LOG_ERROR,"\n");
    1414                 :            : }
    1415         [ -  + ]:       2000 : if
    1416                 :            : (ngate<0.0)
    1417                 :            : {
    1418                 :          0 : logprint(LOG_ERROR,"Fatal: NGATE = %e is not positive.",NGATE);
    1419                 :          0 : logprint(LOG_ERROR,"\n");
    1420                 :          0 : exit(1);
    1421                 :            : }
    1422         [ -  + ]:       2000 : if
    1423                 :            : (ngate>1.0e25)
    1424                 :            : {
    1425                 :          0 : logprint(LOG_ERROR,"Fatal: NGATE = %e is too high.",NGATE);
    1426                 :          0 : logprint(LOG_ERROR,"\n");
    1427                 :          0 : exit(1);
    1428                 :            : }
    1429 [ -  + ][ #  # ]:       2000 : if
    1430                 :            : ((ngate>0.0)&&(ngate<=1.0e18))
    1431                 :            : {
    1432                 :          0 : logprint(LOG_ERROR,"Warning: NGATE = %e is less than 1.E18cm^-3.",NGATE);
    1433                 :          0 : logprint(LOG_ERROR,"\n");
    1434                 :            : }
    1435         [ -  + ]:       2000 : if
    1436                 :            : (poxedge<=0.0)
    1437                 :            : {
    1438                 :          0 : logprint(LOG_ERROR,"Fatal: POXEDGE = %e is non-positive.",POXEDGE);
    1439                 :          0 : logprint(LOG_ERROR,"\n");
    1440                 :          0 : exit(1);
    1441                 :            : }
    1442         [ -  + ]:       2000 : if
    1443                 :            : (dsub<0.0)
    1444                 :            : {
    1445                 :          0 : logprint(LOG_ERROR,"Fatal: DSUB = %e is negative.",DSUB);
    1446                 :          0 : logprint(LOG_ERROR,"\n");
    1447                 :          0 : exit(1);
    1448                 :            : }
    1449         [ -  + ]:       2000 : if
    1450                 :            : (drout<0.0)
    1451                 :            : {
    1452                 :          0 : logprint(LOG_ERROR,"Fatal: DROUT = %e is negative.",DROUT);
    1453                 :          0 : logprint(LOG_ERROR,"\n");
    1454                 :          0 : exit(1);
    1455                 :            : }
    1456         [ -  + ]:       2000 : if
    1457                 :            : (pdibl1<0.0)
    1458                 :            : {
    1459                 :          0 : logprint(LOG_ERROR,"Warning: PDIBL1 = %e is negative.",PDIBL1);
    1460                 :          0 : logprint(LOG_ERROR,"\n");
    1461                 :            : }
    1462         [ -  + ]:       2000 : if
    1463                 :            : (pdibl2<0.0)
    1464                 :            : {
    1465                 :          0 : logprint(LOG_ERROR,"Warning: PDIBL2 = %e is negative.",PDIBL2);
    1466                 :          0 : logprint(LOG_ERROR,"\n");
    1467                 :            : }
    1468         [ -  + ]:       2000 : if
    1469                 :            : (dvt1w<0.0)
    1470                 :            : {
    1471                 :          0 : logprint(LOG_ERROR,"Fatal: DVT1W = %e is negative.",DVT1W);
    1472                 :          0 : logprint(LOG_ERROR,"\n");
    1473                 :          0 : exit(1);
    1474                 :            : }
    1475         [ -  + ]:       2000 : if
    1476                 :            : (dvt1<0.0)
    1477                 :            : {
    1478                 :          0 : logprint(LOG_ERROR,"Fatal: DVT1 = %e is negative.",DVT1);
    1479                 :          0 : logprint(LOG_ERROR,"\n");
    1480                 :          0 : exit(1);
    1481                 :            : }
    1482         [ -  + ]:       2000 : if
    1483                 :            : (dvt0<0.0)
    1484                 :            : {
    1485                 :          0 : logprint(LOG_ERROR,"Warning: DVT0 = %e is negative.",DVT0);
    1486                 :          0 : logprint(LOG_ERROR,"\n");
    1487                 :            : }
    1488         [ -  + ]:       2000 : if
    1489                 :            : (lpe0<(-leff))
    1490                 :            : {
    1491                 :          0 : logprint(LOG_ERROR,"Fatal: LPE0 = %e is less than -leff.",LPE0);
    1492                 :          0 : logprint(LOG_ERROR,"\n");
    1493                 :          0 : exit(1);
    1494                 :            : }
    1495         [ -  + ]:       2000 : if
    1496                 :            : (w0==(-weff))
    1497                 :            : {
    1498                 :          0 : logprint(LOG_ERROR,"Fatal: (W0 + Weff) = 0 causing divided-by-zero.");
    1499                 :          0 : logprint(LOG_ERROR,"\n");
    1500                 :          0 : exit(1);
    1501                 :            : }
    1502                 :            : {
    1503         [ -  + ]:       2000 : double m00_abs(d00_abs0,(1.0e-6/(w0+weff)))
    1504         [ -  + ]:       2000 : if
    1505                 :            : (d00_abs0>10.0)
    1506                 :            : {
    1507                 :          0 : logprint(LOG_ERROR,"Warning: (W0 + Weff) may be too small.");
    1508                 :          0 : logprint(LOG_ERROR,"\n");
    1509                 :            : }
    1510                 :            : }
    1511         [ -  + ]:       2000 : if
    1512                 :            : (eta0<0.0)
    1513                 :            : {
    1514                 :          0 : logprint(LOG_ERROR,"Warning: ETA0 = %e is negative.",ETA0);
    1515                 :          0 : logprint(LOG_ERROR,"\n");
    1516                 :            : }
    1517         [ -  + ]:       2000 : if
    1518                 :            : (lpeb<(-leff))
    1519                 :            : {
    1520                 :          0 : logprint(LOG_ERROR,"Fatal: LPEB = %e is less than -leff.",LPEB);
    1521                 :          0 : logprint(LOG_ERROR,"\n");
    1522                 :          0 : exit(1);
    1523                 :            : }
    1524         [ -  + ]:       2000 : if
    1525                 :            : (nfactor<0.0)
    1526                 :            : {
    1527                 :          0 : logprint(LOG_ERROR,"Warning: NFACTOR = %e is negative.",NFACTOR);
    1528                 :          0 : logprint(LOG_ERROR,"\n");
    1529                 :            : }
    1530         [ -  + ]:       2000 : if
    1531                 :            : (cdsc<0.0)
    1532                 :            : {
    1533                 :          0 : logprint(LOG_ERROR,"Warning: CDSC = %e is negative.",CDSC);
    1534                 :          0 : logprint(LOG_ERROR,"\n");
    1535                 :            : }
    1536         [ -  + ]:       2000 : if
    1537                 :            : (cdscd<0.0)
    1538                 :            : {
    1539                 :          0 : logprint(LOG_ERROR,"Warning: CDSCD = %e is negative.",CDSCD);
    1540                 :          0 : logprint(LOG_ERROR,"\n");
    1541                 :            : }
    1542         [ +  - ]:       2000 : if
    1543                 :            : (u0==(-99.0))
    1544                 :            : {
    1545         [ +  - ]:       2000 : u0=((type==1)?0.067:0.025);
    1546                 :            : }
    1547         [ +  - ]:       2000 : if
    1548                 :            : (ua==(-99.0))
    1549                 :            : {
    1550         [ -  + ]:       2000 : ua=((mobmod==2)?1.0e-15:1.0e-9);
    1551                 :            : }
    1552         [ +  - ]:       2000 : if
    1553                 :            : (uc==(-99.0))
    1554                 :            : {
    1555         [ -  + ]:       2000 : uc=((mobmod==1)?(-0.0465):(-0.0465e-9));
    1556                 :            : }
    1557         [ +  - ]:       2000 : if
    1558                 :            : (uc1==(-99.0))
    1559                 :            : {
    1560         [ -  + ]:       2000 : uc1=((mobmod==1)?(-0.056):(-0.056e-9));
    1561                 :            : }
    1562         [ +  - ]:       2000 : if
    1563                 :            : (eu==(-99.0))
    1564                 :            : {
    1565         [ +  - ]:       2000 : eu=((type==1)?1.67:1.0);
    1566                 :            : }
    1567         [ -  + ]:       2000 : if
    1568                 :            : (prwg<0.0)
    1569                 :            : {
    1570                 :          0 : logprint(LOG_ERROR,"Warning: PRWG = %e is negative. Set to zero.",PRWG);
    1571                 :          0 : logprint(LOG_ERROR,"\n");
    1572                 :          0 : prwg=0.0;
    1573                 :            : }
    1574         [ -  + ]:       2000 : if
    1575                 :            : (a2<0.01)
    1576                 :            : {
    1577                 :          0 : logprint(LOG_ERROR,"Warning: A2 = %e is too small. Set to 0.01.",a2);
    1578                 :          0 : logprint(LOG_ERROR,"\n");
    1579                 :          0 : a2=0.01;
    1580                 :            : }
    1581                 :            : else
    1582                 :            : {
    1583         [ -  + ]:       2000 : if
    1584                 :            : (a2>1.0)
    1585                 :            : {
    1586                 :          0 : logprint(LOG_ERROR,"Warning: A2 = %e is larger than 1. A2 is set to 1 and A1 is set to 0.",a2);
    1587                 :          0 : logprint(LOG_ERROR,"\n");
    1588                 :          0 : a2=1.0;
    1589                 :          0 : a1=0.0;
    1590                 :            : }
    1591                 :            : }
    1592         [ -  + ]:       2000 : if
    1593                 :            : (delta<0.0)
    1594                 :            : {
    1595                 :          0 : logprint(LOG_ERROR,"Fatal: DELTA = %e is less than zero.",delta);
    1596                 :          0 : logprint(LOG_ERROR,"\n");
    1597                 :          0 : exit(1);
    1598                 :            : }
    1599 [ -  + ][ #  # ]:       2000 : if
    1600                 :            : ((lambda!=(-99.0))&&(lambda>0.0))
    1601                 :            : {
    1602         [ #  # ]:          0 : if
    1603                 :            : (lambda>1.0e-9)
    1604                 :            : {
    1605                 :          0 : logprint(LOG_ERROR,"Warning: LAMBDA = %e may be too large.",LAMBDA);
    1606                 :          0 : logprint(LOG_ERROR,"\n");
    1607                 :            : }
    1608                 :            : }
    1609         [ -  + ]:       2000 : if
    1610                 :            : (fprout<0.0)
    1611                 :            : {
    1612                 :          0 : logprint(LOG_ERROR,"Fatal: FPROUT = %e is negative.",FPROUT);
    1613                 :          0 : logprint(LOG_ERROR,"\n");
    1614                 :          0 : exit(1);
    1615                 :            : }
    1616         [ -  + ]:       2000 : if
    1617                 :            : (pclm<=0.0)
    1618                 :            : {
    1619                 :          0 : logprint(LOG_ERROR,"Fatal: PCLM = %e is not positive.",PCLM);
    1620                 :          0 : logprint(LOG_ERROR,"\n");
    1621                 :          0 : exit(1);
    1622                 :            : }
    1623         [ -  + ]:       2000 : if
    1624                 :            : (pdits<0.0)
    1625                 :            : {
    1626                 :          0 : logprint(LOG_ERROR,"Fatal: PDITS = %e is negative.",pdits);
    1627                 :          0 : logprint(LOG_ERROR,"\n");
    1628                 :          0 : exit(1);
    1629                 :            : }
    1630         [ -  + ]:       2000 : if
    1631                 :            : (pditsl<0.0)
    1632                 :            : {
    1633                 :          0 : logprint(LOG_ERROR,"Fatal: PDITSL = %e is negative.",pditsl);
    1634                 :          0 : logprint(LOG_ERROR,"\n");
    1635                 :          0 : exit(1);
    1636                 :            : }
    1637         [ -  + ]:       2000 : if
    1638                 :            : (pscbe2<=0.0)
    1639                 :            : {
    1640                 :          0 : logprint(LOG_ERROR,"Warning: PSCBE2 = %e is not positive.",PSCBE2);
    1641                 :          0 : logprint(LOG_ERROR,"\n");
    1642                 :            : }
    1643 [ -  + ][ #  # ]:       2000 : if
    1644                 :            : ((vtl!=(-99.0))&&(vtl>0.0))
    1645                 :            : {
    1646         [ #  # ]:          0 : if
    1647                 :            : (vtl<6.0e4)
    1648                 :            : {
    1649                 :          0 : logprint(LOG_ERROR,"Warning: Thermal velocity VTL = %e may be too small.",vtl);
    1650                 :          0 : logprint(LOG_ERROR,"\n");
    1651                 :            : }
    1652                 :            : }
    1653         [ -  + ]:       2000 : if
    1654                 :            : (xn<3.0)
    1655                 :            : {
    1656                 :          0 : logprint(LOG_ERROR,"Warning: back scattering coeff XN = %e is too small. Reset to 3.0",xn);
    1657                 :          0 : logprint(LOG_ERROR,"\n");
    1658                 :          0 : xn=3.0;
    1659                 :            : }
    1660         [ -  + ]:       2000 : if
    1661                 :            : (rgatemod==1)
    1662                 :            : {
    1663         [ #  # ]:          0 : if
    1664                 :            : (rshg<=0.0)
    1665                 :            : {
    1666                 :          0 : logprint(LOG_ERROR,"Warning: RSHG should be positive for RGATEMOD = 1.");
    1667                 :          0 : logprint(LOG_ERROR,"\n");
    1668                 :            : }
    1669                 :            : }
    1670                 :            : else
    1671                 :            : {
    1672         [ +  - ]:       2000 : if
    1673                 :            : (rgatemod==2)
    1674                 :            : {
    1675         [ +  - ]:       2000 : if
    1676                 :            : (rshg<=0.0)
    1677                 :            : {
    1678                 :       2000 : logprint(LOG_ERROR,"Warning: RSHG <= 0.0 for rgateMod = 2.");
    1679                 :       2000 : logprint(LOG_ERROR,"\n");
    1680                 :            : }
    1681                 :            : else
    1682                 :            : {
    1683         [ #  # ]:          0 : if
    1684                 :            : (xrcrg1<=0.0)
    1685                 :            : {
    1686                 :          0 : logprint(LOG_ERROR,"Warning: XRCRG1 <= 0.0 for rgateMod = 2.");
    1687                 :          0 : logprint(LOG_ERROR,"\n");
    1688                 :            : }
    1689                 :            : }
    1690                 :            : }
    1691                 :            : }
    1692         [ -  + ]:       2000 : if
    1693                 :            : (rgatemod==3)
    1694                 :            : {
    1695         [ #  # ]:          0 : if
    1696                 :            : (rshg<=0.0)
    1697                 :            : {
    1698                 :          0 : logprint(LOG_ERROR,"Warning: RSHG should be positive for RGATEMOD = 3.");
    1699                 :          0 : logprint(LOG_ERROR,"\n");
    1700                 :            : }
    1701                 :            : else
    1702                 :            : {
    1703         [ #  # ]:          0 : if
    1704                 :            : (xrcrg1<=0.0)
    1705                 :            : {
    1706                 :          0 : logprint(LOG_ERROR,"Warning: XRCRG1 should be positive for RGATEMOD = 3.");
    1707                 :          0 : logprint(LOG_ERROR,"\n");
    1708                 :            : }
    1709                 :            : }
    1710                 :            : }
    1711         [ -  + ]:       2000 : if
    1712                 :            : (ngcon<1.0)
    1713                 :            : {
    1714                 :          0 : logprint(LOG_ERROR,"Fatal: The parameter NGCON cannot be smaller than one.");
    1715                 :          0 : logprint(LOG_ERROR,"\n");
    1716                 :          0 : exit(1);
    1717                 :            : }
    1718         [ -  + ]:       2000 : if
    1719                 :            : ((l+xl)<=xgl)
    1720                 :            : {
    1721                 :          0 : logprint(LOG_ERROR,"Fatal: The parameter XGL must be smaller than Ldrawn+XL.");
    1722                 :          0 : logprint(LOG_ERROR,"\n");
    1723                 :          0 : exit(1);
    1724                 :            : }
    1725 [ -  + ][ #  # ]:       2000 : if
         [ #  # ][ #  # ]
                 [ #  # ]
    1726                 :            : (((sa>0.0)&&(sb>0.0))&&((nf==1.0)||((nf>1.0)&&(sd>0.0))))
    1727                 :            : {
    1728         [ #  # ]:          0 : if
    1729                 :            : (saref<=0.0)
    1730                 :            : {
    1731                 :          0 : logprint(LOG_ERROR,"Fatal: SAREF = %e is not positive.",saref);
    1732                 :          0 : logprint(LOG_ERROR,"\n");
    1733                 :          0 : exit(1);
    1734                 :            : }
    1735         [ #  # ]:          0 : if
    1736                 :            : (sbref<=0.0)
    1737                 :            : {
    1738                 :          0 : logprint(LOG_ERROR,"Fatal: SBREF = %e is not positive.",sbref);
    1739                 :          0 : logprint(LOG_ERROR,"\n");
    1740                 :          0 : exit(1);
    1741                 :            : }
    1742         [ #  # ]:          0 : if
    1743                 :            : (wlod<0.0)
    1744                 :            : {
    1745                 :          0 : logprint(LOG_ERROR,"Warning: WLOD = %e is less than 0.",wlod);
    1746                 :          0 : logprint(LOG_ERROR,"\n");
    1747                 :          0 : wlod=0.0;
    1748                 :            : }
    1749         [ #  # ]:          0 : if
    1750                 :            : (kvsat<(-1.0))
    1751                 :            : {
    1752                 :          0 : logprint(LOG_ERROR,"Warning: KVSAT = %e is is too small; Reset to -1.0.",kvsat);
    1753                 :          0 : logprint(LOG_ERROR,"\n");
    1754                 :          0 : kvsat=(-1.0);
    1755                 :            : }
    1756         [ #  # ]:          0 : if
    1757                 :            : (kvsat>1.0)
    1758                 :            : {
    1759                 :          0 : logprint(LOG_ERROR,"Warning: KVSAT = %e is too big; Reset to 1.0.",kvsat);
    1760                 :          0 : logprint(LOG_ERROR,"\n");
    1761                 :          0 : kvsat=1.0;
    1762                 :            : }
    1763         [ #  # ]:          0 : if
    1764                 :            : (lodk2<=0.0)
    1765                 :            : {
    1766                 :          0 : logprint(LOG_ERROR,"Warning: LODK2 = %e is not positive.",lodk2);
    1767                 :          0 : logprint(LOG_ERROR,"\n");
    1768                 :            : }
    1769         [ #  # ]:          0 : if
    1770                 :            : (lodeta0<=0.0)
    1771                 :            : {
    1772                 :          0 : logprint(LOG_ERROR,"Warning: LODETA0 = %e ih not positive.",lodeta0);
    1773                 :          0 : logprint(LOG_ERROR,"\n");
    1774                 :            : }
    1775                 :            : }
    1776         [ +  - ]:       2000 : if
    1777                 :            : (aigc==(-99.0))
    1778                 :            : {
    1779         [ +  - ]:       2000 : aigc=((type==1)?0.43:0.31);
    1780                 :            : }
    1781         [ +  - ]:       2000 : if
    1782                 :            : (bigc==(-99.0))
    1783                 :            : {
    1784         [ +  - ]:       2000 : bigc=((type==1)?0.054:0.024);
    1785                 :            : }
    1786         [ +  - ]:       2000 : if
    1787                 :            : (cigc==(-99.0))
    1788                 :            : {
    1789         [ +  - ]:       2000 : cigc=((type==1)?0.075:0.03);
    1790                 :            : }
    1791         [ +  - ]:       2000 : if
    1792                 :            : (aigsd==(-99.0))
    1793                 :            : {
    1794         [ +  - ]:       2000 : aigsd=((type==1)?0.43:0.31);
    1795                 :            : }
    1796         [ +  - ]:       2000 : if
    1797                 :            : (bigsd==(-99.0))
    1798                 :            : {
    1799         [ +  - ]:       2000 : bigsd=((type==1)?0.054:0.024);
    1800                 :            : }
    1801         [ +  - ]:       2000 : if
    1802                 :            : (cigsd==(-99.0))
    1803                 :            : {
    1804         [ +  - ]:       2000 : cigsd=((type==1)?0.075:0.03);
    1805                 :            : }
    1806         [ -  + ]:       2000 : if
    1807                 :            : (nigbinv<=0.0)
    1808                 :            : {
    1809                 :          0 : logprint(LOG_ERROR,"Fatal: NIGBINV = %e is non-positive.",nigbinv);
    1810                 :          0 : logprint(LOG_ERROR,"\n");
    1811                 :          0 : exit(1);
    1812                 :            : }
    1813         [ -  + ]:       2000 : if
    1814                 :            : (nigbacc<=0.0)
    1815                 :            : {
    1816                 :          0 : logprint(LOG_ERROR,"Fatal: NIGBACC = %e is non-positive.",nigbacc);
    1817                 :          0 : logprint(LOG_ERROR,"\n");
    1818                 :          0 : exit(1);
    1819                 :            : }
    1820         [ -  + ]:       2000 : if
    1821                 :            : (nigc<=0.0)
    1822                 :            : {
    1823                 :          0 : logprint(LOG_ERROR,"Fatal: NIGC = %e is non-positive.",nigc);
    1824                 :          0 : logprint(LOG_ERROR,"\n");
    1825                 :          0 : exit(1);
    1826                 :            : }
    1827         [ -  + ]:       2000 : if
    1828                 :            : (pigcd<=0.0)
    1829                 :            : {
    1830                 :          0 : logprint(LOG_ERROR,"Fatal: PIGCD = %e is non-positive.",pigcd);
    1831                 :          0 : logprint(LOG_ERROR,"\n");
    1832                 :          0 : exit(1);
    1833                 :            : }
    1834         [ -  + ]:       2000 : if
    1835                 :            : (pbs<0.1)
    1836                 :            : {
    1837                 :          0 : pbs=0.1;
    1838                 :          0 : logprint(LOG_ERROR,"Given PBS is less than 0.1. PBS is set to 0.1.");
    1839                 :          0 : logprint(LOG_ERROR,"\n");
    1840                 :            : }
    1841         [ -  + ]:       2000 : if
    1842                 :            : (pbsws<0.1)
    1843                 :            : {
    1844                 :          0 : pbsws=0.1;
    1845                 :          0 : logprint(LOG_ERROR,"Given PBSWS is less than 0.1. PBSWS is set to 0.1.");
    1846                 :          0 : logprint(LOG_ERROR,"\n");
    1847                 :            : }
    1848         [ -  + ]:       2000 : if
    1849                 :            : (pbswgs<0.1)
    1850                 :            : {
    1851                 :          0 : pbswgs=0.1;
    1852                 :          0 : logprint(LOG_ERROR,"Given PBSWGS is less than 0.1. PBSWGS is set to 0.1.");
    1853                 :          0 : logprint(LOG_ERROR,"\n");
    1854                 :            : }
    1855         [ -  + ]:       2000 : if
    1856                 :            : (pbd<0.1)
    1857                 :            : {
    1858                 :          0 : pbd=0.1;
    1859                 :          0 : logprint(LOG_ERROR,"Given PBD is less than 0.1. PBD is set to 0.1.");
    1860                 :          0 : logprint(LOG_ERROR,"\n");
    1861                 :            : }
    1862         [ -  + ]:       2000 : if
    1863                 :            : (pbswd<0.1)
    1864                 :            : {
    1865                 :          0 : pbswd=0.1;
    1866                 :          0 : logprint(LOG_ERROR,"Given PBSWD is less than 0.1. PBSWD is set to 0.1.");
    1867                 :          0 : logprint(LOG_ERROR,"\n");
    1868                 :            : }
    1869         [ -  + ]:       2000 : if
    1870                 :            : (pbswgd<0.1)
    1871                 :            : {
    1872                 :          0 : pbswgd=0.1;
    1873                 :          0 : logprint(LOG_ERROR,"Given PBSWGD is less than 0.1. PBSWGD is set to 0.1.");
    1874                 :          0 : logprint(LOG_ERROR,"\n");
    1875                 :            : }
    1876         [ -  + ]:       2000 : if
    1877                 :            : (ijthdfwd<=0.0)
    1878                 :            : {
    1879                 :          0 : ijthdfwd=0.1;
    1880                 :            : }
    1881         [ -  + ]:       2000 : if
    1882                 :            : (ijthsfwd<=0.0)
    1883                 :            : {
    1884                 :          0 : ijthsfwd=0.1;
    1885                 :            : }
    1886         [ -  + ]:       2000 : if
    1887                 :            : (ijthdrev<=0.0)
    1888                 :            : {
    1889                 :          0 : ijthdrev=0.1;
    1890                 :          0 : logprint(LOG_ERROR,"IJTHDREV reset to %e.",ijthdrev);
    1891                 :          0 : logprint(LOG_ERROR,"\n");
    1892                 :            : }
    1893         [ -  + ]:       2000 : if
    1894                 :            : (ijthsrev<=0.0)
    1895                 :            : {
    1896                 :          0 : ijthsrev=0.1;
    1897                 :          0 : logprint(LOG_ERROR,"IJTHSREV reset to %e.",ijthsrev);
    1898                 :          0 : logprint(LOG_ERROR,"\n");
    1899                 :            : }
    1900 [ -  + ][ #  # ]:       2000 : if
    1901                 :            : ((xjbvd<=0.0)&&(diomod==2))
    1902                 :            : {
    1903                 :          0 : xjbvd=1.0;
    1904                 :          0 : logprint(LOG_ERROR,"XJBVD reset to %e.",xjbvd);
    1905                 :          0 : logprint(LOG_ERROR,"\n");
    1906                 :            : }
    1907                 :            : else
    1908                 :            : {
    1909 [ -  + ][ #  # ]:       2000 : if
    1910                 :            : ((xjbvd<0.0)&&(diomod==0))
    1911                 :            : {
    1912                 :          0 : xjbvd=1.0;
    1913                 :          0 : logprint(LOG_ERROR,"XJBVD reset to %e.",xjbvd);
    1914                 :          0 : logprint(LOG_ERROR,"\n");
    1915                 :            : }
    1916                 :            : }
    1917         [ -  + ]:       2000 : if
    1918                 :            : (bvd<=0.0)
    1919                 :            : {
    1920                 :          0 : bvd=10.0;
    1921                 :          0 : logprint(LOG_ERROR,"BVD reset to %e.\n",bvd);
    1922                 :          0 : logprint(LOG_ERROR,"\n");
    1923                 :            : }
    1924 [ -  + ][ #  # ]:       2000 : if
    1925                 :            : ((xjbvs<=0.0)&&(diomod==2))
    1926                 :            : {
    1927                 :          0 : xjbvs=1.0;
    1928                 :          0 : logprint(LOG_ERROR,"XJBVS reset to %e.\n",xjbvs);
    1929                 :          0 : logprint(LOG_ERROR,"\n");
    1930                 :            : }
    1931                 :            : else
    1932                 :            : {
    1933 [ -  + ][ #  # ]:       2000 : if
    1934                 :            : ((xjbvs<0.0)&&(diomod==0))
    1935                 :            : {
    1936                 :          0 : xjbvs=1.0;
    1937                 :          0 : logprint(LOG_ERROR,"XJBVS reset to %e.\n",xjbvs);
    1938                 :          0 : logprint(LOG_ERROR,"\n");
    1939                 :            : }
    1940                 :            : }
    1941         [ -  + ]:       2000 : if
    1942                 :            : (bvs<=0.0)
    1943                 :            : {
    1944                 :          0 : bvs=10.0;
    1945                 :          0 : logprint(LOG_ERROR,"BVS reset to %g.\n",bvs);
    1946                 :          0 : logprint(LOG_ERROR,"\n");
    1947                 :            : }
    1948         [ -  + ]:       2000 : if
    1949                 :            : (gbmin<1.0e-20)
    1950                 :            : {
    1951                 :          0 : logprint(LOG_ERROR,"Warning: GBMIN = %e is too small.",gbmin);
    1952                 :          0 : logprint(LOG_ERROR,"\n");
    1953                 :            : }
    1954         [ -  + ]:       2000 : if
    1955                 :            : (clc<0.0)
    1956                 :            : {
    1957                 :          0 : logprint(LOG_ERROR,"Fatal: CLC = %e is negative.",CLC);
    1958                 :          0 : logprint(LOG_ERROR,"\n");
    1959                 :          0 : exit(1);
    1960                 :            : }
    1961         [ -  + ]:       2000 : if
    1962                 :            : (noff<0.1)
    1963                 :            : {
    1964                 :          0 : logprint(LOG_ERROR,"Warning: NOFF = %e is too small.",noff);
    1965                 :          0 : logprint(LOG_ERROR,"\n");
    1966                 :            : }
    1967         [ -  + ]:       2000 : if
    1968                 :            : (voffcv<(-0.5))
    1969                 :            : {
    1970                 :          0 : logprint(LOG_ERROR,"Warning: VOFFCV = %e is too small.",voffcv);
    1971                 :          0 : logprint(LOG_ERROR,"\n");
    1972                 :            : }
    1973         [ -  + ]:       2000 : if
    1974                 :            : (moin<5.0)
    1975                 :            : {
    1976                 :          0 : logprint(LOG_ERROR,"Warning: MOIN = %e is too small.",moin);
    1977                 :          0 : logprint(LOG_ERROR,"\n");
    1978                 :            : }
    1979         [ -  + ]:       2000 : if
    1980                 :            : (moin>25.0)
    1981                 :            : {
    1982                 :          0 : logprint(LOG_ERROR,"Warning: MOIN = %e is too large.",moin);
    1983                 :          0 : logprint(LOG_ERROR,"\n");
    1984                 :            : }
    1985         [ -  + ]:       2000 : if
    1986                 :            : (ckappas<0.02)
    1987                 :            : {
    1988                 :          0 : logprint(LOG_ERROR,"Warning: CKAPPAS = %e is too small.",ckappas);
    1989                 :          0 : logprint(LOG_ERROR,"\n");
    1990                 :          0 : ckappas=0.02;
    1991                 :            : }
    1992         [ -  + ]:       2000 : if
    1993                 :            : (ckappad<0.02)
    1994                 :            : {
    1995                 :          0 : logprint(LOG_ERROR,"Warning: CKAPPAD = %e is too small.",ckappad);
    1996                 :          0 : logprint(LOG_ERROR,"\n");
    1997                 :          0 : ckappad=0.02;
    1998                 :            : }
    1999                 :       2000 : coxe=((epsrox*8.85418e-12)/toxe);
    2000                 :       2000 : coxp=((epsrox*8.85418e-12)/toxp);
    2001         [ +  - ]:       2000 : if
    2002                 :            : (param_cgdo==(-99.0))
    2003                 :            : {
    2004         [ -  + ]:       2000 : if
    2005                 :            : (dlc>0.0)
    2006                 :            : {
    2007                 :          0 : param_cgdo=((dlc*coxe)-cgdl);
    2008                 :            : }
    2009                 :            : else
    2010                 :            : {
    2011                 :       2000 : param_cgdo=((0.6*xj)*coxe);
    2012                 :            : }
    2013                 :            : }
    2014         [ +  - ]:       2000 : if
    2015                 :            : (param_cgso==(-99.0))
    2016                 :            : {
    2017         [ -  + ]:       2000 : if
    2018                 :            : (dlc>0.0)
    2019                 :            : {
    2020                 :          0 : param_cgso=((dlc*coxe)-cgsl);
    2021                 :            : }
    2022                 :            : else
    2023                 :            : {
    2024                 :       2000 : param_cgso=((0.6*xj)*coxe);
    2025                 :            : }
    2026                 :            : }
    2027         [ +  - ]:       2000 : if
    2028                 :            : (cgbo==(-99.0))
    2029                 :            : {
    2030                 :       2000 : cgbo=((2.0*dwc)*coxe);
    2031                 :            : }
    2032                 :       2000 : tratio=(Temp/tnom);
    2033                 :            : {
    2034                 :       2000 : double m00_sqrt(d00_sqrt0,((1.03594e-10/(epsrox*8.85418e-12))*toxe))
    2035                 :       2000 : factor1=d00_sqrt0;
    2036                 :            : }
    2037                 :       2000 : vtm0=(8.617087e-5*tnom);
    2038                 :       2000 : eg0=(1.16-(((7.02e-4*tnom)*tnom)/(tnom+1108.0)));
    2039                 :            : {
    2040                 :       2000 : double m00_sqrt(d00_sqrt0,(tnom/300.15))
    2041                 :       2000 : double m00_exp(d00_exp1,(21.5565981-(eg0/(2.0*vtm0))))
    2042                 :       2000 : ni=(((1.45e10*(tnom/300.15))*d00_sqrt0)*d00_exp1);
    2043                 :            : }
    2044                 :       2000 : vtm=(8.617087e-5*_circuit_temp);
    2045                 :       2000 : eg=(1.16-(((7.02e-4*_circuit_temp)*_circuit_temp)/(_circuit_temp+1108.0)));
    2046         [ +  - ]:       2000 : if
    2047                 :       2000 : (_circuit_temp!=tnom)
    2048                 :            : {
    2049                 :            : #if defined(_DERIVATE)
    2050                 :       2000 : t0_Vgatep_sourcep=0.0;
    2051                 :       2000 : t0_Vdrainp_sourcep=0.0;
    2052                 :       2000 : t0_Vdrainb_sourcep=0.0;
    2053                 :       2000 : t0_Vbulkp_sourcep=0.0;
    2054                 :       2000 : t0_Vsourceb_sourcep=0.0;
    2055                 :            : #endif
    2056                 :       2000 : t0=((eg0/vtm0)-(eg/vtm));
    2057                 :            : {
    2058                 :       2000 : double m00_logE(d00_logE0,(_circuit_temp/tnom))
    2059                 :            : #if defined(_DERIVATE)
    2060                 :       2000 : t1_Vgatep_sourcep=0.0;
    2061                 :       2000 : t1_Vdrainp_sourcep=0.0;
    2062                 :       2000 : t1_Vdrainb_sourcep=0.0;
    2063                 :       2000 : t1_Vbulkp_sourcep=0.0;
    2064                 :       2000 : t1_Vsourceb_sourcep=0.0;
    2065                 :            : #endif
    2066                 :       2000 : t1=d00_logE0;
    2067                 :            : }
    2068                 :            : #if defined(_DERIVATE)
    2069                 :       2000 : t2_Vgatep_sourcep=0.0;
    2070                 :       2000 : t2_Vdrainp_sourcep=0.0;
    2071                 :       2000 : t2_Vdrainb_sourcep=0.0;
    2072                 :       2000 : t2_Vbulkp_sourcep=0.0;
    2073                 :       2000 : t2_Vsourceb_sourcep=0.0;
    2074                 :            : #endif
    2075                 :       2000 : t2=(t0+(xtis*t1));
    2076                 :            : {
    2077                 :       2000 : double m00_exp(d00_exp0,(t2/njs))
    2078                 :            : #if defined(_DERIVATE)
    2079                 :       2000 : t3_Vgatep_sourcep=0.0;
    2080                 :       2000 : t3_Vdrainp_sourcep=0.0;
    2081                 :       2000 : t3_Vdrainb_sourcep=0.0;
    2082                 :       2000 : t3_Vbulkp_sourcep=0.0;
    2083                 :       2000 : t3_Vsourceb_sourcep=0.0;
    2084                 :            : #endif
    2085                 :       2000 : t3=d00_exp0;
    2086                 :            : }
    2087                 :       2000 : jss_temp=(jss*t3);
    2088                 :       2000 : jsws_temp=(jsws*t3);
    2089                 :       2000 : jswgs_temp=(jswgs*t3);
    2090                 :            : #if defined(_DERIVATE)
    2091                 :       2000 : t2_Vgatep_sourcep=0.0;
    2092                 :       2000 : t2_Vdrainp_sourcep=0.0;
    2093                 :       2000 : t2_Vdrainb_sourcep=0.0;
    2094                 :       2000 : t2_Vbulkp_sourcep=0.0;
    2095                 :       2000 : t2_Vsourceb_sourcep=0.0;
    2096                 :            : #endif
    2097                 :       2000 : t2=(t0+(xtid*t1));
    2098                 :            : {
    2099                 :       2000 : double m00_exp(d00_exp0,(t2/njd))
    2100                 :            : #if defined(_DERIVATE)
    2101                 :       2000 : t3_Vgatep_sourcep=0.0;
    2102                 :       2000 : t3_Vdrainp_sourcep=0.0;
    2103                 :       2000 : t3_Vdrainb_sourcep=0.0;
    2104                 :       2000 : t3_Vbulkp_sourcep=0.0;
    2105                 :       2000 : t3_Vsourceb_sourcep=0.0;
    2106                 :            : #endif
    2107                 :       2000 : t3=d00_exp0;
    2108                 :            : }
    2109                 :       2000 : jsd_temp=(jsd*t3);
    2110                 :       2000 : jswd_temp=(jswd*t3);
    2111                 :       2000 : jswgd_temp=(jswgd*t3);
    2112                 :            : }
    2113                 :            : else
    2114                 :            : {
    2115                 :          0 : jss_temp=jss;
    2116                 :          0 : jsws_temp=jsws;
    2117                 :          0 : jswgs_temp=jswgs;
    2118                 :          0 : jsd_temp=jsd;
    2119                 :          0 : jswd_temp=jswd;
    2120                 :          0 : jswgd_temp=jswgd;
    2121                 :            : }
    2122         [ -  + ]:       2000 : if
    2123                 :            : (jss_temp<0.0)
    2124                 :            : {
    2125                 :          0 : jss_temp=0.0;
    2126                 :            : }
    2127         [ -  + ]:       2000 : if
    2128                 :            : (jsws_temp<0.0)
    2129                 :            : {
    2130                 :          0 : jsws_temp=0.0;
    2131                 :            : }
    2132         [ -  + ]:       2000 : if
    2133                 :            : (jswgs_temp<0.0)
    2134                 :            : {
    2135                 :          0 : jswgs_temp=0.0;
    2136                 :            : }
    2137         [ -  + ]:       2000 : if
    2138                 :            : (jsd_temp<0.0)
    2139                 :            : {
    2140                 :          0 : jsd_temp=0.0;
    2141                 :            : }
    2142         [ -  + ]:       2000 : if
    2143                 :            : (jswd_temp<0.0)
    2144                 :            : {
    2145                 :          0 : jswd_temp=0.0;
    2146                 :            : }
    2147         [ -  + ]:       2000 : if
    2148                 :            : (jswgd_temp<0.0)
    2149                 :            : {
    2150                 :          0 : jswgd_temp=0.0;
    2151                 :            : }
    2152                 :       2000 : deltemp=(_circuit_temp-tnom);
    2153                 :            : #if defined(_DERIVATE)
    2154                 :       2000 : t0_Vgatep_sourcep=0.0;
    2155                 :       2000 : t0_Vdrainp_sourcep=0.0;
    2156                 :       2000 : t0_Vdrainb_sourcep=0.0;
    2157                 :       2000 : t0_Vbulkp_sourcep=0.0;
    2158                 :       2000 : t0_Vsourceb_sourcep=0.0;
    2159                 :            : #endif
    2160                 :       2000 : t0=(tcj*deltemp);
    2161         [ +  - ]:       2000 : if
    2162                 :            : (t0>=(-1.0))
    2163                 :            : {
    2164                 :       2000 : cjs_temp=(cjs*(1.0+t0));
    2165                 :       2000 : cjd_temp=(cjd*(1.0+t0));
    2166                 :            : }
    2167                 :            : else
    2168                 :            : {
    2169         [ #  # ]:          0 : if
    2170                 :            : (cjs>0.0)
    2171                 :            : {
    2172                 :          0 : cjs_temp=0.0;
    2173                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused CJS to be negative. CJS is clamped to zero.");
    2174                 :          0 : logprint(LOG_ERROR,"\n");
    2175                 :            : }
    2176         [ #  # ]:          0 : if
    2177                 :            : (cjd>0.0)
    2178                 :            : {
    2179                 :          0 : cjd_temp=0.0;
    2180                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused CJD to be negative. CJD is clamped to zero.\n");
    2181                 :          0 : logprint(LOG_ERROR,"\n");
    2182                 :            : }
    2183                 :            : }
    2184                 :            : #if defined(_DERIVATE)
    2185                 :       2000 : t0_Vgatep_sourcep=0.0;
    2186                 :       2000 : t0_Vdrainp_sourcep=0.0;
    2187                 :       2000 : t0_Vdrainb_sourcep=0.0;
    2188                 :       2000 : t0_Vbulkp_sourcep=0.0;
    2189                 :       2000 : t0_Vsourceb_sourcep=0.0;
    2190                 :            : #endif
    2191                 :       2000 : t0=(tcjsw*deltemp);
    2192         [ +  - ]:       2000 : if
    2193                 :            : (t0>=(-1.0))
    2194                 :            : {
    2195                 :       2000 : cjsws_temp=(cjsws*(1.0+t0));
    2196                 :       2000 : cjswd_temp=(cjswd*(1.0+t0));
    2197                 :            : }
    2198                 :            : else
    2199                 :            : {
    2200         [ #  # ]:          0 : if
    2201                 :            : (cjsws>0.0)
    2202                 :            : {
    2203                 :          0 : cjsws_temp=0.0;
    2204                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused CJSWS to be negative. CJSWS is clamped to zero.");
    2205                 :          0 : logprint(LOG_ERROR,"\n");
    2206                 :            : }
    2207         [ #  # ]:          0 : if
    2208                 :            : (cjswd>0.0)
    2209                 :            : {
    2210                 :          0 : cjswd_temp=0.0;
    2211                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused CJSWD to be negative. CJSWD is clamped to zero.");
    2212                 :          0 : logprint(LOG_ERROR,"\n");
    2213                 :            : }
    2214                 :            : }
    2215                 :            : #if defined(_DERIVATE)
    2216                 :       2000 : t0_Vgatep_sourcep=0.0;
    2217                 :       2000 : t0_Vdrainp_sourcep=0.0;
    2218                 :       2000 : t0_Vdrainb_sourcep=0.0;
    2219                 :       2000 : t0_Vbulkp_sourcep=0.0;
    2220                 :       2000 : t0_Vsourceb_sourcep=0.0;
    2221                 :            : #endif
    2222                 :       2000 : t0=(tcjswg*deltemp);
    2223         [ +  - ]:       2000 : if
    2224                 :            : (t0>=(-1.0))
    2225                 :            : {
    2226                 :       2000 : cjswgs_temp=(cjswgs*(1.0+t0));
    2227                 :       2000 : cjswgd_temp=(cjswgd*(1.0+t0));
    2228                 :            : }
    2229                 :            : else
    2230                 :            : {
    2231         [ #  # ]:          0 : if
    2232                 :            : (cjswgs>0.0)
    2233                 :            : {
    2234                 :          0 : cjswgs_temp=0.0;
    2235                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused CJSWGS to be negative. CJSWGS is clamped to zero.");
    2236                 :          0 : logprint(LOG_ERROR,"\n");
    2237                 :            : }
    2238         [ #  # ]:          0 : if
    2239                 :            : (cjswgd>0.0)
    2240                 :            : {
    2241                 :          0 : cjswgd_temp=0.0;
    2242                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused CJSWGD to be negative. CJSWGD is clamped to zero.");
    2243                 :          0 : logprint(LOG_ERROR,"\n");
    2244                 :            : }
    2245                 :            : }
    2246                 :       2000 : phibs=(pbs-(tpb*deltemp));
    2247         [ -  + ]:       2000 : if
    2248                 :            : (phibs<0.01)
    2249                 :            : {
    2250                 :          0 : phibs=0.01;
    2251                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused PBS to be less than 0.01. PBS is clamped to 0.01.");
    2252                 :          0 : logprint(LOG_ERROR,"\n");
    2253                 :            : }
    2254                 :       2000 : phibd=(pbd-(tpb*deltemp));
    2255         [ -  + ]:       2000 : if
    2256                 :            : (phibd<0.01)
    2257                 :            : {
    2258                 :          0 : phibd=0.01;
    2259                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused PBD to be less than 0.01. PBD is clamped to 0.01.");
    2260                 :          0 : logprint(LOG_ERROR,"\n");
    2261                 :            : }
    2262                 :       2000 : phibsws=(pbsws-(tpbsw*deltemp));
    2263         [ -  + ]:       2000 : if
    2264                 :            : (phibsws<=0.01)
    2265                 :            : {
    2266                 :          0 : phibsws=0.01;
    2267                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused PBSWS to be less than 0.01. PBSWS is clamped to 0.01.");
    2268                 :          0 : logprint(LOG_ERROR,"\n");
    2269                 :            : }
    2270                 :       2000 : phibswd=(pbswd-(tpbsw*deltemp));
    2271         [ -  + ]:       2000 : if
    2272                 :            : (phibswd<=0.01)
    2273                 :            : {
    2274                 :          0 : phibswd=0.01;
    2275                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused PBSWD to be less than 0.01. PBSWD is clamped to 0.01.");
    2276                 :          0 : logprint(LOG_ERROR,"\n");
    2277                 :            : }
    2278                 :       2000 : phibswgs=(pbswgs-(tpbswg*deltemp));
    2279         [ -  + ]:       2000 : if
    2280                 :            : (phibswgs<=0.01)
    2281                 :            : {
    2282                 :          0 : phibswgs=0.01;
    2283                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused PBSWGS to be less than 0.01. PBSWGS is clamped to 0.01.");
    2284                 :          0 : logprint(LOG_ERROR,"\n");
    2285                 :            : }
    2286                 :       2000 : phibswgd=(pbswgd-(tpbswg*deltemp));
    2287         [ -  + ]:       2000 : if
    2288                 :            : (phibswgd<=0.01)
    2289                 :            : {
    2290                 :          0 : phibswgd=0.01;
    2291                 :          0 : logprint(LOG_ERROR,"Temperature effect has caused PBSWGD to be less than 0.01. PBSWGD is clamped to 0.01.");
    2292                 :          0 : logprint(LOG_ERROR,"\n");
    2293                 :            : }
    2294                 :       2000 : lnew=(l+xl);
    2295                 :       2000 : wnew=((w/nf)+xw);
    2296                 :            : {
    2297                 :       2000 : double m00_pow(d00_pow0,lnew,lln)
    2298                 :            : #if defined(_DERIVATE)
    2299                 :       2000 : t0_Vgatep_sourcep=0.0;
    2300                 :       2000 : t0_Vdrainp_sourcep=0.0;
    2301                 :       2000 : t0_Vdrainb_sourcep=0.0;
    2302                 :       2000 : t0_Vbulkp_sourcep=0.0;
    2303                 :       2000 : t0_Vsourceb_sourcep=0.0;
    2304                 :            : #endif
    2305                 :       2000 : t0=d00_pow0;
    2306                 :            : }
    2307                 :            : {
    2308                 :       2000 : double m00_pow(d00_pow0,wnew,lwn)
    2309                 :            : #if defined(_DERIVATE)
    2310                 :       2000 : t1_Vgatep_sourcep=0.0;
    2311                 :       2000 : t1_Vdrainp_sourcep=0.0;
    2312                 :       2000 : t1_Vdrainb_sourcep=0.0;
    2313                 :       2000 : t1_Vbulkp_sourcep=0.0;
    2314                 :       2000 : t1_Vsourceb_sourcep=0.0;
    2315                 :            : #endif
    2316                 :       2000 : t1=d00_pow0;
    2317                 :            : }
    2318                 :            : #if defined(_DERIVATE)
    2319                 :       2000 : tmp1_Vgatep_sourcep=0.0;
    2320                 :       2000 : tmp1_Vdrainp_sourcep=0.0;
    2321                 :       2000 : tmp1_Vdrainb_sourcep=0.0;
    2322                 :       2000 : tmp1_Vbulkp_sourcep=0.0;
    2323                 :       2000 : tmp1_Vsourceb_sourcep=0.0;
    2324                 :            : #endif
    2325                 :       2000 : tmp1=(((ll/t0)+(lw/t1))+(lwl/(t0*t1)));
    2326                 :       2000 : dl=(lint+tmp1);
    2327                 :            : #if defined(_DERIVATE)
    2328                 :       2000 : tmp2_Vgatep_sourcep=0.0;
    2329                 :       2000 : tmp2_Vdrainp_sourcep=0.0;
    2330                 :       2000 : tmp2_Vdrainb_sourcep=0.0;
    2331                 :       2000 : tmp2_Vbulkp_sourcep=0.0;
    2332                 :       2000 : tmp2_Vsourceb_sourcep=0.0;
    2333                 :            : #endif
    2334                 :       2000 : tmp2=(((llc/t0)+(lwc/t1))+(lwlc/(t0*t1)));
    2335                 :       2000 : dlc=(dlc+tmp2);
    2336                 :       2000 : dlcig=(dlcig+tmp2);
    2337                 :            : {
    2338                 :       2000 : double m00_pow(d00_pow0,lnew,wln)
    2339                 :            : #if defined(_DERIVATE)
    2340                 :       2000 : t2_Vgatep_sourcep=0.0;
    2341                 :       2000 : t2_Vdrainp_sourcep=0.0;
    2342                 :       2000 : t2_Vdrainb_sourcep=0.0;
    2343                 :       2000 : t2_Vbulkp_sourcep=0.0;
    2344                 :       2000 : t2_Vsourceb_sourcep=0.0;
    2345                 :            : #endif
    2346                 :       2000 : t2=d00_pow0;
    2347                 :            : }
    2348                 :            : {
    2349                 :       2000 : double m00_pow(d00_pow0,wnew,wwn)
    2350                 :            : #if defined(_DERIVATE)
    2351                 :       2000 : t3_Vgatep_sourcep=0.0;
    2352                 :       2000 : t3_Vdrainp_sourcep=0.0;
    2353                 :       2000 : t3_Vdrainb_sourcep=0.0;
    2354                 :       2000 : t3_Vbulkp_sourcep=0.0;
    2355                 :       2000 : t3_Vsourceb_sourcep=0.0;
    2356                 :            : #endif
    2357                 :       2000 : t3=d00_pow0;
    2358                 :            : }
    2359                 :            : #if defined(_DERIVATE)
    2360                 :       2000 : tmp1_Vgatep_sourcep=0.0;
    2361                 :       2000 : tmp1_Vdrainp_sourcep=0.0;
    2362                 :       2000 : tmp1_Vdrainb_sourcep=0.0;
    2363                 :       2000 : tmp1_Vbulkp_sourcep=0.0;
    2364                 :       2000 : tmp1_Vsourceb_sourcep=0.0;
    2365                 :            : #endif
    2366                 :       2000 : tmp1=(((wl/t2)+(ww/t3))+(wwl/(t2*t3)));
    2367                 :       2000 : dw=(wint+tmp1);
    2368                 :            : #if defined(_DERIVATE)
    2369                 :       2000 : tmp2_Vgatep_sourcep=0.0;
    2370                 :       2000 : tmp2_Vdrainp_sourcep=0.0;
    2371                 :       2000 : tmp2_Vdrainb_sourcep=0.0;
    2372                 :       2000 : tmp2_Vbulkp_sourcep=0.0;
    2373                 :       2000 : tmp2_Vsourceb_sourcep=0.0;
    2374                 :            : #endif
    2375                 :       2000 : tmp2=(((wlc/t2)+(wwc/t3))+(wwlc/(t2*t3)));
    2376                 :       2000 : dwj=(dwj+tmp2);
    2377                 :       2000 : leff=(lnew-(2.0*dl));
    2378                 :       2000 : weff=(wnew-(2.0*dw));
    2379                 :       2000 : leffcv=(lnew-(2.0*dlc));
    2380         [ -  + ]:       2000 : if
    2381                 :            : (leffcv<=0.0)
    2382                 :            : {
    2383                 :          0 : logprint(LOG_ERROR,"Fatal: Effective channel length for C-V <= 0");
    2384                 :          0 : logprint(LOG_ERROR,"\n");
    2385                 :          0 : exit(1);
    2386                 :            : }
    2387                 :       2000 : weffcv=(wnew-(2.0*dwc));
    2388         [ -  + ]:       2000 : if
    2389                 :            : (weffcv<=0.0)
    2390                 :            : {
    2391                 :          0 : logprint(LOG_ERROR,"Fatal: Effective channel width for C-V <= 0");
    2392                 :          0 : logprint(LOG_ERROR,"\n");
    2393                 :          0 : exit(1);
    2394                 :            : }
    2395         [ -  + ]:       2000 : if
    2396                 :            : (leff<=1.0e-9)
    2397                 :            : {
    2398                 :          0 : logprint(LOG_ERROR,"Warning: leff = %e <= 1.0e-9. Recommended leff >= 1e-8.",leff);
    2399                 :          0 : logprint(LOG_ERROR,"\n");
    2400                 :            : }
    2401         [ -  + ]:       2000 : if
    2402                 :            : (weff<=1.0e-9)
    2403                 :            : {
    2404                 :          0 : logprint(LOG_ERROR,"Warning: weff = %e <= 1.0e-9. Recommended weff >= 1e-7.",weff);
    2405                 :          0 : logprint(LOG_ERROR,"\n");
    2406                 :            : }
    2407         [ -  + ]:       2000 : if
    2408                 :            : (leffcv<=1.0e-9)
    2409                 :            : {
    2410                 :          0 : logprint(LOG_ERROR,"warning: leff for CV = %e <= 1.0e-9. recommended leffcv >=1e-8 ",leffcv);
    2411                 :          0 : logprint(LOG_ERROR,"\n");
    2412                 :            : }
    2413         [ -  + ]:       2000 : if
    2414                 :            : (weffcv<=1.0e-9)
    2415                 :            : {
    2416                 :          0 : logprint(LOG_ERROR,"warning: weff for CV = %e <= 1.0e-9. recommended weffcv >= 1e-7 ",weffcv);
    2417                 :          0 : logprint(LOG_ERROR,"\n");
    2418                 :            : }
    2419                 :       2000 : weffcj=(wnew-(2.0*dwj));
    2420         [ -  + ]:       2000 : if
    2421                 :            : (weffcj<=0.0)
    2422                 :            : {
    2423                 :          0 : logprint(LOG_ERROR,"Fatal: Effective channel width for S/D junctions <= 0.");
    2424                 :          0 : logprint(LOG_ERROR,"\n");
    2425                 :          0 : exit(1);
    2426                 :            : }
    2427                 :            : {
    2428                 :       2000 : double m00_pow(d00_pow0,(clc/leffcv),cle)
    2429                 :       2000 : abulkcvfactor=(1.0+d00_pow0);
    2430                 :            : }
    2431                 :            : #if defined(_DERIVATE)
    2432                 :       2000 : t0_Vgatep_sourcep=0.0;
    2433                 :       2000 : t0_Vdrainp_sourcep=0.0;
    2434                 :       2000 : t0_Vdrainb_sourcep=0.0;
    2435                 :       2000 : t0_Vbulkp_sourcep=0.0;
    2436                 :       2000 : t0_Vsourceb_sourcep=0.0;
    2437                 :            : #endif
    2438                 :       2000 : t0=(tratio-1.0);
    2439                 :            : {
    2440                 :       2000 : double m00_pow(d00_pow0,(weffcj*1.0e6),wr)
    2441                 :       2000 : powweffwr=(d00_pow0*nf);
    2442                 :            : }
    2443                 :            : #if defined(_DERIVATE)
    2444                 :       2000 : t1_Vgatep_sourcep=0.0;
    2445                 :       2000 : t1_Vdrainp_sourcep=0.0;
    2446                 :       2000 : t1_Vdrainb_sourcep=0.0;
    2447                 :       2000 : t1_Vbulkp_sourcep=0.0;
    2448                 :       2000 : t1_Vsourceb_sourcep=0.0;
    2449                 :            : #endif
    2450                 :       2000 : t1=0.0;
    2451                 :            : #if defined(_DERIVATE)
    2452                 :       2000 : t2_Vgatep_sourcep=0.0;
    2453                 :       2000 : t2_Vdrainp_sourcep=0.0;
    2454                 :       2000 : t2_Vdrainb_sourcep=0.0;
    2455                 :       2000 : t2_Vbulkp_sourcep=0.0;
    2456                 :       2000 : t2_Vsourceb_sourcep=0.0;
    2457                 :            : #endif
    2458                 :       2000 : t2=0.0;
    2459                 :            : #if defined(_DERIVATE)
    2460                 :       2000 : t3_Vgatep_sourcep=0.0;
    2461                 :       2000 : t3_Vdrainp_sourcep=0.0;
    2462                 :       2000 : t3_Vdrainb_sourcep=0.0;
    2463                 :       2000 : t3_Vbulkp_sourcep=0.0;
    2464                 :       2000 : t3_Vsourceb_sourcep=0.0;
    2465                 :            : #endif
    2466                 :       2000 : t3=0.0;
    2467                 :            : #if defined(_DERIVATE)
    2468                 :       2000 : t4_Vgatep_sourcep=0.0;
    2469                 :       2000 : t4_Vdrainp_sourcep=0.0;
    2470                 :       2000 : t4_Vdrainb_sourcep=0.0;
    2471                 :       2000 : t4_Vbulkp_sourcep=0.0;
    2472                 :       2000 : t4_Vsourceb_sourcep=0.0;
    2473                 :            : #endif
    2474                 :       2000 : t4=0.0;
    2475         [ +  - ]:       2000 : if
    2476                 :            : (tempmod==0)
    2477                 :            : {
    2478                 :       2000 : ua=(ua+(ua1*t0));
    2479                 :       2000 : ub=(ub+(ub1*t0));
    2480                 :       2000 : uc=(uc+(uc1*t0));
    2481                 :       2000 : vsattemp=(vsat-(at*t0));
    2482                 :            : #if defined(_DERIVATE)
    2483                 :       2000 : t10_Vgatep_sourcep=0.0;
    2484                 :       2000 : t10_Vdrainp_sourcep=0.0;
    2485                 :       2000 : t10_Vdrainb_sourcep=0.0;
    2486                 :       2000 : t10_Vbulkp_sourcep=0.0;
    2487                 :       2000 : t10_Vsourceb_sourcep=0.0;
    2488                 :            : #endif
    2489                 :       2000 : t10=(prt*t0);
    2490         [ -  + ]:       2000 : if
    2491                 :            : (rdsmod==1)
    2492                 :            : {
    2493                 :            : #if defined(_DERIVATE)
    2494                 :          0 : t1_Vgatep_sourcep=0.0;
    2495                 :          0 : t1_Vdrainp_sourcep=0.0;
    2496                 :          0 : t1_Vdrainb_sourcep=0.0;
    2497                 :          0 : t1_Vbulkp_sourcep=0.0;
    2498                 :          0 : t1_Vsourceb_sourcep=0.0;
    2499                 :            : #endif
    2500                 :          0 : t1=(rdw+t10);
    2501                 :            : #if defined(_DERIVATE)
    2502                 :          0 : t2_Vgatep_sourcep=0.0;
    2503                 :          0 : t2_Vdrainp_sourcep=0.0;
    2504                 :          0 : t2_Vdrainb_sourcep=0.0;
    2505                 :          0 : t2_Vbulkp_sourcep=0.0;
    2506                 :          0 : t2_Vsourceb_sourcep=0.0;
    2507                 :            : #endif
    2508                 :          0 : t2=(rdwmin+t10);
    2509                 :            : #if defined(_DERIVATE)
    2510                 :          0 : t3_Vgatep_sourcep=0.0;
    2511                 :          0 : t3_Vdrainp_sourcep=0.0;
    2512                 :          0 : t3_Vdrainb_sourcep=0.0;
    2513                 :          0 : t3_Vbulkp_sourcep=0.0;
    2514                 :          0 : t3_Vsourceb_sourcep=0.0;
    2515                 :            : #endif
    2516                 :          0 : t3=(rsw+t10);
    2517                 :            : #if defined(_DERIVATE)
    2518                 :          0 : t4_Vgatep_sourcep=0.0;
    2519                 :          0 : t4_Vdrainp_sourcep=0.0;
    2520                 :          0 : t4_Vdrainb_sourcep=0.0;
    2521                 :          0 : t4_Vbulkp_sourcep=0.0;
    2522                 :          0 : t4_Vsourceb_sourcep=0.0;
    2523                 :            : #endif
    2524                 :          0 : t4=(rswmin+t10);
    2525                 :            : }
    2526                 :       2000 : rds0=(((rdsw+t10)*nf)/powweffwr);
    2527                 :       2000 : rdswmin=(((rdswmin+t10)*nf)/powweffwr);
    2528                 :            : }
    2529                 :            : else
    2530                 :            : {
    2531                 :          0 : ua=(ua*(1.0+(ua1*deltemp)));
    2532                 :          0 : ub=(ub*(1.0+(ub1*deltemp)));
    2533                 :          0 : uc=(uc*(1.0+(uc1*deltemp)));
    2534                 :          0 : vsattemp=(vsat*(1.0-(at*deltemp)));
    2535                 :            : #if defined(_DERIVATE)
    2536                 :          0 : t10_Vgatep_sourcep=0.0;
    2537                 :          0 : t10_Vdrainp_sourcep=0.0;
    2538                 :          0 : t10_Vdrainb_sourcep=0.0;
    2539                 :          0 : t10_Vbulkp_sourcep=0.0;
    2540                 :          0 : t10_Vsourceb_sourcep=0.0;
    2541                 :            : #endif
    2542                 :          0 : t10=(1.0+(prt*deltemp));
    2543         [ #  # ]:          0 : if
    2544                 :            : (rdsmod==1)
    2545                 :            : {
    2546                 :            : #if defined(_DERIVATE)
    2547                 :          0 : t1_Vgatep_sourcep=0.0;
    2548                 :          0 : t1_Vdrainp_sourcep=0.0;
    2549                 :          0 : t1_Vdrainb_sourcep=0.0;
    2550                 :          0 : t1_Vbulkp_sourcep=0.0;
    2551                 :          0 : t1_Vsourceb_sourcep=0.0;
    2552                 :            : #endif
    2553                 :          0 : t1=(rdw*t10);
    2554                 :            : #if defined(_DERIVATE)
    2555                 :          0 : t2_Vgatep_sourcep=0.0;
    2556                 :          0 : t2_Vdrainp_sourcep=0.0;
    2557                 :          0 : t2_Vdrainb_sourcep=0.0;
    2558                 :          0 : t2_Vbulkp_sourcep=0.0;
    2559                 :          0 : t2_Vsourceb_sourcep=0.0;
    2560                 :            : #endif
    2561                 :          0 : t2=(rdwmin*t10);
    2562                 :            : #if defined(_DERIVATE)
    2563                 :          0 : t3_Vgatep_sourcep=0.0;
    2564                 :          0 : t3_Vdrainp_sourcep=0.0;
    2565                 :          0 : t3_Vdrainb_sourcep=0.0;
    2566                 :          0 : t3_Vbulkp_sourcep=0.0;
    2567                 :          0 : t3_Vsourceb_sourcep=0.0;
    2568                 :            : #endif
    2569                 :          0 : t3=(rsw*t10);
    2570                 :            : #if defined(_DERIVATE)
    2571                 :          0 : t4_Vgatep_sourcep=0.0;
    2572                 :          0 : t4_Vdrainp_sourcep=0.0;
    2573                 :          0 : t4_Vdrainb_sourcep=0.0;
    2574                 :          0 : t4_Vbulkp_sourcep=0.0;
    2575                 :          0 : t4_Vsourceb_sourcep=0.0;
    2576                 :            : #endif
    2577                 :          0 : t4=(rswmin*t10);
    2578                 :            : }
    2579                 :          0 : rds0=(((rdsw*t10)*nf)/powweffwr);
    2580                 :          0 : rdswmin=(((rdswmin*t10)*nf)/powweffwr);
    2581                 :            : }
    2582         [ -  + ]:       2000 : if
    2583                 :            : (t1<0.0)
    2584                 :            : {
    2585                 :            : #if defined(_DERIVATE)
    2586                 :          0 : t1_Vgatep_sourcep=0.0;
    2587                 :          0 : t1_Vdrainp_sourcep=0.0;
    2588                 :          0 : t1_Vdrainb_sourcep=0.0;
    2589                 :          0 : t1_Vbulkp_sourcep=0.0;
    2590                 :          0 : t1_Vsourceb_sourcep=0.0;
    2591                 :            : #endif
    2592                 :          0 : t1=0.0;
    2593                 :          0 : logprint(LOG_ERROR,"Warning: rdw at current temperature is negative; set to 0.");
    2594                 :          0 : logprint(LOG_ERROR,"\n");
    2595                 :            : }
    2596         [ -  + ]:       2000 : if
    2597                 :            : (t2<0.0)
    2598                 :            : {
    2599                 :            : #if defined(_DERIVATE)
    2600                 :          0 : t2_Vgatep_sourcep=0.0;
    2601                 :          0 : t2_Vdrainp_sourcep=0.0;
    2602                 :          0 : t2_Vdrainb_sourcep=0.0;
    2603                 :          0 : t2_Vbulkp_sourcep=0.0;
    2604                 :          0 : t2_Vsourceb_sourcep=0.0;
    2605                 :            : #endif
    2606                 :          0 : t2=0.0;
    2607                 :          0 : logprint(LOG_ERROR,"Warning: rdwmin at current temperature is negative; set to 0.");
    2608                 :          0 : logprint(LOG_ERROR,"\n");
    2609                 :            : }
    2610                 :       2000 : rd0=(t1/powweffwr);
    2611                 :       2000 : rdwmin=(t2/powweffwr);
    2612         [ -  + ]:       2000 : if
    2613                 :            : (t3<0.0)
    2614                 :            : {
    2615                 :            : #if defined(_DERIVATE)
    2616                 :          0 : t3_Vgatep_sourcep=0.0;
    2617                 :          0 : t3_Vdrainp_sourcep=0.0;
    2618                 :          0 : t3_Vdrainb_sourcep=0.0;
    2619                 :          0 : t3_Vbulkp_sourcep=0.0;
    2620                 :          0 : t3_Vsourceb_sourcep=0.0;
    2621                 :            : #endif
    2622                 :          0 : t3=0.0;
    2623                 :          0 : logprint(LOG_ERROR,"Warning: rsw at current temperature is negative; set to 0.");
    2624                 :          0 : logprint(LOG_ERROR,"\n");
    2625                 :            : }
    2626         [ -  + ]:       2000 : if
    2627                 :            : (t4<0.0)
    2628                 :            : {
    2629                 :            : #if defined(_DERIVATE)
    2630                 :          0 : t4_Vgatep_sourcep=0.0;
    2631                 :          0 : t4_Vdrainp_sourcep=0.0;
    2632                 :          0 : t4_Vdrainb_sourcep=0.0;
    2633                 :          0 : t4_Vbulkp_sourcep=0.0;
    2634                 :          0 : t4_Vsourceb_sourcep=0.0;
    2635                 :            : #endif
    2636                 :          0 : t4=0.0;
    2637                 :          0 : logprint(LOG_ERROR,"Warning: rswmin at current temperature is negative; set to 0.");
    2638                 :          0 : logprint(LOG_ERROR,"\n");
    2639                 :            : }
    2640                 :       2000 : rs0=(t3/powweffwr);
    2641                 :       2000 : rswmin=(t4/powweffwr);
    2642         [ -  + ]:       2000 : if
    2643                 :            : (u0>1.0)
    2644                 :            : {
    2645                 :          0 : u0=(u0/1.0e4);
    2646                 :            : }
    2647                 :            : {
    2648                 :       2000 : double m00_pow(d00_pow0,tratio,ute)
    2649                 :       2000 : u0temp=(u0*d00_pow0);
    2650                 :            : }
    2651         [ -  + ]:       2000 : if
    2652                 :            : (u0temp<=0.0)
    2653                 :            : {
    2654                 :          0 : logprint(LOG_ERROR,"Fatal: U0 at current temperature = %e is not positive.",u0temp);
    2655                 :          0 : logprint(LOG_ERROR,"\n");
    2656                 :          0 : exit(1);
    2657                 :            : }
    2658         [ -  + ]:       2000 : if
    2659                 :            : (eu<0.0)
    2660                 :            : {
    2661                 :          0 : eu=0.0;
    2662                 :          0 : logprint(LOG_ERROR,"Warning: EU has been negative; reset to 0.0.");
    2663                 :          0 : logprint(LOG_ERROR,"\n");
    2664                 :            : }
    2665         [ -  + ]:       2000 : if
    2666                 :            : (vsattemp<=0.0)
    2667                 :            : {
    2668                 :          0 : logprint(LOG_ERROR,"Fatal: VSAT at current temperature = %e is not positive.",vsattemp);
    2669                 :          0 : logprint(LOG_ERROR,"\n");
    2670                 :          0 : exit(1);
    2671                 :            : }
    2672         [ -  + ]:       2000 : if
    2673                 :            : (vsattemp<1.0e3)
    2674                 :            : {
    2675                 :          0 : logprint(LOG_ERROR,"Warning: VSAT at current temperature = %e may be too small.",vsattemp);
    2676                 :          0 : logprint(LOG_ERROR,"\n");
    2677                 :            : }
    2678         [ -  + ]:       2000 : if
    2679                 :            : (rds0<0.0)
    2680                 :            : {
    2681                 :          0 : logprint(LOG_ERROR,"Warning: Rds at current temperature = %e is negative. Set to zero.",rds0);
    2682                 :          0 : logprint(LOG_ERROR,"\n");
    2683                 :          0 : rds0=0.0;
    2684                 :            : }
    2685         [ -  + ]:       2000 : if
    2686                 :            : (rdsw<0.0)
    2687                 :            : {
    2688                 :          0 : logprint(LOG_ERROR,"Warning: rdsw = %e is negative. Set to zero.",rdsw);
    2689                 :          0 : logprint(LOG_ERROR,"\n");
    2690                 :            : #if defined(_DYNAMIC)
    2691                 :          0 : rdsw=0.0;
    2692                 :            : #endif
    2693                 :          0 : rds0=0.0;
    2694                 :            : }
    2695         [ -  + ]:       2000 : if
    2696                 :            : (rdswmin<0.0)
    2697                 :            : {
    2698                 :          0 : logprint(LOG_ERROR,"Warning: rdswmin at current temperature = %e is negative. Set to zero.",rdswmin);
    2699                 :          0 : logprint(LOG_ERROR,"\n");
    2700                 :          0 : rdswmin=0.0;
    2701                 :            : }
    2702         [ -  + ]:       2000 : if
    2703                 :            : (b1==(-weff))
    2704                 :            : {
    2705                 :          0 : logprint(LOG_ERROR,"Fatal: (B1 + weff) = 0 causing divided-by-zero.");
    2706                 :          0 : logprint(LOG_ERROR,"\n");
    2707                 :          0 : exit(1);
    2708                 :            : }
    2709                 :            : {
    2710         [ -  + ]:       2000 : double m00_abs(d00_abs0,(1.0e-6/(b1+weff)))
    2711         [ -  + ]:       2000 : if
    2712                 :            : (d00_abs0>10.0)
    2713                 :            : {
    2714                 :          0 : logprint(LOG_ERROR,"Warning: (B1 + weff) may be too small.");
    2715                 :          0 : logprint(LOG_ERROR,"\n");
    2716                 :            : }
    2717                 :            : }
    2718 [ -  + ][ #  # ]:       2000 : if
    2719                 :            : ((vtl!=(-99.0))&&(vtl>0.0))
    2720                 :            : {
    2721         [ #  # ]:          0 : if
    2722                 :            : (lc<0.0)
    2723                 :            : {
    2724                 :          0 : lc=0.0;
    2725                 :            : }
    2726                 :            : #if defined(_DERIVATE)
    2727                 :          0 : t0_Vgatep_sourcep=0.0;
    2728                 :          0 : t0_Vdrainp_sourcep=0.0;
    2729                 :          0 : t0_Vdrainb_sourcep=0.0;
    2730                 :          0 : t0_Vbulkp_sourcep=0.0;
    2731                 :          0 : t0_Vsourceb_sourcep=0.0;
    2732                 :            : #endif
    2733                 :          0 : t0=(leff/((xn*leff)+lc));
    2734                 :          0 : tfactor=((1.0-t0)/(1.0+t0));
    2735                 :            : }
    2736         [ +  - ]:       2000 : if
    2737                 :            : (cf==(-99.0))
    2738                 :            : {
    2739                 :            : {
    2740                 :       2000 : double m00_logE(d00_logE0,(1.0+(0.4e-6/toxe)))
    2741                 :       2000 : cf=((((2.0*epsrox)*8.85418e-12)/3.141592654)*d00_logE0);
    2742                 :            : }
    2743                 :            : }
    2744                 :       2000 : param_cgdo=((param_cgdo+cf)*weffcv);
    2745                 :       2000 : param_cgso=((param_cgso+cf)*weffcv);
    2746                 :       2000 : cgbo=((cgbo*leffcv)*nf);
    2747 [ +  - ][ -  + ]:       2000 : if
    2748                 :            : ((ndep==(-99.0))&&(gamma1!=(-99.0)))
    2749                 :            : {
    2750                 :            : #if defined(_DERIVATE)
    2751                 :          0 : t0_Vgatep_sourcep=0.0;
    2752                 :          0 : t0_Vdrainp_sourcep=0.0;
    2753                 :          0 : t0_Vdrainb_sourcep=0.0;
    2754                 :          0 : t0_Vbulkp_sourcep=0.0;
    2755                 :          0 : t0_Vsourceb_sourcep=0.0;
    2756                 :            : #endif
    2757                 :          0 : t0=(gamma1*coxe);
    2758                 :          0 : ndep=((3.01248e22*t0)*t0);
    2759                 :            : }
    2760                 :            : else
    2761                 :            : {
    2762 [ -  + ][ #  # ]:       2000 : if
    2763                 :            : ((ndep!=(-99.0))&&(gamma1==(-99.0)))
    2764                 :            : {
    2765                 :            : {
    2766                 :          0 : double m00_sqrt(d00_sqrt0,ndep)
    2767                 :          0 : gamma1=((5.753e-12*d00_sqrt0)/coxe);
    2768                 :          0 : }
    2769                 :            : }
    2770                 :            : else
    2771                 :            : {
    2772 [ +  - ][ +  - ]:       2000 : if
    2773                 :            : ((ndep==(-99.0))&&(gamma1==(-99.0)))
    2774                 :            : {
    2775                 :       2000 : ndep=1.0e17;
    2776                 :            : {
    2777                 :       2000 : double m00_sqrt(d00_sqrt0,ndep)
    2778                 :       2000 : gamma1=((5.753e-12*d00_sqrt0)/coxe);
    2779                 :            : }
    2780                 :            : }
    2781                 :            : }
    2782                 :            : }
    2783         [ -  + ]:       2000 : if
    2784                 :            : (ndep<=0.0)
    2785                 :            : {
    2786                 :          0 : logprint(LOG_ERROR,"Fatal: NDEP = %e is not positive.",ndep);
    2787                 :          0 : logprint(LOG_ERROR,"\n");
    2788                 :          0 : exit(1);
    2789                 :            : }
    2790         [ -  + ]:       2000 : if
    2791                 :            : (ndep<=1.0e12)
    2792                 :            : {
    2793                 :          0 : logprint(LOG_ERROR,"Warning: NDEP = %e may be too small.",ndep);
    2794                 :          0 : logprint(LOG_ERROR,"\n");
    2795                 :            : }
    2796                 :            : else
    2797                 :            : {
    2798         [ -  + ]:       2000 : if
    2799                 :            : (ndep>=1.0e21)
    2800                 :            : {
    2801                 :          0 : logprint(LOG_ERROR,"Warning: NDEP = %e may be too large.",ndep);
    2802                 :          0 : logprint(LOG_ERROR,"\n");
    2803                 :            : }
    2804                 :            : }
    2805         [ +  - ]:       2000 : if
    2806                 :            : (gamma2==(-99.0))
    2807                 :            : {
    2808                 :            : {
    2809                 :       2000 : double m00_sqrt(d00_sqrt0,nsub)
    2810                 :       2000 : gamma2=((5.753e-12*d00_sqrt0)/coxe);
    2811                 :            : }
    2812                 :            : }
    2813                 :            : {
    2814                 :       2000 : double m00_logE(d00_logE0,(ndep/ni))
    2815                 :       2000 : phi=(((vtm0*d00_logE0)+phin)+0.4);
    2816                 :            : }
    2817                 :            : {
    2818                 :       2000 : double m00_sqrt(d00_sqrt0,phi)
    2819                 :       2000 : sqrtphi=d00_sqrt0;
    2820                 :            : }
    2821                 :            : {
    2822                 :       2000 : double m00_sqrt(d00_sqrt0,((2.0*1.03594e-10)/((1.60219e-19*ndep)*1.0e6)))
    2823                 :       2000 : xdep0=(d00_sqrt0*sqrtphi);
    2824                 :            : }
    2825                 :            : {
    2826                 :       2000 : double m00_sqrt(d00_sqrt0,((3.0*xj)*toxe))
    2827                 :       2000 : litl=d00_sqrt0;
    2828                 :            : }
    2829                 :            : {
    2830                 :       2000 : double m00_logE(d00_logE0,((nsd*ndep)/(ni*ni)))
    2831                 :       2000 : vbi=(vtm0*d00_logE0);
    2832                 :            : }
    2833         [ -  + ]:       2000 : if
    2834                 :            : (ngate>0.0)
    2835                 :            : {
    2836                 :            : {
    2837                 :          0 : double m00_logE(d00_logE0,(ngate/nsd))
    2838                 :          0 : vfbsd=(vtm0*d00_logE0);
    2839                 :            : }
    2840                 :            : }
    2841                 :            : else
    2842                 :            : {
    2843                 :       2000 : vfbsd=0.0;
    2844                 :            : }
    2845                 :            : {
    2846                 :       2000 : double m00_sqrt(d00_sqrt0,(((((1.60219e-19*1.03594e-10)*ndep)*1.0e6)/2.0)/phi))
    2847                 :       2000 : cdep0=d00_sqrt0;
    2848                 :            : }
    2849                 :            : {
    2850                 :       2000 : double m00_logE(d00_logE0,(toxref/toxe))
    2851                 :       2000 : double m00_exp(d00_exp1,(ntox*d00_logE0))
    2852                 :       2000 : toxratio=((d00_exp1/toxe)/toxe);
    2853                 :            : }
    2854                 :            : {
    2855                 :       2000 : double m00_logE(d00_logE0,(toxref/(toxe*poxedge)))
    2856                 :       2000 : double m00_exp(d00_exp1,(ntox*d00_logE0))
    2857                 :       2000 : toxratioedge=((((d00_exp1/toxe)/toxe)/poxedge)/poxedge);
    2858                 :            : }
    2859                 :            : {
    2860                 :       2000 : double m00_atan(d00_atan0,minv)
    2861                 :       2000 : mstar=(0.5+(d00_atan0/3.141592654));
    2862                 :            : }
    2863                 :       2000 : voffcbn=(voff+(voffl/leff));
    2864                 :            : {
    2865                 :       2000 : double m00_sqrt(d00_sqrt0,((1.03594e-10*vtm0)/((1.60219e-19*ndep)*1.0e6)))
    2866                 :       2000 : ldeb=(d00_sqrt0/3.0);
    2867                 :            : }
    2868                 :            : {
    2869                 :       2000 : double m00_pow(d00_pow0,(ndep/2.0e16),(-0.25))
    2870                 :       2000 : acde=(acde*d00_pow0);
    2871                 :            : }
    2872         [ +  - ]:       2000 : if
    2873                 :            : (capmod==2)
    2874                 :            : {
    2875         [ -  + ]:       2000 : if
    2876                 :            : (acde<0.1)
    2877                 :            : {
    2878                 :          0 : logprint(LOG_ERROR,"Warning: ACDE = %e is too small.",acde);
    2879                 :          0 : logprint(LOG_ERROR,"\n");
    2880                 :            : }
    2881         [ -  + ]:       2000 : if
    2882                 :            : (acde>1.6)
    2883                 :            : {
    2884                 :          0 : logprint(LOG_ERROR,"Warning: ACDE = %e is too large.",acde);
    2885                 :          0 : logprint(LOG_ERROR,"\n");
    2886                 :            : }
    2887                 :            : }
    2888 [ +  - ][ -  + ]:       2000 : if
    2889                 :            : ((k1!=(-99.0))||(k2!=(-99.0)))
    2890                 :            : {
    2891         [ #  # ]:          0 : if
    2892                 :            : (k1==(-99.0))
    2893                 :            : {
    2894                 :          0 : logprint(LOG_ERROR,"Warning: K1 should be specified with K2.");
    2895                 :          0 : logprint(LOG_ERROR,"\n");
    2896                 :          0 : k1=0.53;
    2897                 :            : }
    2898         [ #  # ]:          0 : if
    2899                 :            : (k2==(-99.0))
    2900                 :            : {
    2901                 :          0 : logprint(LOG_ERROR,"Warning: K2 should be specified with K1.");
    2902                 :          0 : logprint(LOG_ERROR,"\n");
    2903                 :          0 : k2=(-0.0186);
    2904                 :            : }
    2905                 :            : }
    2906                 :            : else
    2907                 :            : {
    2908         [ +  - ]:       2000 : if
    2909                 :            : (vbx==(-99.0))
    2910                 :            : {
    2911                 :       2000 : vbx=(phi-(((7.7348e-4*ndep)*xt)*xt));
    2912                 :            : }
    2913         [ -  + ]:       2000 : if
    2914                 :            : (vbx>0.0)
    2915                 :            : {
    2916                 :          0 : vbx=(-vbx);
    2917                 :            : }
    2918         [ -  + ]:       2000 : if
    2919                 :            : (vbm>0.0)
    2920                 :            : {
    2921                 :          0 : vbm=(-vbm);
    2922                 :            : }
    2923                 :            : #if defined(_DERIVATE)
    2924                 :       2000 : t0_Vgatep_sourcep=0.0;
    2925                 :       2000 : t0_Vdrainp_sourcep=0.0;
    2926                 :       2000 : t0_Vdrainb_sourcep=0.0;
    2927                 :       2000 : t0_Vbulkp_sourcep=0.0;
    2928                 :       2000 : t0_Vsourceb_sourcep=0.0;
    2929                 :            : #endif
    2930                 :       2000 : t0=(gamma1-gamma2);
    2931                 :            : {
    2932                 :       2000 : double m00_sqrt(d00_sqrt0,(phi-vbx))
    2933                 :            : #if defined(_DERIVATE)
    2934                 :       2000 : t1_Vgatep_sourcep=0.0;
    2935                 :       2000 : t1_Vdrainp_sourcep=0.0;
    2936                 :       2000 : t1_Vdrainb_sourcep=0.0;
    2937                 :       2000 : t1_Vbulkp_sourcep=0.0;
    2938                 :       2000 : t1_Vsourceb_sourcep=0.0;
    2939                 :            : #endif
    2940                 :       2000 : t1=(d00_sqrt0-sqrtphi);
    2941                 :            : }
    2942                 :            : {
    2943                 :       2000 : double m00_sqrt(d00_sqrt0,(phi*(phi-vbm)))
    2944                 :            : #if defined(_DERIVATE)
    2945                 :       2000 : t2_Vgatep_sourcep=0.0;
    2946                 :       2000 : t2_Vdrainp_sourcep=0.0;
    2947                 :       2000 : t2_Vdrainb_sourcep=0.0;
    2948                 :       2000 : t2_Vbulkp_sourcep=0.0;
    2949                 :       2000 : t2_Vsourceb_sourcep=0.0;
    2950                 :            : #endif
    2951                 :       2000 : t2=(d00_sqrt0-phi);
    2952                 :            : }
    2953                 :       2000 : k2=((t0*t1)/((2.0*t2)+vbm));
    2954                 :            : {
    2955                 :       2000 : double m00_sqrt(d00_sqrt0,(phi-vbm))
    2956                 :       2000 : k1=(gamma2-((2.0*k2)*d00_sqrt0));
    2957                 :            : }
    2958                 :            : }
    2959         [ +  - ]:       2000 : if
    2960                 :            : (k2<0.0)
    2961                 :            : {
    2962                 :            : #if defined(_DERIVATE)
    2963                 :       2000 : t0_Vgatep_sourcep=0.0;
    2964                 :       2000 : t0_Vdrainp_sourcep=0.0;
    2965                 :       2000 : t0_Vdrainb_sourcep=0.0;
    2966                 :       2000 : t0_Vbulkp_sourcep=0.0;
    2967                 :       2000 : t0_Vsourceb_sourcep=0.0;
    2968                 :            : #endif
    2969                 :       2000 : t0=((0.5*k1)/k2);
    2970                 :       2000 : vbsc=(0.9*(phi-(t0*t0)));
    2971         [ -  + ]:       2000 : if
    2972                 :            : (vbsc>(-3.0))
    2973                 :            : {
    2974                 :          0 : vbsc=(-3.0);
    2975                 :            : }
    2976                 :            : else
    2977                 :            : {
    2978         [ +  - ]:       2000 : if
    2979                 :            : (vbsc<(-30.0))
    2980                 :            : {
    2981                 :       2000 : vbsc=(-30.0);
    2982                 :            : }
    2983                 :            : }
    2984                 :            : }
    2985                 :            : else
    2986                 :            : {
    2987                 :          0 : vbsc=(-30.0);
    2988                 :            : }
    2989         [ -  + ]:       2000 : if
    2990                 :            : (vbsc>vbm)
    2991                 :            : {
    2992                 :          0 : vbsc=vbm;
    2993                 :            : }
    2994         [ +  - ]:       2000 : if
    2995                 :            : (vfb==(-99.0))
    2996                 :            : {
    2997         [ +  - ]:       2000 : if
    2998                 :            : (vth0!=(-99.0))
    2999                 :            : {
    3000                 :       2000 : vfb=(((type*vth0)-phi)-(k1*sqrtphi));
    3001                 :            : }
    3002                 :            : else
    3003                 :            : {
    3004                 :          0 : vfb=(-1.0);
    3005                 :            : }
    3006                 :            : }
    3007         [ -  + ]:       2000 : if
    3008                 :            : (vth0==(-99.0))
    3009                 :            : {
    3010                 :          0 : vth0=(type*((vfb+phi)+(k1*sqrtphi)));
    3011                 :            : }
    3012                 :       2000 : k1ox=((k1*toxe)/toxm);
    3013                 :       2000 : k2ox=((k2*toxe)/toxm);
    3014                 :            : #if defined(_DERIVATE)
    3015                 :       2000 : t3_Vgatep_sourcep=0.0;
    3016                 :       2000 : t3_Vdrainp_sourcep=0.0;
    3017                 :       2000 : t3_Vdrainb_sourcep=0.0;
    3018                 :       2000 : t3_Vbulkp_sourcep=0.0;
    3019                 :       2000 : t3_Vsourceb_sourcep=0.0;
    3020                 :            : #endif
    3021                 :       2000 : t3=(((type*vth0)-vfb)-phi);
    3022                 :            : #if defined(_DERIVATE)
    3023                 :       2000 : t4_Vgatep_sourcep=0.0;
    3024                 :       2000 : t4_Vdrainp_sourcep=0.0;
    3025                 :       2000 : t4_Vdrainb_sourcep=0.0;
    3026                 :       2000 : t4_Vbulkp_sourcep=0.0;
    3027                 :       2000 : t4_Vsourceb_sourcep=0.0;
    3028                 :            : #endif
    3029                 :       2000 : t4=(t3+t3);
    3030                 :            : #if defined(_DERIVATE)
    3031                 :       2000 : t5_Vgatep_sourcep=0.0;
    3032                 :       2000 : t5_Vdrainp_sourcep=0.0;
    3033                 :       2000 : t5_Vdrainb_sourcep=0.0;
    3034                 :       2000 : t5_Vbulkp_sourcep=0.0;
    3035                 :       2000 : t5_Vsourceb_sourcep=0.0;
    3036                 :            : #endif
    3037                 :       2000 : t5=(2.5*t3);
    3038         [ +  - ]:       2000 : vtfbphi1=((type==1)?t4:t5);
    3039         [ -  + ]:       2000 : if
    3040                 :            : (vtfbphi1<0.0)
    3041                 :            : {
    3042                 :          0 : vtfbphi1=0.0;
    3043                 :            : }
    3044                 :       2000 : vtfbphi2=(4.0*t3);
    3045         [ -  + ]:       2000 : if
    3046                 :            : (vtfbphi2<0.0)
    3047                 :            : {
    3048                 :          0 : vtfbphi2=0.0;
    3049                 :            : }
    3050                 :            : {
    3051                 :       2000 : double m00_sqrt(d00_sqrt0,(((1.03594e-10/(epsrox*8.85418e-12))*toxe)*xdep0))
    3052                 :            : #if defined(_DERIVATE)
    3053                 :       2000 : tmp_Vgatep_sourcep=0.0;
    3054                 :       2000 : tmp_Vdrainp_sourcep=0.0;
    3055                 :       2000 : tmp_Vdrainb_sourcep=0.0;
    3056                 :       2000 : tmp_Vbulkp_sourcep=0.0;
    3057                 :       2000 : tmp_Vsourceb_sourcep=0.0;
    3058                 :            : #endif
    3059                 :       2000 : tmp=d00_sqrt0;
    3060                 :            : }
    3061                 :            : #if defined(_DERIVATE)
    3062                 :       2000 : t0_Vgatep_sourcep=0.0;
    3063                 :       2000 : t0_Vdrainp_sourcep=0.0;
    3064                 :       2000 : t0_Vdrainb_sourcep=0.0;
    3065                 :       2000 : t0_Vbulkp_sourcep=0.0;
    3066                 :       2000 : t0_Vsourceb_sourcep=0.0;
    3067                 :            : #endif
    3068                 :       2000 : t0=((dsub*leff)/tmp);
    3069         [ -  + ]:       2000 : if
    3070                 :            : (t0<34.0)
    3071                 :            : {
    3072                 :            : {
    3073                 :          0 : double m00_exp(d00_exp0,t0)
    3074                 :            : #if defined(_DERIVATE)
    3075                 :          0 : t1_Vgatep_sourcep=0.0;
    3076                 :          0 : t1_Vdrainp_sourcep=0.0;
    3077                 :          0 : t1_Vdrainb_sourcep=0.0;
    3078                 :          0 : t1_Vbulkp_sourcep=0.0;
    3079                 :          0 : t1_Vsourceb_sourcep=0.0;
    3080                 :            : #endif
    3081                 :          0 : t1=d00_exp0;
    3082                 :            : }
    3083                 :            : #if defined(_DERIVATE)
    3084                 :          0 : t2_Vgatep_sourcep=0.0;
    3085                 :          0 : t2_Vdrainp_sourcep=0.0;
    3086                 :          0 : t2_Vdrainb_sourcep=0.0;
    3087                 :          0 : t2_Vbulkp_sourcep=0.0;
    3088                 :          0 : t2_Vsourceb_sourcep=0.0;
    3089                 :            : #endif
    3090                 :          0 : t2=(t1-1.0);
    3091                 :            : #if defined(_DERIVATE)
    3092                 :          0 : t3_Vgatep_sourcep=0.0;
    3093                 :          0 : t3_Vdrainp_sourcep=0.0;
    3094                 :          0 : t3_Vdrainb_sourcep=0.0;
    3095                 :          0 : t3_Vbulkp_sourcep=0.0;
    3096                 :          0 : t3_Vsourceb_sourcep=0.0;
    3097                 :            : #endif
    3098                 :          0 : t3=(t2*t2);
    3099                 :            : #if defined(_DERIVATE)
    3100                 :          0 : t4_Vgatep_sourcep=0.0;
    3101                 :          0 : t4_Vdrainp_sourcep=0.0;
    3102                 :          0 : t4_Vdrainb_sourcep=0.0;
    3103                 :          0 : t4_Vbulkp_sourcep=0.0;
    3104                 :          0 : t4_Vsourceb_sourcep=0.0;
    3105                 :            : #endif
    3106                 :          0 : t4=(t3+((2.0*t1)*1.713908431e-15));
    3107                 :          0 : theta0vb0=(t1/t4);
    3108                 :            : }
    3109                 :            : else
    3110                 :            : {
    3111                 :       2000 : theta0vb0=(1.0/(5.834617425e14-2.0));
    3112                 :            : }
    3113                 :            : #if defined(_DERIVATE)
    3114                 :       2000 : t0_Vgatep_sourcep=0.0;
    3115                 :       2000 : t0_Vdrainp_sourcep=0.0;
    3116                 :       2000 : t0_Vdrainb_sourcep=0.0;
    3117                 :       2000 : t0_Vbulkp_sourcep=0.0;
    3118                 :       2000 : t0_Vsourceb_sourcep=0.0;
    3119                 :            : #endif
    3120                 :       2000 : t0=((drout*leff)/tmp);
    3121         [ -  + ]:       2000 : if
    3122                 :            : (t0<34.0)
    3123                 :            : {
    3124                 :            : {
    3125                 :          0 : double m00_exp(d00_exp0,t0)
    3126                 :            : #if defined(_DERIVATE)
    3127                 :          0 : t1_Vgatep_sourcep=0.0;
    3128                 :          0 : t1_Vdrainp_sourcep=0.0;
    3129                 :          0 : t1_Vdrainb_sourcep=0.0;
    3130                 :          0 : t1_Vbulkp_sourcep=0.0;
    3131                 :          0 : t1_Vsourceb_sourcep=0.0;
    3132                 :            : #endif
    3133                 :          0 : t1=d00_exp0;
    3134                 :            : }
    3135                 :            : #if defined(_DERIVATE)
    3136                 :          0 : t2_Vgatep_sourcep=0.0;
    3137                 :          0 : t2_Vdrainp_sourcep=0.0;
    3138                 :          0 : t2_Vdrainb_sourcep=0.0;
    3139                 :          0 : t2_Vbulkp_sourcep=0.0;
    3140                 :          0 : t2_Vsourceb_sourcep=0.0;
    3141                 :            : #endif
    3142                 :          0 : t2=(t1-1.0);
    3143                 :            : #if defined(_DERIVATE)
    3144                 :          0 : t3_Vgatep_sourcep=0.0;
    3145                 :          0 : t3_Vdrainp_sourcep=0.0;
    3146                 :          0 : t3_Vdrainb_sourcep=0.0;
    3147                 :          0 : t3_Vbulkp_sourcep=0.0;
    3148                 :          0 : t3_Vsourceb_sourcep=0.0;
    3149                 :            : #endif
    3150                 :          0 : t3=(t2*t2);
    3151                 :            : #if defined(_DERIVATE)
    3152                 :          0 : t4_Vgatep_sourcep=0.0;
    3153                 :          0 : t4_Vdrainp_sourcep=0.0;
    3154                 :          0 : t4_Vdrainb_sourcep=0.0;
    3155                 :          0 : t4_Vbulkp_sourcep=0.0;
    3156                 :          0 : t4_Vsourceb_sourcep=0.0;
    3157                 :            : #endif
    3158                 :          0 : t4=(t3+((2.0*t1)*1.713908431e-15));
    3159                 :            : #if defined(_DERIVATE)
    3160                 :          0 : t5_Vgatep_sourcep=0.0;
    3161                 :          0 : t5_Vdrainp_sourcep=0.0;
    3162                 :          0 : t5_Vdrainb_sourcep=0.0;
    3163                 :          0 : t5_Vbulkp_sourcep=0.0;
    3164                 :          0 : t5_Vsourceb_sourcep=0.0;
    3165                 :            : #endif
    3166                 :          0 : t5=(t1/t4);
    3167                 :            : }
    3168                 :            : else
    3169                 :            : {
    3170                 :            : #if defined(_DERIVATE)
    3171                 :       2000 : t5_Vgatep_sourcep=0.0;
    3172                 :       2000 : t5_Vdrainp_sourcep=0.0;
    3173                 :       2000 : t5_Vdrainb_sourcep=0.0;
    3174                 :       2000 : t5_Vbulkp_sourcep=0.0;
    3175                 :       2000 : t5_Vsourceb_sourcep=0.0;
    3176                 :            : #endif
    3177                 :       2000 : t5=(1.0/(5.834617425e14-2.0));
    3178                 :            : }
    3179                 :       2000 : thetarout=((pdibl1*t5)+pdibl2);
    3180                 :            : {
    3181                 :       2000 : double m00_sqrt(d00_sqrt0,xdep0)
    3182                 :            : #if defined(_DERIVATE)
    3183                 :       2000 : tmp_Vgatep_sourcep=0.0;
    3184                 :       2000 : tmp_Vdrainp_sourcep=0.0;
    3185                 :       2000 : tmp_Vdrainb_sourcep=0.0;
    3186                 :       2000 : tmp_Vbulkp_sourcep=0.0;
    3187                 :       2000 : tmp_Vsourceb_sourcep=0.0;
    3188                 :            : #endif
    3189                 :       2000 : tmp=d00_sqrt0;
    3190                 :            : }
    3191                 :            : #if defined(_DERIVATE)
    3192                 :       2000 : tmp1_Vgatep_sourcep=0.0;
    3193                 :       2000 : tmp1_Vdrainp_sourcep=0.0;
    3194                 :       2000 : tmp1_Vdrainb_sourcep=0.0;
    3195                 :       2000 : tmp1_Vbulkp_sourcep=0.0;
    3196                 :       2000 : tmp1_Vsourceb_sourcep=0.0;
    3197                 :            : #endif
    3198                 :       2000 : tmp1=(vbi-phi);
    3199                 :            : #if defined(_DERIVATE)
    3200                 :       2000 : tmp2_Vgatep_sourcep=0.0;
    3201                 :       2000 : tmp2_Vdrainp_sourcep=0.0;
    3202                 :       2000 : tmp2_Vdrainb_sourcep=0.0;
    3203                 :       2000 : tmp2_Vbulkp_sourcep=0.0;
    3204                 :       2000 : tmp2_Vsourceb_sourcep=0.0;
    3205                 :            : #endif
    3206                 :       2000 : tmp2=(factor1*tmp);
    3207                 :            : #if defined(_DERIVATE)
    3208                 :       2000 : t0_Vgatep_sourcep=0.0;
    3209                 :       2000 : t0_Vdrainp_sourcep=0.0;
    3210                 :       2000 : t0_Vdrainb_sourcep=0.0;
    3211                 :       2000 : t0_Vbulkp_sourcep=0.0;
    3212                 :       2000 : t0_Vsourceb_sourcep=0.0;
    3213                 :            : #endif
    3214                 :       2000 : t0=(((dvt1w*weff)*leff)/tmp2);
    3215         [ -  + ]:       2000 : if
    3216                 :            : (t0<34.0)
    3217                 :            : {
    3218                 :            : {
    3219                 :          0 : double m00_exp(d00_exp0,t0)
    3220                 :            : #if defined(_DERIVATE)
    3221                 :          0 : t1_Vgatep_sourcep=0.0;
    3222                 :          0 : t1_Vdrainp_sourcep=0.0;
    3223                 :          0 : t1_Vdrainb_sourcep=0.0;
    3224                 :          0 : t1_Vbulkp_sourcep=0.0;
    3225                 :          0 : t1_Vsourceb_sourcep=0.0;
    3226                 :            : #endif
    3227                 :          0 : t1=d00_exp0;
    3228                 :            : }
    3229                 :            : #if defined(_DERIVATE)
    3230                 :          0 : t2_Vgatep_sourcep=0.0;
    3231                 :          0 : t2_Vdrainp_sourcep=0.0;
    3232                 :          0 : t2_Vdrainb_sourcep=0.0;
    3233                 :          0 : t2_Vbulkp_sourcep=0.0;
    3234                 :          0 : t2_Vsourceb_sourcep=0.0;
    3235                 :            : #endif
    3236                 :          0 : t2=(t1-1.0);
    3237                 :            : #if defined(_DERIVATE)
    3238                 :          0 : t3_Vgatep_sourcep=0.0;
    3239                 :          0 : t3_Vdrainp_sourcep=0.0;
    3240                 :          0 : t3_Vdrainb_sourcep=0.0;
    3241                 :          0 : t3_Vbulkp_sourcep=0.0;
    3242                 :          0 : t3_Vsourceb_sourcep=0.0;
    3243                 :            : #endif
    3244                 :          0 : t3=(t2*t2);
    3245                 :            : #if defined(_DERIVATE)
    3246                 :          0 : t4_Vgatep_sourcep=0.0;
    3247                 :          0 : t4_Vdrainp_sourcep=0.0;
    3248                 :          0 : t4_Vdrainb_sourcep=0.0;
    3249                 :          0 : t4_Vbulkp_sourcep=0.0;
    3250                 :          0 : t4_Vsourceb_sourcep=0.0;
    3251                 :            : #endif
    3252                 :          0 : t4=(t3+((2.0*t1)*1.713908431e-15));
    3253                 :            : #if defined(_DERIVATE)
    3254                 :          0 : t8_Vgatep_sourcep=0.0;
    3255                 :          0 : t8_Vdrainp_sourcep=0.0;
    3256                 :          0 : t8_Vdrainb_sourcep=0.0;
    3257                 :          0 : t8_Vbulkp_sourcep=0.0;
    3258                 :          0 : t8_Vsourceb_sourcep=0.0;
    3259                 :            : #endif
    3260                 :          0 : t8=(t1/t4);
    3261                 :            : }
    3262                 :            : else
    3263                 :            : {
    3264                 :            : #if defined(_DERIVATE)
    3265                 :       2000 : t8_Vgatep_sourcep=0.0;
    3266                 :       2000 : t8_Vdrainp_sourcep=0.0;
    3267                 :       2000 : t8_Vdrainb_sourcep=0.0;
    3268                 :       2000 : t8_Vbulkp_sourcep=0.0;
    3269                 :       2000 : t8_Vsourceb_sourcep=0.0;
    3270                 :            : #endif
    3271                 :       2000 : t8=(1.0/(5.834617425e14-2.0));
    3272                 :            : }
    3273                 :            : #if defined(_DERIVATE)
    3274                 :       2000 : t0_Vgatep_sourcep=0.0;
    3275                 :       2000 : t0_Vdrainp_sourcep=0.0;
    3276                 :       2000 : t0_Vdrainb_sourcep=0.0;
    3277                 :       2000 : t0_Vbulkp_sourcep=0.0;
    3278                 :       2000 : t0_Vsourceb_sourcep=0.0;
    3279                 :            : #endif
    3280                 :       2000 : t0=(dvt0w*t8);
    3281                 :            : #if defined(_DERIVATE)
    3282                 :       2000 : t8_Vgatep_sourcep=0.0;
    3283                 :       2000 : t8_Vdrainp_sourcep=0.0;
    3284                 :       2000 : t8_Vdrainb_sourcep=0.0;
    3285                 :       2000 : t8_Vbulkp_sourcep=0.0;
    3286                 :       2000 : t8_Vsourceb_sourcep=0.0;
    3287                 :            : #endif
    3288                 :       2000 : t8=(t0*tmp1);
    3289                 :            : #if defined(_DERIVATE)
    3290                 :       2000 : t0_Vgatep_sourcep=0.0;
    3291                 :       2000 : t0_Vdrainp_sourcep=0.0;
    3292                 :       2000 : t0_Vdrainb_sourcep=0.0;
    3293                 :       2000 : t0_Vbulkp_sourcep=0.0;
    3294                 :       2000 : t0_Vsourceb_sourcep=0.0;
    3295                 :            : #endif
    3296                 :       2000 : t0=((dvt1*leff)/tmp2);
    3297         [ -  + ]:       2000 : if
    3298                 :            : (t0<34.0)
    3299                 :            : {
    3300                 :            : {
    3301                 :          0 : double m00_exp(d00_exp0,t0)
    3302                 :            : #if defined(_DERIVATE)
    3303                 :          0 : t1_Vgatep_sourcep=0.0;
    3304                 :          0 : t1_Vdrainp_sourcep=0.0;
    3305                 :          0 : t1_Vdrainb_sourcep=0.0;
    3306                 :          0 : t1_Vbulkp_sourcep=0.0;
    3307                 :          0 : t1_Vsourceb_sourcep=0.0;
    3308                 :            : #endif
    3309                 :          0 : t1=d00_exp0;
    3310                 :            : }
    3311                 :            : #if defined(_DERIVATE)
    3312                 :          0 : t2_Vgatep_sourcep=0.0;
    3313                 :          0 : t2_Vdrainp_sourcep=0.0;
    3314                 :          0 : t2_Vdrainb_sourcep=0.0;
    3315                 :          0 : t2_Vbulkp_sourcep=0.0;
    3316                 :          0 : t2_Vsourceb_sourcep=0.0;
    3317                 :            : #endif
    3318                 :          0 : t2=(t1-1.0);
    3319                 :            : #if defined(_DERIVATE)
    3320                 :          0 : t3_Vgatep_sourcep=0.0;
    3321                 :          0 : t3_Vdrainp_sourcep=0.0;
    3322                 :          0 : t3_Vdrainb_sourcep=0.0;
    3323                 :          0 : t3_Vbulkp_sourcep=0.0;
    3324                 :          0 : t3_Vsourceb_sourcep=0.0;
    3325                 :            : #endif
    3326                 :          0 : t3=(t2*t2);
    3327                 :            : #if defined(_DERIVATE)
    3328                 :          0 : t4_Vgatep_sourcep=0.0;
    3329                 :          0 : t4_Vdrainp_sourcep=0.0;
    3330                 :          0 : t4_Vdrainb_sourcep=0.0;
    3331                 :          0 : t4_Vbulkp_sourcep=0.0;
    3332                 :          0 : t4_Vsourceb_sourcep=0.0;
    3333                 :            : #endif
    3334                 :          0 : t4=(t3+((2.0*t1)*1.713908431e-15));
    3335                 :            : #if defined(_DERIVATE)
    3336                 :          0 : t9_Vgatep_sourcep=0.0;
    3337                 :          0 : t9_Vdrainp_sourcep=0.0;
    3338                 :          0 : t9_Vdrainb_sourcep=0.0;
    3339                 :          0 : t9_Vbulkp_sourcep=0.0;
    3340                 :          0 : t9_Vsourceb_sourcep=0.0;
    3341                 :            : #endif
    3342                 :          0 : t9=(t1/t4);
    3343                 :            : }
    3344                 :            : else
    3345                 :            : {
    3346                 :            : #if defined(_DERIVATE)
    3347                 :       2000 : t9_Vgatep_sourcep=0.0;
    3348                 :       2000 : t9_Vdrainp_sourcep=0.0;
    3349                 :       2000 : t9_Vdrainb_sourcep=0.0;
    3350                 :       2000 : t9_Vbulkp_sourcep=0.0;
    3351                 :       2000 : t9_Vsourceb_sourcep=0.0;
    3352                 :            : #endif
    3353                 :       2000 : t9=(1.0/(5.834617425e14-2.0));
    3354                 :            : }
    3355                 :            : #if defined(_DERIVATE)
    3356                 :       2000 : t9_Vgatep_sourcep=0.0;
    3357                 :       2000 : t9_Vdrainp_sourcep=0.0;
    3358                 :       2000 : t9_Vdrainb_sourcep=0.0;
    3359                 :       2000 : t9_Vbulkp_sourcep=0.0;
    3360                 :       2000 : t9_Vsourceb_sourcep=0.0;
    3361                 :            : #endif
    3362                 :       2000 : t9=((dvt0*t9)*tmp1);
    3363                 :            : #if defined(_DERIVATE)
    3364                 :       2000 : t4_Vgatep_sourcep=0.0;
    3365                 :       2000 : t4_Vdrainp_sourcep=0.0;
    3366                 :       2000 : t4_Vdrainb_sourcep=0.0;
    3367                 :       2000 : t4_Vbulkp_sourcep=0.0;
    3368                 :       2000 : t4_Vsourceb_sourcep=0.0;
    3369                 :            : #endif
    3370                 :       2000 : t4=((toxe*phi)/(weff+w0));
    3371                 :            : {
    3372                 :       2000 : double m00_sqrt(d00_sqrt0,(1.0+(lpe0/leff)))
    3373                 :            : #if defined(_DERIVATE)
    3374                 :       2000 : t0_Vgatep_sourcep=0.0;
    3375                 :       2000 : t0_Vdrainp_sourcep=0.0;
    3376                 :       2000 : t0_Vdrainb_sourcep=0.0;
    3377                 :       2000 : t0_Vbulkp_sourcep=0.0;
    3378                 :       2000 : t0_Vsourceb_sourcep=0.0;
    3379                 :            : #endif
    3380                 :       2000 : t0=d00_sqrt0;
    3381                 :            : }
    3382                 :            : #if defined(_DERIVATE)
    3383                 :       2000 : t5_Vgatep_sourcep=0.0;
    3384                 :       2000 : t5_Vdrainp_sourcep=0.0;
    3385                 :       2000 : t5_Vdrainb_sourcep=0.0;
    3386                 :       2000 : t5_Vbulkp_sourcep=0.0;
    3387                 :       2000 : t5_Vsourceb_sourcep=0.0;
    3388                 :            : #endif
    3389                 :       2000 : t5=(((k1ox*(t0-1.0))*sqrtphi)+((kt1+(kt1l/leff))*(tratio-1.0)));
    3390                 :            : #if defined(_DERIVATE)
    3391                 :       2000 : tmp3_Vgatep_sourcep=0.0;
    3392                 :       2000 : tmp3_Vdrainp_sourcep=0.0;
    3393                 :       2000 : tmp3_Vdrainb_sourcep=0.0;
    3394                 :       2000 : tmp3_Vbulkp_sourcep=0.0;
    3395                 :       2000 : tmp3_Vsourceb_sourcep=0.0;
    3396                 :            : #endif
    3397                 :       2000 : tmp3=(((((type*vth0)-t8)-t9)+(k3*t4))+t5);
    3398                 :       2000 : vfbzb=((tmp3-phi)-(k1*sqrtphi));
    3399                 :       2000 : ldrn=l;
    3400                 :            : {
    3401                 :       2000 : double m00_pow(d00_pow0,lnew,llodku0)
    3402                 :            : #if defined(_DERIVATE)
    3403                 :       2000 : t0_Vgatep_sourcep=0.0;
    3404                 :       2000 : t0_Vdrainp_sourcep=0.0;
    3405                 :       2000 : t0_Vdrainb_sourcep=0.0;
    3406                 :       2000 : t0_Vbulkp_sourcep=0.0;
    3407                 :       2000 : t0_Vsourceb_sourcep=0.0;
    3408                 :            : #endif
    3409                 :       2000 : t0=d00_pow0;
    3410                 :            : }
    3411                 :       2000 : w_tmp=(wnew+wlod);
    3412                 :            : {
    3413                 :       2000 : double m00_pow(d00_pow0,w_tmp,wlodku0)
    3414                 :            : #if defined(_DERIVATE)
    3415                 :       2000 : t1_Vgatep_sourcep=0.0;
    3416                 :       2000 : t1_Vdrainp_sourcep=0.0;
    3417                 :       2000 : t1_Vdrainb_sourcep=0.0;
    3418                 :       2000 : t1_Vbulkp_sourcep=0.0;
    3419                 :       2000 : t1_Vsourceb_sourcep=0.0;
    3420                 :            : #endif
    3421                 :       2000 : t1=d00_pow0;
    3422                 :            : }
    3423                 :            : #if defined(_DERIVATE)
    3424                 :       2000 : tmp1_Vgatep_sourcep=0.0;
    3425                 :       2000 : tmp1_Vdrainp_sourcep=0.0;
    3426                 :       2000 : tmp1_Vdrainb_sourcep=0.0;
    3427                 :       2000 : tmp1_Vbulkp_sourcep=0.0;
    3428                 :       2000 : tmp1_Vsourceb_sourcep=0.0;
    3429                 :            : #endif
    3430                 :       2000 : tmp1=(((lku0/t0)+(wku0/t1))+(pku0/(t0*t1)));
    3431                 :       2000 : ku0=(1.0+tmp1);
    3432                 :            : {
    3433                 :       2000 : double m00_pow(d00_pow0,lnew,llodvth)
    3434                 :            : #if defined(_DERIVATE)
    3435                 :       2000 : t0_Vgatep_sourcep=0.0;
    3436                 :       2000 : t0_Vdrainp_sourcep=0.0;
    3437                 :       2000 : t0_Vdrainb_sourcep=0.0;
    3438                 :       2000 : t0_Vbulkp_sourcep=0.0;
    3439                 :       2000 : t0_Vsourceb_sourcep=0.0;
    3440                 :            : #endif
    3441                 :       2000 : t0=d00_pow0;
    3442                 :            : }
    3443                 :            : {
    3444                 :       2000 : double m00_pow(d00_pow0,w_tmp,wlodvth)
    3445                 :            : #if defined(_DERIVATE)
    3446                 :       2000 : t1_Vgatep_sourcep=0.0;
    3447                 :       2000 : t1_Vdrainp_sourcep=0.0;
    3448                 :       2000 : t1_Vdrainb_sourcep=0.0;
    3449                 :       2000 : t1_Vbulkp_sourcep=0.0;
    3450                 :       2000 : t1_Vsourceb_sourcep=0.0;
    3451                 :            : #endif
    3452                 :       2000 : t1=d00_pow0;
    3453                 :            : }
    3454                 :            : #if defined(_DERIVATE)
    3455                 :       2000 : tmp1_Vgatep_sourcep=0.0;
    3456                 :       2000 : tmp1_Vdrainp_sourcep=0.0;
    3457                 :       2000 : tmp1_Vdrainb_sourcep=0.0;
    3458                 :       2000 : tmp1_Vbulkp_sourcep=0.0;
    3459                 :       2000 : tmp1_Vsourceb_sourcep=0.0;
    3460                 :            : #endif
    3461                 :       2000 : tmp1=(((lkvth0/t0)+(wkvth0/t1))+(pkvth0/(t0*t1)));
    3462                 :       2000 : kvth0=(1.0+tmp1);
    3463                 :            : {
    3464                 :       2000 : double m00_sqrt(d00_sqrt0,((kvth0*kvth0)+1.0e-9))
    3465                 :       2000 : kvth0=d00_sqrt0;
    3466                 :            : }
    3467                 :            : #if defined(_DERIVATE)
    3468                 :       2000 : t0_Vgatep_sourcep=0.0;
    3469                 :       2000 : t0_Vdrainp_sourcep=0.0;
    3470                 :       2000 : t0_Vdrainb_sourcep=0.0;
    3471                 :       2000 : t0_Vbulkp_sourcep=0.0;
    3472                 :       2000 : t0_Vsourceb_sourcep=0.0;
    3473                 :            : #endif
    3474                 :       2000 : t0=(tratio-1.0);
    3475                 :       2000 : ku0temp=((ku0*(1.0+(tku0*t0)))+1.0e-9);
    3476                 :       2000 : inv_saref=(1.0/(saref+(0.5*ldrn)));
    3477                 :       2000 : inv_sbref=(1.0/(sbref+(0.5*ldrn)));
    3478                 :       2000 : inv_od_ref=(inv_saref+inv_sbref);
    3479                 :       2000 : rho_ref=((KU0/ku0temp)*inv_od_ref);
    3480 [ -  + ][ #  # ]:       2000 : if
         [ #  # ][ #  # ]
                 [ #  # ]
    3481                 :            : (((sa>0.0)&&(sb>0.0))&&((nf==1.0)||((nf>1.0)&&(sd>0.0))))
    3482                 :            : {
    3483                 :          0 : inv_sa=0;
    3484                 :          0 : inv_sb=0;
    3485                 :          0 : i=0;
    3486         [ #  # ]:          0 : while
    3487                 :            : ((i<nf))
    3488                 :            : {
    3489                 :            : #if defined(_DERIVATE)
    3490                 :          0 : t0_Vgatep_sourcep=0.0;
    3491                 :          0 : t0_Vdrainp_sourcep=0.0;
    3492                 :          0 : t0_Vdrainb_sourcep=0.0;
    3493                 :          0 : t0_Vbulkp_sourcep=0.0;
    3494                 :          0 : t0_Vsourceb_sourcep=0.0;
    3495                 :            : #endif
    3496                 :          0 : t0=((1.0/nf)/((sa+(0.5*ldrn))+(i*(sd+ldrn))));
    3497                 :            : #if defined(_DERIVATE)
    3498                 :          0 : t1_Vgatep_sourcep=0.0;
    3499                 :          0 : t1_Vdrainp_sourcep=0.0;
    3500                 :          0 : t1_Vdrainb_sourcep=0.0;
    3501                 :          0 : t1_Vbulkp_sourcep=0.0;
    3502                 :          0 : t1_Vsourceb_sourcep=0.0;
    3503                 :            : #endif
    3504                 :          0 : t1=((1.0/nf)/((sb+(0.5*ldrn))+(i*(sd+ldrn))));
    3505                 :          0 : inv_sa=(inv_sa+t0);
    3506                 :          0 : inv_sb=(inv_sb+t1);
    3507                 :          0 : i=(i+1);
    3508                 :            : }
    3509                 :          0 : inv_odeff=(inv_sa+inv_sb);
    3510                 :          0 : rho=((KU0/ku0temp)*inv_odeff);
    3511                 :            : #if defined(_DERIVATE)
    3512                 :          0 : t0_Vgatep_sourcep=0.0;
    3513                 :          0 : t0_Vdrainp_sourcep=0.0;
    3514                 :          0 : t0_Vdrainb_sourcep=0.0;
    3515                 :          0 : t0_Vbulkp_sourcep=0.0;
    3516                 :          0 : t0_Vsourceb_sourcep=0.0;
    3517                 :            : #endif
    3518                 :          0 : t0=((1.0+rho)/(1.0+rho_ref));
    3519                 :          0 : u0temp=(u0temp*t0);
    3520                 :            : #if defined(_DERIVATE)
    3521                 :          0 : t1_Vgatep_sourcep=0.0;
    3522                 :          0 : t1_Vdrainp_sourcep=0.0;
    3523                 :          0 : t1_Vdrainb_sourcep=0.0;
    3524                 :          0 : t1_Vbulkp_sourcep=0.0;
    3525                 :          0 : t1_Vsourceb_sourcep=0.0;
    3526                 :            : #endif
    3527                 :          0 : t1=((1.0+(kvsat*rho))/(1.0+(kvsat*rho_ref)));
    3528                 :          0 : vsattemp=(vsattemp*t1);
    3529                 :          0 : od_offset=(inv_odeff-inv_od_ref);
    3530                 :          0 : dvth0_lod=((KVTH0/kvth0)*od_offset);
    3531                 :            : {
    3532                 :          0 : double m00_pow(d00_pow0,kvth0,lodk2)
    3533                 :          0 : dk2_lod=((stk2/d00_pow0)*od_offset);
    3534                 :            : }
    3535                 :            : {
    3536                 :          0 : double m00_pow(d00_pow0,kvth0,lodeta0)
    3537                 :          0 : deta0_lod=((steta0/d00_pow0)*od_offset);
    3538                 :            : }
    3539                 :          0 : vth0=(vth0+dvth0_lod);
    3540 [ #  # ][ #  # ]:          0 : if
    3541                 :            : ((VFB==(-99.0))&&(VTH0==(-99.0)))
    3542                 :            : {
    3543                 :          0 : vfb=(-1.0);
    3544                 :            : }
    3545                 :            : else
    3546                 :            : {
    3547                 :          0 : vfb=(vfb+(type*dvth0_lod));
    3548                 :            : }
    3549                 :          0 : vfbzb=(vfbzb+(type*dvth0_lod));
    3550                 :            : #if defined(_DERIVATE)
    3551                 :          0 : t3_Vgatep_sourcep=0.0;
    3552                 :          0 : t3_Vdrainp_sourcep=0.0;
    3553                 :          0 : t3_Vdrainb_sourcep=0.0;
    3554                 :          0 : t3_Vbulkp_sourcep=0.0;
    3555                 :          0 : t3_Vsourceb_sourcep=0.0;
    3556                 :            : #endif
    3557                 :          0 : t3=(((type*vth0)-vfb)-phi);
    3558                 :            : #if defined(_DERIVATE)
    3559                 :          0 : t4_Vgatep_sourcep=0.0;
    3560                 :          0 : t4_Vdrainp_sourcep=0.0;
    3561                 :          0 : t4_Vdrainb_sourcep=0.0;
    3562                 :          0 : t4_Vbulkp_sourcep=0.0;
    3563                 :          0 : t4_Vsourceb_sourcep=0.0;
    3564                 :            : #endif
    3565                 :          0 : t4=(t3+t3);
    3566                 :            : #if defined(_DERIVATE)
    3567                 :          0 : t5_Vgatep_sourcep=0.0;
    3568                 :          0 : t5_Vdrainp_sourcep=0.0;
    3569                 :          0 : t5_Vdrainb_sourcep=0.0;
    3570                 :          0 : t5_Vbulkp_sourcep=0.0;
    3571                 :          0 : t5_Vsourceb_sourcep=0.0;
    3572                 :            : #endif
    3573                 :          0 : t5=(2.5*t3);
    3574         [ #  # ]:          0 : vtfbphi1=((type==1)?t4:t5);
    3575         [ #  # ]:          0 : if
    3576                 :            : (vtfbphi1<0.0)
    3577                 :            : {
    3578                 :          0 : vtfbphi1=0.0;
    3579                 :            : }
    3580                 :          0 : vtfbphi2=(4.0*t3);
    3581         [ #  # ]:          0 : if
    3582                 :            : (vtfbphi2<0.0)
    3583                 :            : {
    3584                 :          0 : vtfbphi2=0.0;
    3585                 :            : }
    3586                 :          0 : k2=(k2+dk2_lod);
    3587         [ #  # ]:          0 : if
    3588                 :            : (k2<0.0)
    3589                 :            : {
    3590                 :            : #if defined(_DERIVATE)
    3591                 :          0 : t0_Vgatep_sourcep=0.0;
    3592                 :          0 : t0_Vdrainp_sourcep=0.0;
    3593                 :          0 : t0_Vdrainb_sourcep=0.0;
    3594                 :          0 : t0_Vbulkp_sourcep=0.0;
    3595                 :          0 : t0_Vsourceb_sourcep=0.0;
    3596                 :            : #endif
    3597                 :          0 : t0=((0.5*k1)/k2);
    3598                 :          0 : vbsc=(0.9*(phi-(t0*t0)));
    3599         [ #  # ]:          0 : if
    3600                 :            : (vbsc>(-3.0))
    3601                 :            : {
    3602                 :          0 : vbsc=(-3.0);
    3603                 :            : }
    3604                 :            : else
    3605                 :            : {
    3606         [ #  # ]:          0 : if
    3607                 :            : (vbsc<(-30.0))
    3608                 :            : {
    3609                 :          0 : vbsc=(-30.0);
    3610                 :            : }
    3611                 :            : }
    3612                 :            : }
    3613                 :            : else
    3614                 :            : {
    3615                 :          0 : vbsc=(-30.0);
    3616                 :            : }
    3617         [ #  # ]:          0 : if
    3618                 :            : (vbsc>vbm)
    3619                 :            : {
    3620                 :          0 : vbsc=vbm;
    3621                 :            : }
    3622                 :          0 : k2ox=((k2*toxe)/toxm);
    3623                 :          0 : eta0=(eta0+deta0_lod);
    3624                 :            : }
    3625         [ -  + ]:       2000 : if
    3626                 :            : (rbodymod==1.0)
    3627                 :            : {
    3628         [ #  # ]:          0 : if
    3629                 :            : (rbdb<1.0e-3)
    3630                 :            : {
    3631                 :          0 : grbdb=1.0e3;
    3632                 :            : }
    3633                 :            : else
    3634                 :            : {
    3635                 :          0 : grbdb=(gbmin+(1.0/rbdb));
    3636                 :            : }
    3637         [ #  # ]:          0 : if
    3638                 :            : (rbpb<1.0e-3)
    3639                 :            : {
    3640                 :          0 : grbpb=1.0e3;
    3641                 :            : }
    3642                 :            : else
    3643                 :            : {
    3644                 :          0 : grbpb=(gbmin+(1.0/rbpb));
    3645                 :            : }
    3646         [ #  # ]:          0 : if
    3647                 :            : (rbps<1.0e-3)
    3648                 :            : {
    3649                 :          0 : grbps=1.0e3;
    3650                 :            : }
    3651                 :            : else
    3652                 :            : {
    3653                 :          0 : grbps=(gbmin+(1.0/rbps));
    3654                 :            : }
    3655         [ #  # ]:          0 : if
    3656                 :            : (rbsb<1.0e-3)
    3657                 :            : {
    3658                 :          0 : grbsb=1.0e3;
    3659                 :            : }
    3660                 :            : else
    3661                 :            : {
    3662                 :          0 : grbsb=(gbmin+(1.0/rbsb));
    3663                 :            : }
    3664         [ #  # ]:          0 : if
    3665                 :            : (rbpd<1.0e-3)
    3666                 :            : {
    3667                 :          0 : grbpd=1.0e3;
    3668                 :            : }
    3669                 :            : else
    3670                 :            : {
    3671                 :          0 : grbpd=(gbmin+(1.0/rbpd));
    3672                 :            : }
    3673                 :            : }
    3674                 :       2000 : grgeltd=((rshg*(xgw+((weffcj/3.0)/ngcon)))/((ngcon*nf)*(lnew-xgl)));
    3675         [ -  + ]:       2000 : if
    3676                 :            : (grgeltd>0.0)
    3677                 :            : {
    3678                 :          0 : grgeltd=(1.0/grgeltd);
    3679                 :            : }
    3680                 :            : else
    3681                 :            : {
    3682                 :       2000 : grgeltd=1.0e3;
    3683         [ +  - ]:       2000 : if
    3684                 :            : (rgatemod!=0)
    3685                 :            : {
    3686                 :       2000 : logprint(LOG_ERROR,"Warning: The gate conductance reset to 1.0e3 ohms.");
    3687                 :       2000 : logprint(LOG_ERROR,"\n");
    3688                 :            : }
    3689                 :            : }
    3690                 :       2000 : dmcgeff=(dmcg-dmcgt);
    3691                 :       2000 : dmcieff=dmci;
    3692                 :       2000 : dmdgeff=(dmdg-dmcgt);
    3693         [ +  - ]:       2000 : if
    3694                 :            : (ps>0.0)
    3695                 :            : {
    3696         [ -  + ]:       2000 : if
    3697                 :            : (permod==0)
    3698                 :            : {
    3699                 :          0 : pseff=ps;
    3700                 :            : }
    3701                 :            : else
    3702                 :            : {
    3703                 :       2000 : pseff=(ps-(weffcj*nf));
    3704                 :            : }
    3705                 :            : }
    3706                 :            : else
    3707                 :            : {
    3708                 :          0 : pseff=bsim4v30nMOS_get_ps(nf,geomod,imin,weffcj,dmcgeff,dmcieff,dmdgeff);
    3709                 :            : }
    3710         [ +  - ]:       2000 : if
    3711                 :            : (pd>0.0)
    3712                 :            : {
    3713         [ -  + ]:       2000 : if
    3714                 :            : (permod==0)
    3715                 :            : {
    3716                 :          0 : pdeff=pd;
    3717                 :            : }
    3718                 :            : else
    3719                 :            : {
    3720                 :       2000 : pdeff=(pd-(weffcj*nf));
    3721                 :            : }
    3722                 :            : }
    3723                 :            : else
    3724                 :            : {
    3725                 :          0 : pdeff=bsim4v30nMOS_get_pd(nf,geomod,imin,weffcj,dmcgeff,dmcieff,dmdgeff);
    3726                 :            : }
    3727         [ +  - ]:       2000 : if
    3728                 :            : (as>0.0)
    3729                 :            : {
    3730                 :       2000 : aseff=as;
    3731                 :            : }
    3732                 :            : else
    3733                 :            : {
    3734                 :          0 : aseff=bsim4v30nMOS_get_as(nf,geomod,imin,weffcj,dmcgeff,dmcieff,dmdgeff);
    3735                 :            : }
    3736         [ +  - ]:       2000 : if
    3737                 :            : (ad>0.0)
    3738                 :            : {
    3739                 :       2000 : adeff=ad;
    3740                 :            : }
    3741                 :            : else
    3742                 :            : {
    3743                 :          0 : adeff=bsim4v30nMOS_get_ad(nf,geomod,imin,weffcj,dmcgeff,dmcieff,dmdgeff);
    3744                 :            : }
    3745         [ -  + ]:       2000 : if
    3746                 :            : (nrs!=(-99.0))
    3747                 :            : {
    3748                 :          0 : gsdiff=(rsh*nrs);
    3749                 :            : }
    3750                 :            : else
    3751                 :            : {
    3752         [ -  + ]:       2000 : if
    3753                 :            : (rgeomod>0)
    3754                 :            : {
    3755                 :          0 : gsdiff=bsim4v30nMOS_get_rtot(nf,geomod,rgeomod,imin,weffcj,rsh,dmcgeff,dmcieff,dmdgeff,1);
    3756                 :            : }
    3757                 :            : else
    3758                 :            : {
    3759                 :       2000 : gsdiff=0.0;
    3760                 :            : }
    3761                 :            : }
    3762         [ -  + ]:       2000 : if
    3763                 :            : (gsdiff>0.0)
    3764                 :            : {
    3765                 :          0 : gsdiff=(1.0/gsdiff);
    3766                 :            : }
    3767                 :            : else
    3768                 :            : {
    3769                 :       2000 : gsdiff=1.0e3;
    3770                 :       2000 : logprint(LOG_ERROR,"Warning: source conductance reset to 1.0e3 mho.");
    3771                 :       2000 : logprint(LOG_ERROR,"\n");
    3772                 :            : }
    3773         [ -  + ]:       2000 : if
    3774                 :            : (nrd!=(-99.0))
    3775                 :            : {
    3776                 :          0 : gddiff=(rsh*nrd);
    3777                 :            : }
    3778                 :            : else
    3779                 :            : {
    3780         [ -  + ]:       2000 : if
    3781                 :            : (rgeomod>0)
    3782                 :            : {
    3783                 :          0 : gddiff=bsim4v30nMOS_get_rtot(nf,geomod,rgeomod,imin,weffcj,rsh,dmcgeff,dmcieff,dmdgeff,0);
    3784                 :            : }
    3785                 :            : else
    3786                 :            : {
    3787                 :       2000 : gddiff=0.0;
    3788                 :            : }
    3789                 :            : }
    3790         [ -  + ]:       2000 : if
    3791                 :            : (gddiff>0.0)
    3792                 :            : {
    3793                 :          0 : gddiff=(1.0/gddiff);
    3794                 :            : }
    3795                 :            : else
    3796                 :            : {
    3797                 :       2000 : gddiff=1.0e3;
    3798                 :       2000 : logprint(LOG_ERROR,"Warning: drain conductance reset to 1.0e3 mho.");
    3799                 :       2000 : logprint(LOG_ERROR,"\n");
    3800                 :            : }
    3801         [ +  - ]:       2000 : aechvb=((type==1)?4.97232e-7:3.42537e-7);
    3802         [ +  - ]:       2000 : bechvb=((type==1)?7.45669e11:1.16645e12);
    3803                 :       2000 : aechvbedge=(((aechvb*weff)*dlcig)*toxratioedge);
    3804                 :       2000 : bechvbedge=(((-bechvb)*toxe)*poxedge);
    3805                 :       2000 : aechvb=(((aechvb*weff)*leff)*toxratio);
    3806                 :       2000 : bechvb=(bechvb*(-toxe));
    3807                 :       2000 : nvtms=(vtm*njs);
    3808 [ -  + ][ #  # ]:       2000 : if
    3809                 :            : ((aseff<=0.0)&&(pseff<=0.0))
    3810                 :            : {
    3811                 :          0 : isbs=1.0e-14;
    3812                 :            : }
    3813                 :            : else
    3814                 :            : {
    3815                 :       2000 : isbs=(((aseff*jss_temp)+(pseff*jsws_temp))+((weffcj*nf)*jswgs_temp));
    3816                 :            : }
    3817         [ +  - ]:       2000 : if
    3818                 :            : (isbs>0.0)
    3819                 :            : {
    3820         [ -  + ]:       2000 : if
    3821                 :            : ((diomod)==(0))
    3822                 :            : {
    3823         [ #  # ]:          0 : if
    3824                 :            : ((bvs/nvtms)>34.0)
    3825                 :            : {
    3826                 :          0 : xexpbvs=(xjbvs*1.713908431e-15);
    3827                 :            : }
    3828                 :            : else
    3829                 :            : {
    3830                 :            : {
    3831                 :          0 : double m00_exp(d00_exp0,((-bvs)/nvtms))
    3832                 :          0 : xexpbvs=(xjbvs*d00_exp0);
    3833                 :            : }
    3834                 :            : }
    3835                 :            : }
    3836                 :            : else
    3837         [ +  - ]:       2000 : if
    3838                 :            : ((diomod)==(1))
    3839                 :            : {
    3840                 :       2000 : vjsmfwd=bsim4v30nMOS_get_vjm(nvtms,ijthsfwd,isbs,0.0);
    3841                 :            : {
    3842                 :       2000 : double m00_exp(d00_exp0,(vjsmfwd/nvtms))
    3843                 :       2000 : ivjsmfwd=(isbs*d00_exp0);
    3844                 :            : }
    3845                 :            : }
    3846                 :            : else
    3847         [ #  # ]:          0 : if
    3848                 :            : ((diomod)==(2))
    3849                 :            : {
    3850         [ #  # ]:          0 : if
    3851                 :            : ((bvs/nvtms)>34.0)
    3852                 :            : {
    3853                 :          0 : xexpbvs=(xjbvs*1.713908431e-15);
    3854                 :            : #if defined(_DERIVATE)
    3855                 :          0 : tmp_Vgatep_sourcep=0.0;
    3856                 :          0 : tmp_Vdrainp_sourcep=0.0;
    3857                 :          0 : tmp_Vdrainb_sourcep=0.0;
    3858                 :          0 : tmp_Vbulkp_sourcep=0.0;
    3859                 :          0 : tmp_Vsourceb_sourcep=0.0;
    3860                 :            : #endif
    3861                 :          0 : tmp=1.713908431e-15;
    3862                 :            : }
    3863                 :            : else
    3864                 :            : {
    3865                 :            : {
    3866                 :          0 : double m00_exp(d00_exp0,((-bvs)/nvtms))
    3867                 :          0 : xexpbvs=d00_exp0;
    3868                 :            : }
    3869                 :            : #if defined(_DERIVATE)
    3870                 :          0 : tmp_Vgatep_sourcep=0.0;
    3871                 :          0 : tmp_Vdrainp_sourcep=0.0;
    3872                 :          0 : tmp_Vdrainb_sourcep=0.0;
    3873                 :          0 : tmp_Vbulkp_sourcep=0.0;
    3874                 :          0 : tmp_Vsourceb_sourcep=0.0;
    3875                 :            : #endif
    3876                 :          0 : tmp=xexpbvs;
    3877                 :          0 : xexpbvs=(xexpbvs*xjbvs);
    3878                 :            : }
    3879                 :          0 : vjsmfwd=bsim4v30nMOS_get_vjm(nvtms,ijthsfwd,isbs,xexpbvs);
    3880                 :            : {
    3881                 :          0 : double m00_exp(d00_exp0,(vjsmfwd/nvtms))
    3882                 :            : #if defined(_DERIVATE)
    3883                 :          0 : t0_Vgatep_sourcep=0.0;
    3884                 :          0 : t0_Vdrainp_sourcep=0.0;
    3885                 :          0 : t0_Vdrainb_sourcep=0.0;
    3886                 :          0 : t0_Vbulkp_sourcep=0.0;
    3887                 :          0 : t0_Vsourceb_sourcep=0.0;
    3888                 :            : #endif
    3889                 :          0 : t0=d00_exp0;
    3890                 :            : }
    3891                 :          0 : ivjsmfwd=(isbs*(((t0-(xexpbvs/t0))+xexpbvs)-1.0));
    3892                 :          0 : sslpfwd=((isbs*(t0+(xexpbvs/t0)))/nvtms);
    3893                 :            : #if defined(_DERIVATE)
    3894                 :          0 : t2_Vgatep_sourcep=0.0;
    3895                 :          0 : t2_Vdrainp_sourcep=0.0;
    3896                 :          0 : t2_Vdrainb_sourcep=0.0;
    3897                 :          0 : t2_Vbulkp_sourcep=0.0;
    3898                 :          0 : t2_Vsourceb_sourcep=0.0;
    3899                 :            : #endif
    3900                 :          0 : t2=(ijthsrev/isbs);
    3901         [ #  # ]:          0 : if
    3902                 :            : (t2<1.0)
    3903                 :            : {
    3904                 :            : #if defined(_DERIVATE)
    3905                 :          0 : t2_Vgatep_sourcep=0.0;
    3906                 :          0 : t2_Vdrainp_sourcep=0.0;
    3907                 :          0 : t2_Vdrainb_sourcep=0.0;
    3908                 :          0 : t2_Vbulkp_sourcep=0.0;
    3909                 :          0 : t2_Vsourceb_sourcep=0.0;
    3910                 :            : #endif
    3911                 :          0 : t2=10.0;
    3912                 :          0 : logprint(LOG_ERROR,"Warning: ijthsrev too small and set to 10 times isbsat.\n");
    3913                 :          0 : logprint(LOG_ERROR,"\n");
    3914                 :            : }
    3915                 :            : {
    3916                 :          0 : double m00_logE(d00_logE0,((t2-1.0)/xjbvs))
    3917                 :          0 : vjsmrev=((-bvs)-(nvtms*d00_logE0));
    3918                 :            : }
    3919                 :            : {
    3920                 :          0 : double m00_exp(d00_exp0,((-(bvs+vjsmrev))/nvtms))
    3921                 :            : #if defined(_DERIVATE)
    3922                 :          0 : t1_Vgatep_sourcep=0.0;
    3923                 :          0 : t1_Vdrainp_sourcep=0.0;
    3924                 :          0 : t1_Vdrainb_sourcep=0.0;
    3925                 :          0 : t1_Vbulkp_sourcep=0.0;
    3926                 :          0 : t1_Vsourceb_sourcep=0.0;
    3927                 :            : #endif
    3928                 :          0 : t1=(xjbvs*d00_exp0);
    3929                 :            : }
    3930                 :          0 : ivjsmrev=(isbs*(1.0+t1));
    3931                 :          0 : sslprev=(((-isbs)*t1)/nvtms);
    3932                 :            : }
    3933                 :            : else
    3934                 :          0 : logprint(LOG_ERROR,"Specified diomod = %d not matched",diomod);
    3935                 :       2000 : logprint(LOG_ERROR,"\n");
    3936                 :            : }
    3937                 :       2000 : nvtmd=(vtm*njd);
    3938 [ -  + ][ #  # ]:       2000 : if
    3939                 :            : ((adeff<=0.0)&&(pdeff<=0.0))
    3940                 :            : {
    3941                 :          0 : isbd=1.0e-14;
    3942                 :            : }
    3943                 :            : else
    3944                 :            : {
    3945                 :       2000 : isbd=(((adeff*jsd_temp)+(pdeff*jswd_temp))+((weffcj*nf)*jswgd_temp));
    3946                 :            : }
    3947         [ +  - ]:       2000 : if
    3948                 :            : (isbd>0.0)
    3949                 :            : {
    3950         [ -  + ]:       2000 : if
    3951                 :            : ((diomod)==(0))
    3952                 :            : {
    3953         [ #  # ]:          0 : if
    3954                 :            : ((bvd/nvtmd)>34.0)
    3955                 :            : {
    3956                 :          0 : xexpbvd=(xjbvd*1.713908431e-15);
    3957                 :            : }
    3958                 :            : else
    3959                 :            : {
    3960                 :            : {
    3961                 :          0 : double m00_exp(d00_exp0,((-bvd)/nvtmd))
    3962                 :          0 : xexpbvd=(xjbvd*d00_exp0);
    3963                 :            : }
    3964                 :            : }
    3965                 :            : }
    3966                 :            : else
    3967         [ +  - ]:       2000 : if
    3968                 :            : ((diomod)==(1))
    3969                 :            : {
    3970                 :       2000 : vjdmfwd=bsim4v30nMOS_get_vjm(nvtmd,ijthdfwd,isbd,0.0);
    3971                 :            : {
    3972                 :       2000 : double m00_exp(d00_exp0,(vjdmfwd/nvtmd))
    3973                 :       2000 : ivjdmfwd=(isbd*d00_exp0);
    3974                 :            : }
    3975                 :            : }
    3976                 :            : else
    3977         [ #  # ]:          0 : if
    3978                 :            : ((diomod)==(2))
    3979                 :            : {
    3980         [ #  # ]:          0 : if
    3981                 :            : ((bvd/nvtmd)>34.0)
    3982                 :            : {
    3983                 :          0 : xexpbvd=(xjbvd*1.713908431e-15);
    3984                 :            : #if defined(_DERIVATE)
    3985                 :          0 : tmp_Vgatep_sourcep=0.0;
    3986                 :          0 : tmp_Vdrainp_sourcep=0.0;
    3987                 :          0 : tmp_Vdrainb_sourcep=0.0;
    3988                 :          0 : tmp_Vbulkp_sourcep=0.0;
    3989                 :          0 : tmp_Vsourceb_sourcep=0.0;
    3990                 :            : #endif
    3991                 :          0 : tmp=1.713908431e-15;
    3992                 :            : }
    3993                 :            : else
    3994                 :            : {
    3995                 :            : {
    3996                 :          0 : double m00_exp(d00_exp0,((-bvd)/nvtmd))
    3997                 :          0 : xexpbvd=d00_exp0;
    3998                 :            : }
    3999                 :            : #if defined(_DERIVATE)
    4000                 :          0 : tmp_Vgatep_sourcep=0.0;
    4001                 :          0 : tmp_Vdrainp_sourcep=0.0;
    4002                 :          0 : tmp_Vdrainb_sourcep=0.0;
    4003                 :          0 : tmp_Vbulkp_sourcep=0.0;
    4004                 :          0 : tmp_Vsourceb_sourcep=0.0;
    4005                 :            : #endif
    4006                 :          0 : tmp=xexpbvd;
    4007                 :          0 : xexpbvd=(xexpbvd*xjbvd);
    4008                 :            : }
    4009                 :          0 : vjsmfwd=bsim4v30nMOS_get_vjm(nvtmd,ijthdfwd,isbd,xexpbvd);
    4010                 :            : {
    4011                 :          0 : double m00_exp(d00_exp0,(vjdmfwd/nvtmd))
    4012                 :            : #if defined(_DERIVATE)
    4013                 :          0 : t0_Vgatep_sourcep=0.0;
    4014                 :          0 : t0_Vdrainp_sourcep=0.0;
    4015                 :          0 : t0_Vdrainb_sourcep=0.0;
    4016                 :          0 : t0_Vbulkp_sourcep=0.0;
    4017                 :          0 : t0_Vsourceb_sourcep=0.0;
    4018                 :            : #endif
    4019                 :          0 : t0=d00_exp0;
    4020                 :            : }
    4021                 :          0 : ivjdmfwd=(isbd*(((t0-(xexpbvd/t0))+xexpbvd)-1.0));
    4022                 :          0 : dslpfwd=((isbd*(t0+(xexpbvd/t0)))/nvtmd);
    4023                 :            : #if defined(_DERIVATE)
    4024                 :          0 : t2_Vgatep_sourcep=0.0;
    4025                 :          0 : t2_Vdrainp_sourcep=0.0;
    4026                 :          0 : t2_Vdrainb_sourcep=0.0;
    4027                 :          0 : t2_Vbulkp_sourcep=0.0;
    4028                 :          0 : t2_Vsourceb_sourcep=0.0;
    4029                 :            : #endif
    4030                 :          0 : t2=(ijthdrev/isbd);
    4031         [ #  # ]:          0 : if
    4032                 :            : (t2<1.0)
    4033                 :            : {
    4034                 :            : #if defined(_DERIVATE)
    4035                 :          0 : t2_Vgatep_sourcep=0.0;
    4036                 :          0 : t2_Vdrainp_sourcep=0.0;
    4037                 :          0 : t2_Vdrainb_sourcep=0.0;
    4038                 :          0 : t2_Vbulkp_sourcep=0.0;
    4039                 :          0 : t2_Vsourceb_sourcep=0.0;
    4040                 :            : #endif
    4041                 :          0 : t2=10.0;
    4042                 :          0 : logprint(LOG_ERROR,"Warning: ijthdrev too small and set to 10 times idbsat.\n");
    4043                 :          0 : logprint(LOG_ERROR,"\n");
    4044                 :            : }
    4045                 :            : {
    4046                 :          0 : double m00_logE(d00_logE0,((t2-1.0)/xjbvd))
    4047                 :          0 : vjdmrev=((-bvd)-(nvtmd*d00_logE0));
    4048                 :            : }
    4049                 :            : {
    4050                 :          0 : double m00_exp(d00_exp0,((-(bvd+vjdmrev))/nvtmd))
    4051                 :            : #if defined(_DERIVATE)
    4052                 :          0 : t1_Vgatep_sourcep=0.0;
    4053                 :          0 : t1_Vdrainp_sourcep=0.0;
    4054                 :          0 : t1_Vdrainb_sourcep=0.0;
    4055                 :          0 : t1_Vbulkp_sourcep=0.0;
    4056                 :          0 : t1_Vsourceb_sourcep=0.0;
    4057                 :            : #endif
    4058                 :          0 : t1=(xjbvd*d00_exp0);
    4059                 :            : }
    4060                 :          0 : ivjdmrev=(isbd*(1.0+t1));
    4061                 :          0 : dslprev=(((-isbd)*t1)/nvtmd);
    4062                 :            : }
    4063                 :            : else
    4064                 :          0 : logprint(LOG_ERROR,"Specified diomod = %d not matched",diomod);
    4065                 :       2000 : logprint(LOG_ERROR,"\n");
    4066                 :            : }
    4067                 :            : }
    4068                 :       2000 : }
    4069                 :            : 
    4070                 :            : /* Evaluate Verilog-AMS equations in instance initialization. */
    4071                 :       2000 : void bsim4v30nMOS::initializeInstance (void)
    4072                 :            : {
    4073                 :       2000 : }
    4074                 :            : 
    4075                 :            : /* Evaluate Verilog-AMS equations in initial step. */
    4076                 :       2000 : void bsim4v30nMOS::initialStep (void)
    4077                 :            : {
    4078                 :       2000 : }
    4079                 :            : 
    4080                 :            : /* Evaluate Verilog-AMS equations in final step. */
    4081                 :          0 : void bsim4v30nMOS::finalStep (void)
    4082                 :            : {
    4083                 :          0 : }
    4084                 :            : 
    4085                 :            : /* Evaluate Verilog-AMS equations in analog block. */
    4086                 :       7356 : void bsim4v30nMOS::calcVerilog (void)
    4087                 :            : {
    4088                 :            : 
    4089                 :            : /* ----------------- evaluate verilog analog equations -------------------- */
    4090                 :            : double leffx2;
    4091                 :            : double fourkt;
    4092                 :            : #if defined(_DYNAMIC)
    4093                 :            : double qb;
    4094                 :            : #if defined(_DERIVATE)
    4095                 :            : double qb_Vgatem_sourcep;
    4096                 :            : double qb_Vgatep_sourcep;
    4097                 :            : double qb_Vdrainp_sourcep;
    4098                 :            : double qb_Vdrainb_sourcep;
    4099                 :            : double qb_Vbulkp_sourcep;
    4100                 :            : double qb_Vsourceb_sourcep;
    4101                 :            : #endif
    4102                 :            : #endif
    4103                 :            : double qs;
    4104                 :            : #if defined(_DERIVATE)
    4105                 :            : double qs_Vgatem_sourcep;
    4106                 :            : double qs_Vgatep_sourcep;
    4107                 :            : double qs_Vdrainp_sourcep;
    4108                 :            : double qs_Vdrainb_sourcep;
    4109                 :            : double qs_Vbulkp_sourcep;
    4110                 :            : double qs_Vsourceb_sourcep;
    4111                 :            : #endif
    4112                 :            : double qd;
    4113                 :            : #if defined(_DERIVATE)
    4114                 :            : double qd_Vgatem_sourcep;
    4115                 :            : double qd_Vgatep_sourcep;
    4116                 :            : double qd_Vdrainp_sourcep;
    4117                 :            : double qd_Vdrainb_sourcep;
    4118                 :            : double qd_Vbulkp_sourcep;
    4119                 :            : double qd_Vsourceb_sourcep;
    4120                 :            : #endif
    4121                 :            : double qgb;
    4122                 :            : #if defined(_DERIVATE)
    4123                 :            : double qgb_Vgatep_sourcep;
    4124                 :            : double qgb_Vbulkp_sourcep;
    4125                 :            : #endif
    4126                 :            : double qgmb;
    4127                 :            : #if defined(_DERIVATE)
    4128                 :            : double qgmb_Vgatem_sourcep;
    4129                 :            : double qgmb_Vbulkp_sourcep;
    4130                 :            : #endif
    4131                 :            : double qgso;
    4132                 :            : #if defined(_DERIVATE)
    4133                 :            : double qgso_Vdrainp_sourcep;
    4134                 :            : double qgso_Vdrainb_sourcep;
    4135                 :            : double qgso_Vbulkp_sourcep;
    4136                 :            : double qgso_Vsourceb_sourcep;
    4137                 :            : double qgso_Vgatep_sourcep;
    4138                 :            : #endif
    4139                 :            : double qgdo;
    4140                 :            : #if defined(_DERIVATE)
    4141                 :            : double qgdo_Vdrainb_sourcep;
    4142                 :            : double qgdo_Vbulkp_sourcep;
    4143                 :            : double qgdo_Vsourceb_sourcep;
    4144                 :            : double qgdo_Vgatep_sourcep;
    4145                 :            : double qgdo_Vdrainp_sourcep;
    4146                 :            : #endif
    4147                 :            : double cgso;
    4148                 :            : double cgdo;
    4149                 :            : double qbd;
    4150                 :            : #if defined(_DERIVATE)
    4151                 :            : double qbd_Vgatep_sourcep;
    4152                 :            : double qbd_Vdrainp_sourcep;
    4153                 :            : double qbd_Vdrainb_sourcep;
    4154                 :            : double qbd_Vbulkp_sourcep;
    4155                 :            : double qbd_Vsourceb_sourcep;
    4156                 :            : #endif
    4157                 :            : double sarg;
    4158                 :            : #if defined(_DERIVATE)
    4159                 :            : double sarg_Vdrainp_sourcep;
    4160                 :            : double sarg_Vdrainb_sourcep;
    4161                 :            : double sarg_Vbulkp_sourcep;
    4162                 :            : double sarg_Vsourceb_sourcep;
    4163                 :            : #endif
    4164                 :            : double arg;
    4165                 :            : #if defined(_DERIVATE)
    4166                 :            : double arg_Vdrainp_sourcep;
    4167                 :            : double arg_Vdrainb_sourcep;
    4168                 :            : double arg_Vbulkp_sourcep;
    4169                 :            : double arg_Vsourceb_sourcep;
    4170                 :            : #endif
    4171                 :            : double qbs;
    4172                 :            : #if defined(_DERIVATE)
    4173                 :            : double qbs_Vgatep_sourcep;
    4174                 :            : double qbs_Vdrainp_sourcep;
    4175                 :            : double qbs_Vdrainb_sourcep;
    4176                 :            : double qbs_Vbulkp_sourcep;
    4177                 :            : double qbs_Vsourceb_sourcep;
    4178                 :            : #endif
    4179                 :            : double czbsswg;
    4180                 :            : double czbssw;
    4181                 :            : double czbdswg;
    4182                 :            : double czbdsw;
    4183                 :            : double czbs;
    4184                 :            : double czbd;
    4185                 :            : double deltaphi;
    4186                 :            : #if defined(_DERIVATE)
    4187                 :            : double deltaphi_Vgatep_sourcep;
    4188                 :            : double deltaphi_Vdrainp_sourcep;
    4189                 :            : double deltaphi_Vdrainb_sourcep;
    4190                 :            : double deltaphi_Vbulkp_sourcep;
    4191                 :            : double deltaphi_Vsourceb_sourcep;
    4192                 :            : #endif
    4193                 :            : double coxwlcen;
    4194                 :            : #if defined(_DERIVATE)
    4195                 :            : double coxwlcen_Vgatep_sourcep;
    4196                 :            : double coxwlcen_Vdrainp_sourcep;
    4197                 :            : double coxwlcen_Vdrainb_sourcep;
    4198                 :            : double coxwlcen_Vbulkp_sourcep;
    4199                 :            : double coxwlcen_Vsourceb_sourcep;
    4200                 :            : #endif
    4201                 :            : double ccen;
    4202                 :            : #if defined(_DERIVATE)
    4203                 :            : double ccen_Vgatep_sourcep;
    4204                 :            : double ccen_Vdrainp_sourcep;
    4205                 :            : double ccen_Vdrainb_sourcep;
    4206                 :            : double ccen_Vbulkp_sourcep;
    4207                 :            : double ccen_Vsourceb_sourcep;
    4208                 :            : #endif
    4209                 :            : double v4;
    4210                 :            : #if defined(_DERIVATE)
    4211                 :            : double v4_Vgatep_sourcep;
    4212                 :            : double v4_Vdrainp_sourcep;
    4213                 :            : double v4_Vdrainb_sourcep;
    4214                 :            : double v4_Vbulkp_sourcep;
    4215                 :            : double v4_Vsourceb_sourcep;
    4216                 :            : #endif
    4217                 :            : double link;
    4218                 :            : double tox;
    4219                 :            : double vdseffcv;
    4220                 :            : #if defined(_DERIVATE)
    4221                 :            : double vdseffcv_Vgatep_sourcep;
    4222                 :            : double vdseffcv_Vdrainp_sourcep;
    4223                 :            : double vdseffcv_Vdrainb_sourcep;
    4224                 :            : double vdseffcv_Vbulkp_sourcep;
    4225                 :            : double vdseffcv_Vsourceb_sourcep;
    4226                 :            : #endif
    4227                 :            : double vdsatcv;
    4228                 :            : #if defined(_DERIVATE)
    4229                 :            : double vdsatcv_Vgatep_sourcep;
    4230                 :            : double vdsatcv_Vdrainp_sourcep;
    4231                 :            : double vdsatcv_Vdrainb_sourcep;
    4232                 :            : double vdsatcv_Vbulkp_sourcep;
    4233                 :            : double vdsatcv_Vsourceb_sourcep;
    4234                 :            : #endif
    4235                 :            : double qsub0;
    4236                 :            : #if defined(_DERIVATE)
    4237                 :            : double qsub0_Vgatep_sourcep;
    4238                 :            : double qsub0_Vdrainp_sourcep;
    4239                 :            : double qsub0_Vdrainb_sourcep;
    4240                 :            : double qsub0_Vbulkp_sourcep;
    4241                 :            : double qsub0_Vsourceb_sourcep;
    4242                 :            : #endif
    4243                 :            : double qac0;
    4244                 :            : #if defined(_DERIVATE)
    4245                 :            : double qac0_Vgatep_sourcep;
    4246                 :            : double qac0_Vdrainp_sourcep;
    4247                 :            : double qac0_Vdrainb_sourcep;
    4248                 :            : double qac0_Vbulkp_sourcep;
    4249                 :            : double qac0_Vsourceb_sourcep;
    4250                 :            : #endif
    4251                 :            : double vgstnvt;
    4252                 :            : #if defined(_DERIVATE)
    4253                 :            : double vgstnvt_Vgatep_sourcep;
    4254                 :            : double vgstnvt_Vdrainp_sourcep;
    4255                 :            : double vgstnvt_Vdrainb_sourcep;
    4256                 :            : double vgstnvt_Vbulkp_sourcep;
    4257                 :            : double vgstnvt_Vsourceb_sourcep;
    4258                 :            : #endif
    4259                 :            : double vbseffcv;
    4260                 :            : #if defined(_DERIVATE)
    4261                 :            : double vbseffcv_Vdrainp_sourcep;
    4262                 :            : double vbseffcv_Vdrainb_sourcep;
    4263                 :            : double vbseffcv_Vbulkp_sourcep;
    4264                 :            : double vbseffcv_Vsourceb_sourcep;
    4265                 :            : #endif
    4266                 :            : double alphaz;
    4267                 :            : #if defined(_DERIVATE)
    4268                 :            : double alphaz_Vgatep_sourcep;
    4269                 :            : double alphaz_Vdrainp_sourcep;
    4270                 :            : double alphaz_Vdrainb_sourcep;
    4271                 :            : double alphaz_Vbulkp_sourcep;
    4272                 :            : double alphaz_Vsourceb_sourcep;
    4273                 :            : #endif
    4274                 :            : double abulkcv;
    4275                 :            : #if defined(_DERIVATE)
    4276                 :            : double abulkcv_Vgatep_sourcep;
    4277                 :            : double abulkcv_Vdrainp_sourcep;
    4278                 :            : double abulkcv_Vdrainb_sourcep;
    4279                 :            : double abulkcv_Vbulkp_sourcep;
    4280                 :            : double abulkcv_Vsourceb_sourcep;
    4281                 :            : #endif
    4282                 :            : double two_third_coxwl;
    4283                 :            : double arg1;
    4284                 :            : #if defined(_DERIVATE)
    4285                 :            : double arg1_Vgatep_sourcep;
    4286                 :            : double arg1_Vdrainp_sourcep;
    4287                 :            : double arg1_Vdrainb_sourcep;
    4288                 :            : double arg1_Vbulkp_sourcep;
    4289                 :            : double arg1_Vsourceb_sourcep;
    4290                 :            : #endif
    4291                 :            : double coxwl;
    4292                 :            : double qgmid;
    4293                 :            : #if defined(_DERIVATE)
    4294                 :            : double qgmid_Vdrainb_sourcep;
    4295                 :            : double qgmid_Vbulkp_sourcep;
    4296                 :            : double qgmid_Vsourceb_sourcep;
    4297                 :            : double qgmid_Vgatep_sourcep;
    4298                 :            : double qgmid_Vdrainp_sourcep;
    4299                 :            : double qgmid_Vgatem_sourcep;
    4300                 :            : #endif
    4301                 :            : double qbulk;
    4302                 :            : #if defined(_DERIVATE)
    4303                 :            : double qbulk_Vgatem_sourcep;
    4304                 :            : double qbulk_Vgatep_sourcep;
    4305                 :            : double qbulk_Vdrainp_sourcep;
    4306                 :            : double qbulk_Vdrainb_sourcep;
    4307                 :            : double qbulk_Vbulkp_sourcep;
    4308                 :            : double qbulk_Vsourceb_sourcep;
    4309                 :            : #endif
    4310                 :            : double qsrc;
    4311                 :            : #if defined(_DERIVATE)
    4312                 :            : double qsrc_Vgatem_sourcep;
    4313                 :            : double qsrc_Vgatep_sourcep;
    4314                 :            : double qsrc_Vdrainp_sourcep;
    4315                 :            : double qsrc_Vdrainb_sourcep;
    4316                 :            : double qsrc_Vbulkp_sourcep;
    4317                 :            : double qsrc_Vsourceb_sourcep;
    4318                 :            : #endif
    4319                 :            : double qdrn;
    4320                 :            : #if defined(_DERIVATE)
    4321                 :            : double qdrn_Vgatem_sourcep;
    4322                 :            : double qdrn_Vgatep_sourcep;
    4323                 :            : double qdrn_Vdrainp_sourcep;
    4324                 :            : double qdrn_Vdrainb_sourcep;
    4325                 :            : double qdrn_Vbulkp_sourcep;
    4326                 :            : double qdrn_Vsourceb_sourcep;
    4327                 :            : #endif
    4328                 :            : double qgate;
    4329                 :            : #if defined(_DERIVATE)
    4330                 :            : double qgate_Vgatep_sourcep;
    4331                 :            : double qgate_Vdrainp_sourcep;
    4332                 :            : double qgate_Vdrainb_sourcep;
    4333                 :            : double qgate_Vbulkp_sourcep;
    4334                 :            : double qgate_Vsourceb_sourcep;
    4335                 :            : #endif
    4336                 :            : double ccn;
    4337                 :            : double igb;
    4338                 :            : #if defined(_DERIVATE)
    4339                 :            : double igb_Vgatep_sourcep;
    4340                 :            : double igb_Vdrainp_sourcep;
    4341                 :            : double igb_Vdrainb_sourcep;
    4342                 :            : double igb_Vbulkp_sourcep;
    4343                 :            : double igb_Vsourceb_sourcep;
    4344                 :            : #endif
    4345                 :            : double igbinv;
    4346                 :            : #if defined(_DERIVATE)
    4347                 :            : double igbinv_Vgatep_sourcep;
    4348                 :            : double igbinv_Vdrainp_sourcep;
    4349                 :            : double igbinv_Vdrainb_sourcep;
    4350                 :            : double igbinv_Vbulkp_sourcep;
    4351                 :            : double igbinv_Vsourceb_sourcep;
    4352                 :            : #endif
    4353                 :            : double igbacc;
    4354                 :            : #if defined(_DERIVATE)
    4355                 :            : double igbacc_Vgatep_sourcep;
    4356                 :            : double igbacc_Vdrainp_sourcep;
    4357                 :            : double igbacc_Vdrainb_sourcep;
    4358                 :            : double igbacc_Vbulkp_sourcep;
    4359                 :            : double igbacc_Vsourceb_sourcep;
    4360                 :            : #endif
    4361                 :            : double igd;
    4362                 :            : #if defined(_DERIVATE)
    4363                 :            : double igd_Vgatep_sourcep;
    4364                 :            : double igd_Vdrainp_sourcep;
    4365                 :            : double igd_Vdrainb_sourcep;
    4366                 :            : double igd_Vbulkp_sourcep;
    4367                 :            : double igd_Vsourceb_sourcep;
    4368                 :            : #endif
    4369                 :            : double igs;
    4370                 :            : #if defined(_DERIVATE)
    4371                 :            : double igs_Vgatep_sourcep;
    4372                 :            : double igs_Vdrainp_sourcep;
    4373                 :            : double igs_Vdrainb_sourcep;
    4374                 :            : double igs_Vbulkp_sourcep;
    4375                 :            : double igs_Vsourceb_sourcep;
    4376                 :            : #endif
    4377                 :            : double igcd;
    4378                 :            : #if defined(_DERIVATE)
    4379                 :            : double igcd_Vgatep_sourcep;
    4380                 :            : double igcd_Vdrainp_sourcep;
    4381                 :            : double igcd_Vdrainb_sourcep;
    4382                 :            : double igcd_Vbulkp_sourcep;
    4383                 :            : double igcd_Vsourceb_sourcep;
    4384                 :            : #endif
    4385                 :            : double igcs;
    4386                 :            : #if defined(_DERIVATE)
    4387                 :            : double igcs_Vgatep_sourcep;
    4388                 :            : double igcs_Vdrainp_sourcep;
    4389                 :            : double igcs_Vdrainb_sourcep;
    4390                 :            : double igcs_Vbulkp_sourcep;
    4391                 :            : double igcs_Vsourceb_sourcep;
    4392                 :            : #endif
    4393                 :            : double t13;
    4394                 :            : #if defined(_DERIVATE)
    4395                 :            : double t13_Vgatep_sourcep;
    4396                 :            : double t13_Vdrainp_sourcep;
    4397                 :            : double t13_Vdrainb_sourcep;
    4398                 :            : double t13_Vbulkp_sourcep;
    4399                 :            : double t13_Vsourceb_sourcep;
    4400                 :            : #endif
    4401                 :            : double modif_pigcd;
    4402                 :            : #if defined(_DERIVATE)
    4403                 :            : double modif_pigcd_Vgatep_sourcep;
    4404                 :            : double modif_pigcd_Vdrainp_sourcep;
    4405                 :            : double modif_pigcd_Vdrainb_sourcep;
    4406                 :            : double modif_pigcd_Vbulkp_sourcep;
    4407                 :            : double modif_pigcd_Vsourceb_sourcep;
    4408                 :            : #endif
    4409                 :            : double igc;
    4410                 :            : #if defined(_DERIVATE)
    4411                 :            : double igc_Vgatep_sourcep;
    4412                 :            : double igc_Vdrainp_sourcep;
    4413                 :            : double igc_Vdrainb_sourcep;
    4414                 :            : double igc_Vbulkp_sourcep;
    4415                 :            : double igc_Vsourceb_sourcep;
    4416                 :            : #endif
    4417                 :            : double expvxnvt;
    4418                 :            : #if defined(_DERIVATE)
    4419                 :            : double expvxnvt_Vgatep_sourcep;
    4420                 :            : double expvxnvt_Vdrainp_sourcep;
    4421                 :            : double expvxnvt_Vdrainb_sourcep;
    4422                 :            : double expvxnvt_Vbulkp_sourcep;
    4423                 :            : double expvxnvt_Vsourceb_sourcep;
    4424                 :            : #endif
    4425                 :            : double vaux;
    4426                 :            : #if defined(_DERIVATE)
    4427                 :            : double vaux_Vgatep_sourcep;
    4428                 :            : double vaux_Vdrainp_sourcep;
    4429                 :            : double vaux_Vdrainb_sourcep;
    4430                 :            : double vaux_Vbulkp_sourcep;
    4431                 :            : double vaux_Vsourceb_sourcep;
    4432                 :            : #endif
    4433                 :            : double vxnvt;
    4434                 :            : #if defined(_DERIVATE)
    4435                 :            : double vxnvt_Vgatep_sourcep;
    4436                 :            : double vxnvt_Vdrainp_sourcep;
    4437                 :            : double vxnvt_Vdrainb_sourcep;
    4438                 :            : double vxnvt_Vbulkp_sourcep;
    4439                 :            : double vxnvt_Vsourceb_sourcep;
    4440                 :            : #endif
    4441                 :            : double voxdepinv;
    4442                 :            : #if defined(_DERIVATE)
    4443                 :            : double voxdepinv_Vgatep_sourcep;
    4444                 :            : double voxdepinv_Vdrainp_sourcep;
    4445                 :            : double voxdepinv_Vdrainb_sourcep;
    4446                 :            : double voxdepinv_Vbulkp_sourcep;
    4447                 :            : double voxdepinv_Vsourceb_sourcep;
    4448                 :            : #endif
    4449                 :            : double voxacc;
    4450                 :            : #if defined(_DERIVATE)
    4451                 :            : double voxacc_Vgatep_sourcep;
    4452                 :            : double voxacc_Vdrainp_sourcep;
    4453                 :            : double voxacc_Vdrainb_sourcep;
    4454                 :            : double voxacc_Vbulkp_sourcep;
    4455                 :            : double voxacc_Vsourceb_sourcep;
    4456                 :            : #endif
    4457                 :            : double vfbeff;
    4458                 :            : #if defined(_DERIVATE)
    4459                 :            : double vfbeff_Vgatep_sourcep;
    4460                 :            : double vfbeff_Vdrainp_sourcep;
    4461                 :            : double vfbeff_Vdrainb_sourcep;
    4462                 :            : double vfbeff_Vbulkp_sourcep;
    4463                 :            : double vfbeff_Vsourceb_sourcep;
    4464                 :            : #endif
    4465                 :            : double v3;
    4466                 :            : #if defined(_DERIVATE)
    4467                 :            : double v3_Vgatep_sourcep;
    4468                 :            : double v3_Vdrainp_sourcep;
    4469                 :            : double v3_Vdrainb_sourcep;
    4470                 :            : double v3_Vbulkp_sourcep;
    4471                 :            : double v3_Vsourceb_sourcep;
    4472                 :            : #endif
    4473                 :            : double igisl;
    4474                 :            : #if defined(_DERIVATE)
    4475                 :            : double igisl_Vgatep_sourcep;
    4476                 :            : double igisl_Vdrainp_sourcep;
    4477                 :            : double igisl_Vdrainb_sourcep;
    4478                 :            : double igisl_Vbulkp_sourcep;
    4479                 :            : double igisl_Vsourceb_sourcep;
    4480                 :            : #endif
    4481                 :            : double igidl;
    4482                 :            : #if defined(_DERIVATE)
    4483                 :            : double igidl_Vgatep_sourcep;
    4484                 :            : double igidl_Vdrainp_sourcep;
    4485                 :            : double igidl_Vdrainb_sourcep;
    4486                 :            : double igidl_Vbulkp_sourcep;
    4487                 :            : double igidl_Vsourceb_sourcep;
    4488                 :            : #endif
    4489                 :            : double gdtot;
    4490                 :            : #if defined(_DERIVATE)
    4491                 :            : double gdtot_Vgatep_sourcep;
    4492                 :            : double gdtot_Vdrainp_sourcep;
    4493                 :            : double gdtot_Vdrainb_sourcep;
    4494                 :            : double gdtot_Vbulkp_sourcep;
    4495                 :            : double gdtot_Vsourceb_sourcep;
    4496                 :            : #endif
    4497                 :            : double rd;
    4498                 :            : #if defined(_DERIVATE)
    4499                 :            : double rd_Vgatep_sourcep;
    4500                 :            : double rd_Vdrainp_sourcep;
    4501                 :            : double rd_Vdrainb_sourcep;
    4502                 :            : double rd_Vbulkp_sourcep;
    4503                 :            : double rd_Vsourceb_sourcep;
    4504                 :            : #endif
    4505                 :            : double gstot;
    4506                 :            : #if defined(_DERIVATE)
    4507                 :            : double gstot_Vgatep_sourcep;
    4508                 :            : double gstot_Vdrainp_sourcep;
    4509                 :            : double gstot_Vdrainb_sourcep;
    4510                 :            : double gstot_Vbulkp_sourcep;
    4511                 :            : double gstot_Vsourceb_sourcep;
    4512                 :            : #endif
    4513                 :            : double rs;
    4514                 :            : #if defined(_DERIVATE)
    4515                 :            : double rs_Vgatep_sourcep;
    4516                 :            : double rs_Vdrainp_sourcep;
    4517                 :            : double rs_Vdrainb_sourcep;
    4518                 :            : double rs_Vbulkp_sourcep;
    4519                 :            : double rs_Vsourceb_sourcep;
    4520                 :            : #endif
    4521                 :            : double gcrg;
    4522                 :            : #if defined(_DERIVATE)
    4523                 :            : double gcrg_Vgatep_sourcep;
    4524                 :            : double gcrg_Vdrainp_sourcep;
    4525                 :            : double gcrg_Vdrainb_sourcep;
    4526                 :            : double gcrg_Vbulkp_sourcep;
    4527                 :            : double gcrg_Vsourceb_sourcep;
    4528                 :            : #endif
    4529                 :            : double fsevl;
    4530                 :            : #if defined(_DERIVATE)
    4531                 :            : double fsevl_Vgatep_sourcep;
    4532                 :            : double fsevl_Vdrainp_sourcep;
    4533                 :            : double fsevl_Vdrainb_sourcep;
    4534                 :            : double fsevl_Vbulkp_sourcep;
    4535                 :            : double fsevl_Vsourceb_sourcep;
    4536                 :            : #endif
    4537                 :            : double vs;
    4538                 :            : #if defined(_DERIVATE)
    4539                 :            : double vs_Vgatep_sourcep;
    4540                 :            : double vs_Vdrainp_sourcep;
    4541                 :            : double vs_Vdrainb_sourcep;
    4542                 :            : double vs_Vbulkp_sourcep;
    4543                 :            : double vs_Vsourceb_sourcep;
    4544                 :            : #endif
    4545                 :            : double t11;
    4546                 :            : #if defined(_DERIVATE)
    4547                 :            : double t11_Vgatep_sourcep;
    4548                 :            : double t11_Vdrainp_sourcep;
    4549                 :            : double t11_Vdrainb_sourcep;
    4550                 :            : double t11_Vbulkp_sourcep;
    4551                 :            : double t11_Vsourceb_sourcep;
    4552                 :            : #endif
    4553                 :            : double t12;
    4554                 :            : #if defined(_DERIVATE)
    4555                 :            : double t12_Vgatep_sourcep;
    4556                 :            : double t12_Vdrainp_sourcep;
    4557                 :            : double t12_Vdrainb_sourcep;
    4558                 :            : double t12_Vbulkp_sourcep;
    4559                 :            : double t12_Vsourceb_sourcep;
    4560                 :            : #endif
    4561                 :            : double cdrain;
    4562                 :            : #if defined(_DERIVATE)
    4563                 :            : double cdrain_Vgatep_sourcep;
    4564                 :            : double cdrain_Vdrainp_sourcep;
    4565                 :            : double cdrain_Vdrainb_sourcep;
    4566                 :            : double cdrain_Vbulkp_sourcep;
    4567                 :            : double cdrain_Vsourceb_sourcep;
    4568                 :            : #endif
    4569                 :            : double ids;
    4570                 :            : #if defined(_DERIVATE)
    4571                 :            : double ids_Vgatep_sourcep;
    4572                 :            : double ids_Vdrainp_sourcep;
    4573                 :            : double ids_Vdrainb_sourcep;
    4574                 :            : double ids_Vbulkp_sourcep;
    4575                 :            : double ids_Vsourceb_sourcep;
    4576                 :            : #endif
    4577                 :            : double csub;
    4578                 :            : #if defined(_DERIVATE)
    4579                 :            : double csub_Vgatep_sourcep;
    4580                 :            : double csub_Vdrainp_sourcep;
    4581                 :            : double csub_Vdrainb_sourcep;
    4582                 :            : double csub_Vbulkp_sourcep;
    4583                 :            : double csub_Vsourceb_sourcep;
    4584                 :            : #endif
    4585                 :            : double isub;
    4586                 :            : #if defined(_DERIVATE)
    4587                 :            : double isub_Vgatep_sourcep;
    4588                 :            : double isub_Vdrainp_sourcep;
    4589                 :            : double isub_Vdrainb_sourcep;
    4590                 :            : double isub_Vbulkp_sourcep;
    4591                 :            : double isub_Vsourceb_sourcep;
    4592                 :            : #endif
    4593                 :            : #if defined(_DERIVATE)
    4594                 :            : double tmp_Vgatep_sourcep;
    4595                 :            : double tmp_Vdrainp_sourcep;
    4596                 :            : double tmp_Vdrainb_sourcep;
    4597                 :            : double tmp_Vbulkp_sourcep;
    4598                 :            : double tmp_Vsourceb_sourcep;
    4599                 :            : #endif
    4600                 :            : double idsa;
    4601                 :            : #if defined(_DERIVATE)
    4602                 :            : double idsa_Vgatep_sourcep;
    4603                 :            : double idsa_Vdrainp_sourcep;
    4604                 :            : double idsa_Vdrainb_sourcep;
    4605                 :            : double idsa_Vbulkp_sourcep;
    4606                 :            : double idsa_Vsourceb_sourcep;
    4607                 :            : #endif
    4608                 :            : double vascbe;
    4609                 :            : #if defined(_DERIVATE)
    4610                 :            : double vascbe_Vgatep_sourcep;
    4611                 :            : double vascbe_Vdrainp_sourcep;
    4612                 :            : double vascbe_Vdrainb_sourcep;
    4613                 :            : double vascbe_Vbulkp_sourcep;
    4614                 :            : double vascbe_Vsourceb_sourcep;
    4615                 :            : #endif
    4616                 :            : double vadits;
    4617                 :            : #if defined(_DERIVATE)
    4618                 :            : double vadits_Vgatep_sourcep;
    4619                 :            : double vadits_Vdrainp_sourcep;
    4620                 :            : double vadits_Vdrainb_sourcep;
    4621                 :            : double vadits_Vbulkp_sourcep;
    4622                 :            : double vadits_Vsourceb_sourcep;
    4623                 :            : #endif
    4624                 :            : double vadibl;
    4625                 :            : #if defined(_DERIVATE)
    4626                 :            : double vadibl_Vgatep_sourcep;
    4627                 :            : double vadibl_Vdrainp_sourcep;
    4628                 :            : double vadibl_Vdrainb_sourcep;
    4629                 :            : double vadibl_Vbulkp_sourcep;
    4630                 :            : double vadibl_Vsourceb_sourcep;
    4631                 :            : #endif
    4632                 :            : double vaclm;
    4633                 :            : #if defined(_DERIVATE)
    4634                 :            : double vaclm_Vgatep_sourcep;
    4635                 :            : double vaclm_Vdrainp_sourcep;
    4636                 :            : double vaclm_Vdrainb_sourcep;
    4637                 :            : double vaclm_Vbulkp_sourcep;
    4638                 :            : double vaclm_Vsourceb_sourcep;
    4639                 :            : #endif
    4640                 :            : double cclm;
    4641                 :            : #if defined(_DERIVATE)
    4642                 :            : double cclm_Vgatep_sourcep;
    4643                 :            : double cclm_Vdrainp_sourcep;
    4644                 :            : double cclm_Vdrainb_sourcep;
    4645                 :            : double cclm_Vbulkp_sourcep;
    4646                 :            : double cclm_Vsourceb_sourcep;
    4647                 :            : #endif
    4648                 :            : double pvagterm;
    4649                 :            : #if defined(_DERIVATE)
    4650                 :            : double pvagterm_Vgatep_sourcep;
    4651                 :            : double pvagterm_Vdrainp_sourcep;
    4652                 :            : double pvagterm_Vdrainb_sourcep;
    4653                 :            : double pvagterm_Vbulkp_sourcep;
    4654                 :            : double pvagterm_Vsourceb_sourcep;
    4655                 :            : #endif
    4656                 :            : double fp;
    4657                 :            : #if defined(_DERIVATE)
    4658                 :            : double fp_Vgatep_sourcep;
    4659                 :            : double fp_Vdrainp_sourcep;
    4660                 :            : double fp_Vdrainb_sourcep;
    4661                 :            : double fp_Vbulkp_sourcep;
    4662                 :            : double fp_Vsourceb_sourcep;
    4663                 :            : #endif
    4664                 :            : double idl;
    4665                 :            : #if defined(_DERIVATE)
    4666                 :            : double idl_Vgatep_sourcep;
    4667                 :            : double idl_Vdrainp_sourcep;
    4668                 :            : double idl_Vdrainb_sourcep;
    4669                 :            : double idl_Vbulkp_sourcep;
    4670                 :            : double idl_Vsourceb_sourcep;
    4671                 :            : #endif
    4672                 :            : double gche;
    4673                 :            : #if defined(_DERIVATE)
    4674                 :            : double gche_Vgatep_sourcep;
    4675                 :            : double gche_Vdrainp_sourcep;
    4676                 :            : double gche_Vdrainb_sourcep;
    4677                 :            : double gche_Vbulkp_sourcep;
    4678                 :            : double gche_Vsourceb_sourcep;
    4679                 :            : #endif
    4680                 :            : double fgche2;
    4681                 :            : #if defined(_DERIVATE)
    4682                 :            : double fgche2_Vgatep_sourcep;
    4683                 :            : double fgche2_Vdrainp_sourcep;
    4684                 :            : double fgche2_Vdrainb_sourcep;
    4685                 :            : double fgche2_Vbulkp_sourcep;
    4686                 :            : double fgche2_Vsourceb_sourcep;
    4687                 :            : #endif
    4688                 :            : double fgche1;
    4689                 :            : #if defined(_DERIVATE)
    4690                 :            : double fgche1_Vgatep_sourcep;
    4691                 :            : double fgche1_Vdrainp_sourcep;
    4692                 :            : double fgche1_Vdrainb_sourcep;
    4693                 :            : double fgche1_Vbulkp_sourcep;
    4694                 :            : double fgche1_Vsourceb_sourcep;
    4695                 :            : #endif
    4696                 :            : double abovvgst2vtm;
    4697                 :            : #if defined(_DERIVATE)
    4698                 :            : double abovvgst2vtm_Vgatep_sourcep;
    4699                 :            : double abovvgst2vtm_Vdrainp_sourcep;
    4700                 :            : double abovvgst2vtm_Vdrainb_sourcep;
    4701                 :            : double abovvgst2vtm_Vbulkp_sourcep;
    4702                 :            : double abovvgst2vtm_Vsourceb_sourcep;
    4703                 :            : #endif
    4704                 :            : double beta;
    4705                 :            : #if defined(_DERIVATE)
    4706                 :            : double beta_Vgatep_sourcep;
    4707                 :            : double beta_Vdrainp_sourcep;
    4708                 :            : double beta_Vdrainb_sourcep;
    4709                 :            : double beta_Vbulkp_sourcep;
    4710                 :            : double beta_Vsourceb_sourcep;
    4711                 :            : #endif
    4712                 :            : double coxeffwovl;
    4713                 :            : #if defined(_DERIVATE)
    4714                 :            : double coxeffwovl_Vgatep_sourcep;
    4715                 :            : double coxeffwovl_Vdrainp_sourcep;
    4716                 :            : double coxeffwovl_Vdrainb_sourcep;
    4717                 :            : double coxeffwovl_Vbulkp_sourcep;
    4718                 :            : double coxeffwovl_Vsourceb_sourcep;
    4719                 :            : #endif
    4720                 :            : double coxeff;
    4721                 :            : #if defined(_DERIVATE)
    4722                 :            : double coxeff_Vgatep_sourcep;
    4723                 :            : double coxeff_Vdrainp_sourcep;
    4724                 :            : double coxeff_Vdrainb_sourcep;
    4725                 :            : double coxeff_Vbulkp_sourcep;
    4726                 :            : double coxeff_Vsourceb_sourcep;
    4727                 :            : #endif
    4728                 :            : double tcen;
    4729                 :            : #if defined(_DERIVATE)
    4730                 :            : double tcen_Vgatep_sourcep;
    4731                 :            : double tcen_Vdrainp_sourcep;
    4732                 :            : double tcen_Vdrainb_sourcep;
    4733                 :            : double tcen_Vbulkp_sourcep;
    4734                 :            : double tcen_Vsourceb_sourcep;
    4735                 :            : #endif
    4736                 :            : double dt0_dvg;
    4737                 :            : #if defined(_DERIVATE)
    4738                 :            : double dt0_dvg_Vgatep_sourcep;
    4739                 :            : double dt0_dvg_Vdrainp_sourcep;
    4740                 :            : double dt0_dvg_Vdrainb_sourcep;
    4741                 :            : double dt0_dvg_Vbulkp_sourcep;
    4742                 :            : double dt0_dvg_Vsourceb_sourcep;
    4743                 :            : #endif
    4744                 :            : double vasat;
    4745                 :            : #if defined(_DERIVATE)
    4746                 :            : double vasat_Vgatep_sourcep;
    4747                 :            : double vasat_Vdrainp_sourcep;
    4748                 :            : double vasat_Vdrainb_sourcep;
    4749                 :            : double vasat_Vbulkp_sourcep;
    4750                 :            : double vasat_Vsourceb_sourcep;
    4751                 :            : #endif
    4752                 :            : double diffvds;
    4753                 :            : #if defined(_DERIVATE)
    4754                 :            : double diffvds_Vdrainp_sourcep;
    4755                 :            : double diffvds_Vgatep_sourcep;
    4756                 :            : double diffvds_Vdrainb_sourcep;
    4757                 :            : double diffvds_Vbulkp_sourcep;
    4758                 :            : double diffvds_Vsourceb_sourcep;
    4759                 :            : #endif
    4760                 :            : double vdseff;
    4761                 :            : #if defined(_DERIVATE)
    4762                 :            : double vdseff_Vgatep_sourcep;
    4763                 :            : double vdseff_Vdrainp_sourcep;
    4764                 :            : double vdseff_Vdrainb_sourcep;
    4765                 :            : double vdseff_Vbulkp_sourcep;
    4766                 :            : double vdseff_Vsourceb_sourcep;
    4767                 :            : #endif
    4768                 :            : double vdsat;
    4769                 :            : #if defined(_DERIVATE)
    4770                 :            : double vdsat_Vgatep_sourcep;
    4771                 :            : double vdsat_Vdrainp_sourcep;
    4772                 :            : double vdsat_Vdrainb_sourcep;
    4773                 :            : double vdsat_Vbulkp_sourcep;
    4774                 :            : double vdsat_Vsourceb_sourcep;
    4775                 :            : #endif
    4776                 :            : double vgst2vtm;
    4777                 :            : #if defined(_DERIVATE)
    4778                 :            : double vgst2vtm_Vgatep_sourcep;
    4779                 :            : double vgst2vtm_Vdrainp_sourcep;
    4780                 :            : double vgst2vtm_Vdrainb_sourcep;
    4781                 :            : double vgst2vtm_Vbulkp_sourcep;
    4782                 :            : double vgst2vtm_Vsourceb_sourcep;
    4783                 :            : #endif
    4784                 :            : double Lambda;
    4785                 :            : #if defined(_DERIVATE)
    4786                 :            : double Lambda_Vgatep_sourcep;
    4787                 :            : double Lambda_Vdrainp_sourcep;
    4788                 :            : double Lambda_Vdrainb_sourcep;
    4789                 :            : double Lambda_Vbulkp_sourcep;
    4790                 :            : double Lambda_Vsourceb_sourcep;
    4791                 :            : #endif
    4792                 :            : double esatl;
    4793                 :            : #if defined(_DERIVATE)
    4794                 :            : double esatl_Vgatep_sourcep;
    4795                 :            : double esatl_Vdrainp_sourcep;
    4796                 :            : double esatl_Vdrainb_sourcep;
    4797                 :            : double esatl_Vbulkp_sourcep;
    4798                 :            : double esatl_Vsourceb_sourcep;
    4799                 :            : #endif
    4800                 :            : double esat;
    4801                 :            : #if defined(_DERIVATE)
    4802                 :            : double esat_Vgatep_sourcep;
    4803                 :            : double esat_Vdrainp_sourcep;
    4804                 :            : double esat_Vdrainb_sourcep;
    4805                 :            : double esat_Vbulkp_sourcep;
    4806                 :            : double esat_Vsourceb_sourcep;
    4807                 :            : #endif
    4808                 :            : double wvcoxrds;
    4809                 :            : #if defined(_DERIVATE)
    4810                 :            : double wvcoxrds_Vgatep_sourcep;
    4811                 :            : double wvcoxrds_Vdrainp_sourcep;
    4812                 :            : double wvcoxrds_Vdrainb_sourcep;
    4813                 :            : double wvcoxrds_Vbulkp_sourcep;
    4814                 :            : double wvcoxrds_Vsourceb_sourcep;
    4815                 :            : #endif
    4816                 :            : double wvcox;
    4817                 :            : #if defined(_DERIVATE)
    4818                 :            : double wvcox_Vgatep_sourcep;
    4819                 :            : double wvcox_Vdrainp_sourcep;
    4820                 :            : double wvcox_Vdrainb_sourcep;
    4821                 :            : double wvcox_Vbulkp_sourcep;
    4822                 :            : double wvcox_Vsourceb_sourcep;
    4823                 :            : #endif
    4824                 :            : double ueff;
    4825                 :            : #if defined(_DERIVATE)
    4826                 :            : double ueff_Vgatep_sourcep;
    4827                 :            : double ueff_Vdrainp_sourcep;
    4828                 :            : double ueff_Vdrainb_sourcep;
    4829                 :            : double ueff_Vbulkp_sourcep;
    4830                 :            : double ueff_Vsourceb_sourcep;
    4831                 :            : #endif
    4832                 :            : double denomi;
    4833                 :            : #if defined(_DERIVATE)
    4834                 :            : double denomi_Vgatep_sourcep;
    4835                 :            : double denomi_Vdrainp_sourcep;
    4836                 :            : double denomi_Vdrainb_sourcep;
    4837                 :            : double denomi_Vbulkp_sourcep;
    4838                 :            : double denomi_Vsourceb_sourcep;
    4839                 :            : #endif
    4840                 :            : double abulk;
    4841                 :            : #if defined(_DERIVATE)
    4842                 :            : double abulk_Vgatep_sourcep;
    4843                 :            : double abulk_Vdrainp_sourcep;
    4844                 :            : double abulk_Vdrainb_sourcep;
    4845                 :            : double abulk_Vbulkp_sourcep;
    4846                 :            : double abulk_Vsourceb_sourcep;
    4847                 :            : #endif
    4848                 :            : double dabulk_dvg;
    4849                 :            : #if defined(_DERIVATE)
    4850                 :            : double dabulk_dvg_Vgatep_sourcep;
    4851                 :            : double dabulk_dvg_Vdrainp_sourcep;
    4852                 :            : double dabulk_dvg_Vdrainb_sourcep;
    4853                 :            : double dabulk_dvg_Vbulkp_sourcep;
    4854                 :            : double dabulk_dvg_Vsourceb_sourcep;
    4855                 :            : #endif
    4856                 :            : double abulk0;
    4857                 :            : #if defined(_DERIVATE)
    4858                 :            : double abulk0_Vgatep_sourcep;
    4859                 :            : double abulk0_Vdrainp_sourcep;
    4860                 :            : double abulk0_Vdrainb_sourcep;
    4861                 :            : double abulk0_Vbulkp_sourcep;
    4862                 :            : double abulk0_Vsourceb_sourcep;
    4863                 :            : #endif
    4864                 :            : double rds;
    4865                 :            : #if defined(_DERIVATE)
    4866                 :            : double rds_Vgatep_sourcep;
    4867                 :            : double rds_Vdrainp_sourcep;
    4868                 :            : double rds_Vdrainb_sourcep;
    4869                 :            : double rds_Vbulkp_sourcep;
    4870                 :            : double rds_Vsourceb_sourcep;
    4871                 :            : #endif
    4872                 :            : double Weff;
    4873                 :            : #if defined(_DERIVATE)
    4874                 :            : double Weff_Vgatep_sourcep;
    4875                 :            : double Weff_Vdrainp_sourcep;
    4876                 :            : double Weff_Vdrainb_sourcep;
    4877                 :            : double Weff_Vbulkp_sourcep;
    4878                 :            : double Weff_Vsourceb_sourcep;
    4879                 :            : #endif
    4880                 :            : double vgsteff;
    4881                 :            : #if defined(_DERIVATE)
    4882                 :            : double vgsteff_Vgatep_sourcep;
    4883                 :            : double vgsteff_Vdrainp_sourcep;
    4884                 :            : double vgsteff_Vdrainb_sourcep;
    4885                 :            : double vgsteff_Vbulkp_sourcep;
    4886                 :            : double vgsteff_Vsourceb_sourcep;
    4887                 :            : #endif
    4888                 :            : double expvgst;
    4889                 :            : #if defined(_DERIVATE)
    4890                 :            : double expvgst_Vgatep_sourcep;
    4891                 :            : double expvgst_Vdrainp_sourcep;
    4892                 :            : double expvgst_Vdrainb_sourcep;
    4893                 :            : double expvgst_Vbulkp_sourcep;
    4894                 :            : double expvgst_Vsourceb_sourcep;
    4895                 :            : #endif
    4896                 :            : #if defined(_DERIVATE)
    4897                 :            : double t10_Vgatep_sourcep;
    4898                 :            : double t10_Vdrainp_sourcep;
    4899                 :            : double t10_Vdrainb_sourcep;
    4900                 :            : double t10_Vbulkp_sourcep;
    4901                 :            : double t10_Vsourceb_sourcep;
    4902                 :            : #endif
    4903                 :            : double vgst;
    4904                 :            : #if defined(_DERIVATE)
    4905                 :            : double vgst_Vgatep_sourcep;
    4906                 :            : double vgst_Vdrainp_sourcep;
    4907                 :            : double vgst_Vdrainb_sourcep;
    4908                 :            : double vgst_Vbulkp_sourcep;
    4909                 :            : double vgst_Vsourceb_sourcep;
    4910                 :            : #endif
    4911                 :            : double Vgs_eff;
    4912                 :            : #if defined(_DERIVATE)
    4913                 :            : double Vgs_eff_Vgatep_sourcep;
    4914                 :            : double Vgs_eff_Vdrainp_sourcep;
    4915                 :            : double Vgs_eff_Vdrainb_sourcep;
    4916                 :            : double Vgs_eff_Vbulkp_sourcep;
    4917                 :            : double Vgs_eff_Vsourceb_sourcep;
    4918                 :            : #endif
    4919                 :            : double vgd_eff;
    4920                 :            : #if defined(_DERIVATE)
    4921                 :            : double vgd_eff_Vgatep_sourcep;
    4922                 :            : double vgd_eff_Vdrainp_sourcep;
    4923                 :            : double vgd_eff_Vdrainb_sourcep;
    4924                 :            : double vgd_eff_Vbulkp_sourcep;
    4925                 :            : double vgd_eff_Vsourceb_sourcep;
    4926                 :            : #endif
    4927                 :            : double vgs_eff;
    4928                 :            : #if defined(_DERIVATE)
    4929                 :            : double vgs_eff_Vgatep_sourcep;
    4930                 :            : double vgs_eff_Vdrainp_sourcep;
    4931                 :            : double vgs_eff_Vdrainb_sourcep;
    4932                 :            : double vgs_eff_Vbulkp_sourcep;
    4933                 :            : double vgs_eff_Vsourceb_sourcep;
    4934                 :            : #endif
    4935                 :            : double t6;
    4936                 :            : #if defined(_DERIVATE)
    4937                 :            : double t6_Vgatep_sourcep;
    4938                 :            : double t6_Vdrainp_sourcep;
    4939                 :            : double t6_Vdrainb_sourcep;
    4940                 :            : double t6_Vbulkp_sourcep;
    4941                 :            : double t6_Vsourceb_sourcep;
    4942                 :            : #endif
    4943                 :            : double t7;
    4944                 :            : #if defined(_DERIVATE)
    4945                 :            : double t7_Vgatep_sourcep;
    4946                 :            : double t7_Vdrainp_sourcep;
    4947                 :            : double t7_Vdrainb_sourcep;
    4948                 :            : double t7_Vbulkp_sourcep;
    4949                 :            : double t7_Vsourceb_sourcep;
    4950                 :            : #endif
    4951                 :            : #if defined(_DERIVATE)
    4952                 :            : double t8_Vgatep_sourcep;
    4953                 :            : double t8_Vdrainp_sourcep;
    4954                 :            : double t8_Vdrainb_sourcep;
    4955                 :            : double t8_Vbulkp_sourcep;
    4956                 :            : double t8_Vsourceb_sourcep;
    4957                 :            : #endif
    4958                 :            : double n;
    4959                 :            : #if defined(_DERIVATE)
    4960                 :            : double n_Vdrainp_sourcep;
    4961                 :            : double n_Vdrainb_sourcep;
    4962                 :            : double n_Vbulkp_sourcep;
    4963                 :            : double n_Vsourceb_sourcep;
    4964                 :            : #endif
    4965                 :            : double tmp4;
    4966                 :            : #if defined(_DERIVATE)
    4967                 :            : double tmp4_Vgatep_sourcep;
    4968                 :            : double tmp4_Vdrainp_sourcep;
    4969                 :            : double tmp4_Vdrainb_sourcep;
    4970                 :            : double tmp4_Vbulkp_sourcep;
    4971                 :            : double tmp4_Vsourceb_sourcep;
    4972                 :            : #endif
    4973                 :            : #if defined(_DERIVATE)
    4974                 :            : double tmp3_Vgatep_sourcep;
    4975                 :            : double tmp3_Vdrainp_sourcep;
    4976                 :            : double tmp3_Vdrainb_sourcep;
    4977                 :            : double tmp3_Vbulkp_sourcep;
    4978                 :            : double tmp3_Vsourceb_sourcep;
    4979                 :            : #endif
    4980                 :            : #if defined(_DERIVATE)
    4981                 :            : double tmp2_Vgatep_sourcep;
    4982                 :            : double tmp2_Vdrainp_sourcep;
    4983                 :            : double tmp2_Vdrainb_sourcep;
    4984                 :            : double tmp2_Vbulkp_sourcep;
    4985                 :            : double tmp2_Vsourceb_sourcep;
    4986                 :            : #endif
    4987                 :            : #if defined(_DERIVATE)
    4988                 :            : double tmp1_Vgatep_sourcep;
    4989                 :            : double tmp1_Vdrainp_sourcep;
    4990                 :            : double tmp1_Vdrainb_sourcep;
    4991                 :            : double tmp1_Vbulkp_sourcep;
    4992                 :            : double tmp1_Vsourceb_sourcep;
    4993                 :            : #endif
    4994                 :            : double vth;
    4995                 :            : #if defined(_DERIVATE)
    4996                 :            : double vth_Vdrainp_sourcep;
    4997                 :            : double vth_Vdrainb_sourcep;
    4998                 :            : double vth_Vbulkp_sourcep;
    4999                 :            : double vth_Vsourceb_sourcep;
    5000                 :            : #endif
    5001                 :            : double lpe_vb;
    5002                 :            : double dibl_sft;
    5003                 :            : #if defined(_DERIVATE)
    5004                 :            : double dibl_sft_Vdrainp_sourcep;
    5005                 :            : double dibl_sft_Vdrainb_sourcep;
    5006                 :            : double dibl_sft_Vbulkp_sourcep;
    5007                 :            : double dibl_sft_Vsourceb_sourcep;
    5008                 :            : #endif
    5009                 :            : double ddibl_sft_dvd;
    5010                 :            : #if defined(_DERIVATE)
    5011                 :            : double ddibl_sft_dvd_Vdrainp_sourcep;
    5012                 :            : double ddibl_sft_dvd_Vdrainb_sourcep;
    5013                 :            : double ddibl_sft_dvd_Vbulkp_sourcep;
    5014                 :            : double ddibl_sft_dvd_Vsourceb_sourcep;
    5015                 :            : #endif
    5016                 :            : double vth_narroww;
    5017                 :            : #if defined(_DERIVATE)
    5018                 :            : double t5_Vgatep_sourcep;
    5019                 :            : double t5_Vdrainp_sourcep;
    5020                 :            : double t5_Vdrainb_sourcep;
    5021                 :            : double t5_Vbulkp_sourcep;
    5022                 :            : double t5_Vsourceb_sourcep;
    5023                 :            : #endif
    5024                 :            : double delt_vth;
    5025                 :            : #if defined(_DERIVATE)
    5026                 :            : double delt_vth_Vdrainp_sourcep;
    5027                 :            : double delt_vth_Vdrainb_sourcep;
    5028                 :            : double delt_vth_Vbulkp_sourcep;
    5029                 :            : double delt_vth_Vsourceb_sourcep;
    5030                 :            : #endif
    5031                 :            : double thetavth;
    5032                 :            : #if defined(_DERIVATE)
    5033                 :            : double thetavth_Vdrainp_sourcep;
    5034                 :            : double thetavth_Vdrainb_sourcep;
    5035                 :            : double thetavth_Vbulkp_sourcep;
    5036                 :            : double thetavth_Vsourceb_sourcep;
    5037                 :            : #endif
    5038                 :            : double theta0;
    5039                 :            : #if defined(_DERIVATE)
    5040                 :            : double theta0_Vdrainp_sourcep;
    5041                 :            : double theta0_Vdrainb_sourcep;
    5042                 :            : double theta0_Vbulkp_sourcep;
    5043                 :            : double theta0_Vsourceb_sourcep;
    5044                 :            : #endif
    5045                 :            : double ltw;
    5046                 :            : #if defined(_DERIVATE)
    5047                 :            : double ltw_Vdrainp_sourcep;
    5048                 :            : double ltw_Vdrainb_sourcep;
    5049                 :            : double ltw_Vbulkp_sourcep;
    5050                 :            : double ltw_Vsourceb_sourcep;
    5051                 :            : #endif
    5052                 :            : double lt1;
    5053                 :            : #if defined(_DERIVATE)
    5054                 :            : double lt1_Vdrainp_sourcep;
    5055                 :            : double lt1_Vdrainb_sourcep;
    5056                 :            : double lt1_Vbulkp_sourcep;
    5057                 :            : double lt1_Vsourceb_sourcep;
    5058                 :            : #endif
    5059                 :            : #if defined(_DERIVATE)
    5060                 :            : double t4_Vgatep_sourcep;
    5061                 :            : double t4_Vdrainp_sourcep;
    5062                 :            : double t4_Vdrainb_sourcep;
    5063                 :            : double t4_Vbulkp_sourcep;
    5064                 :            : double t4_Vsourceb_sourcep;
    5065                 :            : #endif
    5066                 :            : double v0;
    5067                 :            : double xdep;
    5068                 :            : #if defined(_DERIVATE)
    5069                 :            : double xdep_Vdrainp_sourcep;
    5070                 :            : double xdep_Vdrainb_sourcep;
    5071                 :            : double xdep_Vbulkp_sourcep;
    5072                 :            : double xdep_Vsourceb_sourcep;
    5073                 :            : #endif
    5074                 :            : double sqrtphis;
    5075                 :            : #if defined(_DERIVATE)
    5076                 :            : double sqrtphis_Vdrainp_sourcep;
    5077                 :            : double sqrtphis_Vdrainb_sourcep;
    5078                 :            : double sqrtphis_Vbulkp_sourcep;
    5079                 :            : double sqrtphis_Vsourceb_sourcep;
    5080                 :            : #endif
    5081                 :            : double phis;
    5082                 :            : #if defined(_DERIVATE)
    5083                 :            : double phis_Vdrainp_sourcep;
    5084                 :            : double phis_Vdrainb_sourcep;
    5085                 :            : double phis_Vbulkp_sourcep;
    5086                 :            : double phis_Vsourceb_sourcep;
    5087                 :            : #endif
    5088                 :            : #if defined(_DERIVATE)
    5089                 :            : double t9_Vgatep_sourcep;
    5090                 :            : double t9_Vdrainp_sourcep;
    5091                 :            : double t9_Vdrainb_sourcep;
    5092                 :            : double t9_Vbulkp_sourcep;
    5093                 :            : double t9_Vsourceb_sourcep;
    5094                 :            : #endif
    5095                 :            : double vbseff;
    5096                 :            : #if defined(_DERIVATE)
    5097                 :            : double vbseff_Vdrainp_sourcep;
    5098                 :            : double vbseff_Vdrainb_sourcep;
    5099                 :            : double vbseff_Vbulkp_sourcep;
    5100                 :            : double vbseff_Vsourceb_sourcep;
    5101                 :            : #endif
    5102                 :            : double Vbs;
    5103                 :            : #if defined(_DERIVATE)
    5104                 :            : double Vbs_Vdrainp_sourcep;
    5105                 :            : double Vbs_Vbulkp_sourcep;
    5106                 :            : #endif
    5107                 :            : double Vds;
    5108                 :            : #if defined(_DERIVATE)
    5109                 :            : double Vds_Vdrainp_sourcep;
    5110                 :            : #endif
    5111                 :            : double mode;
    5112                 :            : double evbd;
    5113                 :            : #if defined(_DERIVATE)
    5114                 :            : double evbd_Vsourceb_sourcep;
    5115                 :            : double evbd_Vbulkp_sourcep;
    5116                 :            : double evbd_Vdrainp_sourcep;
    5117                 :            : double evbd_Vdrainb_sourcep;
    5118                 :            : #endif
    5119                 :            : double cbd;
    5120                 :            : #if defined(_DERIVATE)
    5121                 :            : double cbd_Vsourceb_sourcep;
    5122                 :            : double cbd_Vbulkp_sourcep;
    5123                 :            : double cbd_Vdrainp_sourcep;
    5124                 :            : double cbd_Vdrainb_sourcep;
    5125                 :            : #endif
    5126                 :            : #if defined(_DERIVATE)
    5127                 :            : double t3_Vgatep_sourcep;
    5128                 :            : double t3_Vdrainp_sourcep;
    5129                 :            : double t3_Vdrainb_sourcep;
    5130                 :            : double t3_Vbulkp_sourcep;
    5131                 :            : double t3_Vsourceb_sourcep;
    5132                 :            : #endif
    5133                 :            : #if defined(_DERIVATE)
    5134                 :            : double t0_Vgatep_sourcep;
    5135                 :            : double t0_Vdrainp_sourcep;
    5136                 :            : double t0_Vdrainb_sourcep;
    5137                 :            : double t0_Vbulkp_sourcep;
    5138                 :            : double t0_Vsourceb_sourcep;
    5139                 :            : #endif
    5140                 :            : #if defined(_DERIVATE)
    5141                 :            : double t2_Vgatep_sourcep;
    5142                 :            : double t2_Vdrainp_sourcep;
    5143                 :            : double t2_Vdrainb_sourcep;
    5144                 :            : double t2_Vbulkp_sourcep;
    5145                 :            : double t2_Vsourceb_sourcep;
    5146                 :            : #endif
    5147                 :            : #if defined(_DERIVATE)
    5148                 :            : double t1_Vgatep_sourcep;
    5149                 :            : double t1_Vdrainp_sourcep;
    5150                 :            : double t1_Vdrainb_sourcep;
    5151                 :            : double t1_Vbulkp_sourcep;
    5152                 :            : double t1_Vsourceb_sourcep;
    5153                 :            : #endif
    5154                 :            : double evbs;
    5155                 :            : #if defined(_DERIVATE)
    5156                 :            : double evbs_Vbulkp_sourcep;
    5157                 :            : double evbs_Vsourceb_sourcep;
    5158                 :            : #endif
    5159                 :            : double cbs;
    5160                 :            : #if defined(_DERIVATE)
    5161                 :            : double cbs_Vbulkp_sourcep;
    5162                 :            : double cbs_Vsourceb_sourcep;
    5163                 :            : #endif
    5164                 :            : double vbd_jct;
    5165                 :            : #if defined(_DERIVATE)
    5166                 :            : double vbd_jct_Vbulkp_sourcep;
    5167                 :            : double vbd_jct_Vdrainp_sourcep;
    5168                 :            : double vbd_jct_Vdrainb_sourcep;
    5169                 :            : #endif
    5170                 :            : double vbs_jct;
    5171                 :            : #if defined(_DERIVATE)
    5172                 :            : double vbs_jct_Vbulkp_sourcep;
    5173                 :            : double vbs_jct_Vsourceb_sourcep;
    5174                 :            : #endif
    5175                 :            : double vbdb;
    5176                 :            : #if defined(_DERIVATE)
    5177                 :            : double vbdb_Vbulkp_sourcep;
    5178                 :            : double vbdb_Vdrainb_sourcep;
    5179                 :            : #endif
    5180                 :            : double vbsb;
    5181                 :            : #if defined(_DERIVATE)
    5182                 :            : double vbsb_Vbulkp_sourcep;
    5183                 :            : double vbsb_Vsourceb_sourcep;
    5184                 :            : #endif
    5185                 :            : double vbedb;
    5186                 :            : #if defined(_DERIVATE)
    5187                 :            : double vbedb_Vbulk_sourcep;
    5188                 :            : double vbedb_Vdrainb_sourcep;
    5189                 :            : #endif
    5190                 :            : double vbesb;
    5191                 :            : #if defined(_DERIVATE)
    5192                 :            : double vbesb_Vbulk_sourcep;
    5193                 :            : double vbesb_Vsourceb_sourcep;
    5194                 :            : #endif
    5195                 :            : double vdbd;
    5196                 :            : #if defined(_DERIVATE)
    5197                 :            : double vdbd_Vdrainb_sourcep;
    5198                 :            : double vdbd_Vdrainp_sourcep;
    5199                 :            : #endif
    5200                 :            : double vbeb;
    5201                 :            : #if defined(_DERIVATE)
    5202                 :            : double vbeb_Vbulk_sourcep;
    5203                 :            : double vbeb_Vbulkp_sourcep;
    5204                 :            : #endif
    5205                 :            : double vgegm;
    5206                 :            : #if defined(_DERIVATE)
    5207                 :            : double vgegm_Vgate_sourcep;
    5208                 :            : double vgegm_Vgatep_sourcep;
    5209                 :            : double vgegm_Vgatem_sourcep;
    5210                 :            : #endif
    5211                 :            : double vgmb;
    5212                 :            : #if defined(_DERIVATE)
    5213                 :            : double vgmb_Vgatem_sourcep;
    5214                 :            : double vgmb_Vbulkp_sourcep;
    5215                 :            : #endif
    5216                 :            : double vgmg;
    5217                 :            : #if defined(_DERIVATE)
    5218                 :            : double vgmg_Vgatem_sourcep;
    5219                 :            : double vgmg_Vgatep_sourcep;
    5220                 :            : #endif
    5221                 :            : double vgeg;
    5222                 :            : #if defined(_DERIVATE)
    5223                 :            : double vgeg_Vgate_sourcep;
    5224                 :            : double vgeg_Vgatep_sourcep;
    5225                 :            : #endif
    5226                 :            : double vded;
    5227                 :            : #if defined(_DERIVATE)
    5228                 :            : double vded_Vdrain_sourcep;
    5229                 :            : double vded_Vdrainp_sourcep;
    5230                 :            : #endif
    5231                 :            : double vgb;
    5232                 :            : #if defined(_DERIVATE)
    5233                 :            : double vgb_Vgatep_sourcep;
    5234                 :            : double vgb_Vbulkp_sourcep;
    5235                 :            : #endif
    5236                 :            : double vbd;
    5237                 :            : #if defined(_DERIVATE)
    5238                 :            : double vbd_Vbulkp_sourcep;
    5239                 :            : double vbd_Vdrainp_sourcep;
    5240                 :            : #endif
    5241                 :            : double vgd;
    5242                 :            : #if defined(_DERIVATE)
    5243                 :            : double vgd_Vgatep_sourcep;
    5244                 :            : double vgd_Vdrainp_sourcep;
    5245                 :            : #endif
    5246                 :            : double vbes;
    5247                 :            : #if defined(_DERIVATE)
    5248                 :            : double vbes_Vbulk_sourcep;
    5249                 :            : #endif
    5250                 :            : double vdes;
    5251                 :            : #if defined(_DERIVATE)
    5252                 :            : double vdes_Vdrain_sourcep;
    5253                 :            : #endif
    5254                 :            : double vses;
    5255                 :            : #if defined(_DERIVATE)
    5256                 :            : double vses_Vsource_sourcep;
    5257                 :            : #endif
    5258                 :            : double vdbs;
    5259                 :            : #if defined(_DERIVATE)
    5260                 :            : double vdbs_Vdrainb_sourcep;
    5261                 :            : #endif
    5262                 :            : double vsbs;
    5263                 :            : #if defined(_DERIVATE)
    5264                 :            : double vsbs_Vsourceb_sourcep;
    5265                 :            : #endif
    5266                 :            : double vgms;
    5267                 :            : #if defined(_DERIVATE)
    5268                 :            : double vgms_Vgatem_sourcep;
    5269                 :            : #endif
    5270                 :            : double vges;
    5271                 :            : #if defined(_DERIVATE)
    5272                 :            : double vges_Vgate_sourcep;
    5273                 :            : #endif
    5274                 :            : double vbs;
    5275                 :            : #if defined(_DERIVATE)
    5276                 :            : double vbs_Vbulkp_sourcep;
    5277                 :            : #endif
    5278                 :            : double vgs;
    5279                 :            : #if defined(_DERIVATE)
    5280                 :            : double vgs_Vgatep_sourcep;
    5281                 :            : #endif
    5282                 :            : double vds;
    5283                 :            : #if defined(_DERIVATE)
    5284                 :            : double vds_Vdrainp_sourcep;
    5285                 :            : #endif
    5286                 :            : #if defined(_DERIVATE)
    5287                 :       7356 : vds_Vdrainp_sourcep=(type);
    5288                 :            : #endif
    5289         [ +  - ]:       7356 : vds=(type*BP(drainp,sourcep));
    5290                 :            : #if defined(_DERIVATE)
    5291                 :       7356 : vgs_Vgatep_sourcep=(type);
    5292                 :            : #endif
    5293         [ +  - ]:       7356 : vgs=(type*BP(gatep,sourcep));
    5294                 :            : #if defined(_DERIVATE)
    5295                 :       7356 : vbs_Vbulkp_sourcep=(type);
    5296                 :            : #endif
    5297         [ +  - ]:       7356 : vbs=(type*BP(bulkp,sourcep));
    5298                 :            : #if defined(_DERIVATE)
    5299                 :       7356 : vges_Vgate_sourcep=(type);
    5300                 :            : #endif
    5301         [ +  - ]:       7356 : vges=(type*BP(gate,sourcep));
    5302                 :            : #if defined(_DERIVATE)
    5303                 :       7356 : vgms_Vgatem_sourcep=(type);
    5304                 :            : #endif
    5305         [ +  - ]:       7356 : vgms=(type*BP(gatem,sourcep));
    5306                 :            : #if defined(_DERIVATE)
    5307                 :       7356 : vsbs_Vsourceb_sourcep=(type);
    5308                 :            : #endif
    5309         [ +  - ]:       7356 : vsbs=(type*BP(sourceb,sourcep));
    5310                 :            : #if defined(_DERIVATE)
    5311                 :       7356 : vdbs_Vdrainb_sourcep=(type);
    5312                 :            : #endif
    5313         [ +  - ]:       7356 : vdbs=(type*BP(drainb,sourcep));
    5314                 :            : #if defined(_DERIVATE)
    5315                 :       7356 : vses_Vsource_sourcep=(type);
    5316                 :            : #endif
    5317         [ +  - ]:       7356 : vses=(type*BP(source,sourcep));
    5318                 :            : #if defined(_DERIVATE)
    5319                 :       7356 : vdes_Vdrain_sourcep=(type);
    5320                 :            : #endif
    5321         [ +  - ]:       7356 : vdes=(type*BP(drain,sourcep));
    5322                 :            : #if defined(_DERIVATE)
    5323                 :       7356 : vbes_Vbulk_sourcep=(type);
    5324                 :            : #endif
    5325         [ +  - ]:       7356 : vbes=(type*BP(bulk,sourcep));
    5326                 :            : #if defined(_DERIVATE)
    5327                 :       7356 : vgd_Vgatep_sourcep=vgs_Vgatep_sourcep;
    5328                 :       7356 : vgd_Vdrainp_sourcep=(-vds_Vdrainp_sourcep);
    5329                 :            : #endif
    5330                 :       7356 : vgd=(vgs-vds);
    5331                 :            : #if defined(_DERIVATE)
    5332                 :       7356 : vbd_Vbulkp_sourcep=vbs_Vbulkp_sourcep;
    5333                 :       7356 : vbd_Vdrainp_sourcep=(-vds_Vdrainp_sourcep);
    5334                 :            : #endif
    5335                 :       7356 : vbd=(vbs-vds);
    5336                 :            : #if defined(_DERIVATE)
    5337                 :       7356 : vgb_Vgatep_sourcep=vgs_Vgatep_sourcep;
    5338                 :       7356 : vgb_Vbulkp_sourcep=(-vbs_Vbulkp_sourcep);
    5339                 :            : #endif
    5340                 :       7356 : vgb=(vgs-vbs);
    5341                 :            : #if defined(_DERIVATE)
    5342                 :       7356 : vded_Vdrain_sourcep=vdes_Vdrain_sourcep;
    5343                 :       7356 : vded_Vdrainp_sourcep=(-vds_Vdrainp_sourcep);
    5344                 :            : #endif
    5345                 :       7356 : vded=(vdes-vds);
    5346                 :            : #if defined(_DERIVATE)
    5347                 :       7356 : vgeg_Vgate_sourcep=vges_Vgate_sourcep;
    5348                 :       7356 : vgeg_Vgatep_sourcep=(-vgs_Vgatep_sourcep);
    5349                 :            : #endif
    5350                 :       7356 : vgeg=(vges-vgs);
    5351                 :            : #if defined(_DERIVATE)
    5352                 :       7356 : vgmg_Vgatem_sourcep=vgms_Vgatem_sourcep;
    5353                 :       7356 : vgmg_Vgatep_sourcep=(-vgs_Vgatep_sourcep);
    5354                 :            : #endif
    5355                 :       7356 : vgmg=(vgms-vgs);
    5356                 :            : #if defined(_DERIVATE)
    5357                 :       7356 : vgmb_Vgatem_sourcep=vgms_Vgatem_sourcep;
    5358                 :       7356 : vgmb_Vbulkp_sourcep=(-vbs_Vbulkp_sourcep);
    5359                 :            : #endif
    5360                 :       7356 : vgmb=(vgms-vbs);
    5361                 :            : #if defined(_DERIVATE)
    5362                 :       7356 : vgegm_Vgate_sourcep=vgeg_Vgate_sourcep;
    5363                 :       7356 : vgegm_Vgatep_sourcep=(vgeg_Vgatep_sourcep-vgmg_Vgatep_sourcep);
    5364                 :       7356 : vgegm_Vgatem_sourcep=(-vgmg_Vgatem_sourcep);
    5365                 :            : #endif
    5366                 :       7356 : vgegm=(vgeg-vgmg);
    5367                 :            : #if defined(_DERIVATE)
    5368                 :       7356 : vbeb_Vbulk_sourcep=vbes_Vbulk_sourcep;
    5369                 :       7356 : vbeb_Vbulkp_sourcep=(-vbs_Vbulkp_sourcep);
    5370                 :            : #endif
    5371                 :       7356 : vbeb=(vbes-vbs);
    5372                 :            : #if defined(_DERIVATE)
    5373                 :       7356 : vdbd_Vdrainb_sourcep=vdbs_Vdrainb_sourcep;
    5374                 :       7356 : vdbd_Vdrainp_sourcep=(-vds_Vdrainp_sourcep);
    5375                 :            : #endif
    5376                 :       7356 : vdbd=(vdbs-vds);
    5377                 :            : #if defined(_DERIVATE)
    5378                 :       7356 : vbesb_Vbulk_sourcep=vbes_Vbulk_sourcep;
    5379                 :       7356 : vbesb_Vsourceb_sourcep=(-vsbs_Vsourceb_sourcep);
    5380                 :            : #endif
    5381                 :       7356 : vbesb=(vbes-vsbs);
    5382                 :            : #if defined(_DERIVATE)
    5383                 :       7356 : vbedb_Vbulk_sourcep=vbes_Vbulk_sourcep;
    5384                 :       7356 : vbedb_Vdrainb_sourcep=(-vdbs_Vdrainb_sourcep);
    5385                 :            : #endif
    5386                 :       7356 : vbedb=(vbes-vdbs);
    5387                 :            : #if defined(_DERIVATE)
    5388                 :       7356 : vbsb_Vbulkp_sourcep=vbs_Vbulkp_sourcep;
    5389                 :       7356 : vbsb_Vsourceb_sourcep=(-vsbs_Vsourceb_sourcep);
    5390                 :            : #endif
    5391                 :       7356 : vbsb=(vbs-vsbs);
    5392                 :            : #if defined(_DERIVATE)
    5393                 :       7356 : vbdb_Vbulkp_sourcep=vbs_Vbulkp_sourcep;
    5394                 :       7356 : vbdb_Vdrainb_sourcep=(-vdbs_Vdrainb_sourcep);
    5395                 :            : #endif
    5396                 :       7356 : vbdb=(vbs-vdbs);
    5397                 :            : #if defined(_DERIVATE)
    5398         [ +  - ]:       7356 : vbs_jct_Vbulkp_sourcep=((rbodymod==0)?vbs_Vbulkp_sourcep:0.0);
    5399         [ -  + ]:       7356 : vbs_jct_Vsourceb_sourcep=((rbodymod==0)?0.0:vsbs_Vsourceb_sourcep);
    5400                 :            : #endif
    5401         [ +  - ]:       7356 : vbs_jct=((rbodymod==0)?vbs:vsbs);
    5402                 :            : #if defined(_DERIVATE)
    5403         [ +  - ]:       7356 : vbd_jct_Vbulkp_sourcep=((rbodymod==0)?vbd_Vbulkp_sourcep:0.0);
    5404         [ +  - ]:       7356 : vbd_jct_Vdrainp_sourcep=((rbodymod==0)?vbd_Vdrainp_sourcep:vdbd_Vdrainp_sourcep);
    5405         [ -  + ]:       7356 : vbd_jct_Vdrainb_sourcep=((rbodymod==0)?0.0:vdbd_Vdrainb_sourcep);
    5406                 :            : #endif
    5407         [ +  - ]:       7356 : vbd_jct=((rbodymod==0)?vbd:vdbd);
    5408                 :       7356 : nvtms=(vtm*njs);
    5409 [ -  + ][ #  # ]:       7356 : if
    5410                 :            : ((aseff<=0.0)&&(pseff<=0.0))
    5411                 :            : {
    5412                 :          0 : isbs=1.0e-14;
    5413                 :            : }
    5414                 :            : else
    5415                 :            : {
    5416                 :       7356 : isbs=(((aseff*jss_temp)+(pseff*jsws_temp))+((weffcj*nf)*jswgs_temp));
    5417                 :            : }
    5418         [ -  + ]:       7356 : if
    5419                 :            : (isbs<=0.0)
    5420                 :            : {
    5421                 :            : #if defined(_DERIVATE)
    5422                 :          0 : cbs_Vbulkp_sourcep=(gmin*vbs_jct_Vbulkp_sourcep);
    5423                 :          0 : cbs_Vsourceb_sourcep=(gmin*vbs_jct_Vsourceb_sourcep);
    5424                 :            : #endif
    5425                 :          0 : cbs=(gmin*vbs_jct);
    5426                 :            : }
    5427                 :            : else
    5428                 :            : {
    5429         [ -  + ]:       7356 : if
    5430                 :            : ((diomod)==(0))
    5431                 :            : {
    5432                 :            : {
    5433                 :          0 : double m00_exp(d00_exp0,(vbs_jct/nvtms))
    5434                 :            : #if defined(_DERIVATE)
    5435                 :            : #define d10_exp0 d00_exp0
    5436                 :            : #endif
    5437                 :            : #if defined(_DERIVATE)
    5438                 :          0 : evbs_Vbulkp_sourcep=(vbs_jct_Vbulkp_sourcep/nvtms)*d10_exp0;
    5439                 :          0 : evbs_Vsourceb_sourcep=(vbs_jct_Vsourceb_sourcep/nvtms)*d10_exp0;
    5440                 :            : #endif
    5441                 :          0 : evbs=d00_exp0;
    5442                 :            : }
    5443                 :            : {
    5444                 :          0 : double m00_exp(d00_exp0,((-(bvs+vbs_jct))/nvtms))
    5445                 :            : #if defined(_DERIVATE)
    5446                 :            : #define d10_exp0 d00_exp0
    5447                 :            : #endif
    5448                 :            : #if defined(_DERIVATE)
    5449                 :          0 : t1_Vgatep_sourcep=0.0;
    5450                 :          0 : t1_Vdrainp_sourcep=0.0;
    5451                 :          0 : t1_Vdrainb_sourcep=0.0;
    5452                 :          0 : t1_Vbulkp_sourcep=(xjbvs*((-vbs_jct_Vbulkp_sourcep)/nvtms)*d10_exp0);
    5453                 :          0 : t1_Vsourceb_sourcep=(xjbvs*((-vbs_jct_Vsourceb_sourcep)/nvtms)*d10_exp0);
    5454                 :            : #endif
    5455                 :          0 : t1=(xjbvs*d00_exp0);
    5456                 :            : }
    5457                 :            : #if defined(_DERIVATE)
    5458                 :          0 : cbs_Vbulkp_sourcep=((isbs*(evbs_Vbulkp_sourcep-t1_Vbulkp_sourcep))+(gmin*vbs_jct_Vbulkp_sourcep));
    5459                 :          0 : cbs_Vsourceb_sourcep=((isbs*(evbs_Vsourceb_sourcep-t1_Vsourceb_sourcep))+(gmin*vbs_jct_Vsourceb_sourcep));
    5460                 :            : #endif
    5461                 :          0 : cbs=((isbs*(((evbs+xexpbvs)-t1)-1.0))+(gmin*vbs_jct));
    5462                 :            : }
    5463                 :            : else
    5464         [ +  - ]:       7356 : if
    5465                 :            : ((diomod)==(1))
    5466                 :            : {
    5467                 :            : #if defined(_DERIVATE)
    5468                 :       7356 : t2_Vgatep_sourcep=0.0;
    5469                 :       7356 : t2_Vdrainp_sourcep=0.0;
    5470                 :       7356 : t2_Vdrainb_sourcep=0.0;
    5471                 :       7356 : t2_Vbulkp_sourcep=(vbs_jct_Vbulkp_sourcep/nvtms);
    5472                 :       7356 : t2_Vsourceb_sourcep=(vbs_jct_Vsourceb_sourcep/nvtms);
    5473                 :            : #endif
    5474                 :       7356 : t2=(vbs_jct/nvtms);
    5475         [ -  + ]:       7356 : if
    5476                 :            : (t2<(-34.0))
    5477                 :            : {
    5478                 :            : #if defined(_DERIVATE)
    5479                 :          0 : cbs_Vbulkp_sourcep=(gmin*vbs_jct_Vbulkp_sourcep);
    5480                 :          0 : cbs_Vsourceb_sourcep=(gmin*vbs_jct_Vsourceb_sourcep);
    5481                 :            : #endif
    5482                 :          0 : cbs=((isbs*(1.713908431e-15-1.0))+(gmin*vbs_jct));
    5483                 :            : }
    5484                 :            : else
    5485                 :            : {
    5486         [ +  - ]:       7356 : if
    5487                 :            : (vbs_jct<=vjsmfwd)
    5488                 :            : {
    5489                 :            : {
    5490                 :       7356 : double m00_exp(d00_exp0,t2)
    5491                 :            : #if defined(_DERIVATE)
    5492                 :            : #define d10_exp0 d00_exp0
    5493                 :            : #endif
    5494                 :            : #if defined(_DERIVATE)
    5495                 :       7356 : evbs_Vbulkp_sourcep=t2_Vbulkp_sourcep*d10_exp0;
    5496                 :       7356 : evbs_Vsourceb_sourcep=t2_Vsourceb_sourcep*d10_exp0;
    5497                 :            : #endif
    5498                 :       7356 : evbs=d00_exp0;
    5499                 :            : }
    5500                 :            : #if defined(_DERIVATE)
    5501                 :       7356 : cbs_Vbulkp_sourcep=((isbs*evbs_Vbulkp_sourcep)+(gmin*vbs_jct_Vbulkp_sourcep));
    5502                 :       7356 : cbs_Vsourceb_sourcep=((isbs*evbs_Vsourceb_sourcep)+(gmin*vbs_jct_Vsourceb_sourcep));
    5503                 :            : #endif
    5504                 :       7356 : cbs=((isbs*(evbs-1.0))+(gmin*vbs_jct));
    5505                 :            : }
    5506                 :            : else
    5507                 :            : {
    5508                 :            : #if defined(_DERIVATE)
    5509                 :          0 : t0_Vgatep_sourcep=0.0;
    5510                 :          0 : t0_Vdrainp_sourcep=0.0;
    5511                 :          0 : t0_Vdrainb_sourcep=0.0;
    5512                 :          0 : t0_Vbulkp_sourcep=0.0;
    5513                 :          0 : t0_Vsourceb_sourcep=0.0;
    5514                 :            : #endif
    5515                 :          0 : t0=(ivjsmfwd/nvtms);
    5516                 :            : #if defined(_DERIVATE)
    5517                 :          0 : cbs_Vbulkp_sourcep=(((t0_Vbulkp_sourcep*(vbs_jct-vjsmfwd))+(t0*vbs_jct_Vbulkp_sourcep))+(gmin*vbs_jct_Vbulkp_sourcep));
    5518                 :          0 : cbs_Vsourceb_sourcep=(((t0_Vsourceb_sourcep*(vbs_jct-vjsmfwd))+(t0*vbs_jct_Vsourceb_sourcep))+(gmin*vbs_jct_Vsourceb_sourcep));
    5519                 :            : #endif
    5520                 :          0 : cbs=(((ivjsmfwd-isbs)+(t0*(vbs_jct-vjsmfwd)))+(gmin*vbs_jct));
    5521                 :            : }
    5522                 :            : }
    5523                 :            : }
    5524                 :            : else
    5525         [ #  # ]:          0 : if
    5526                 :            : ((diomod)==(2))
    5527                 :            : {
    5528         [ #  # ]:          0 : if
    5529                 :            : (vbs_jct<vjsmrev)
    5530                 :            : {
    5531                 :            : #if defined(_DERIVATE)
    5532                 :          0 : t0_Vgatep_sourcep=0.0;
    5533                 :          0 : t0_Vdrainp_sourcep=0.0;
    5534                 :          0 : t0_Vdrainb_sourcep=0.0;
    5535                 :          0 : t0_Vbulkp_sourcep=(vbs_jct_Vbulkp_sourcep/nvtms);
    5536                 :          0 : t0_Vsourceb_sourcep=(vbs_jct_Vsourceb_sourcep/nvtms);
    5537                 :            : #endif
    5538                 :          0 : t0=(vbs_jct/nvtms);
    5539         [ #  # ]:          0 : if
    5540                 :            : (t0<(-34.0))
    5541                 :            : {
    5542                 :            : #if defined(_DERIVATE)
    5543                 :          0 : evbs_Vbulkp_sourcep=0.0;
    5544                 :          0 : evbs_Vsourceb_sourcep=0.0;
    5545                 :            : #endif
    5546                 :          0 : evbs=1.713908431e-15;
    5547                 :            : }
    5548                 :            : else
    5549                 :            : {
    5550                 :            : {
    5551                 :          0 : double m00_exp(d00_exp0,t0)
    5552                 :            : #if defined(_DERIVATE)
    5553                 :            : #define d10_exp0 d00_exp0
    5554                 :            : #endif
    5555                 :            : #if defined(_DERIVATE)
    5556                 :          0 : evbs_Vbulkp_sourcep=t0_Vbulkp_sourcep*d10_exp0;
    5557                 :          0 : evbs_Vsourceb_sourcep=t0_Vsourceb_sourcep*d10_exp0;
    5558                 :            : #endif
    5559                 :          0 : evbs=d00_exp0;
    5560                 :            : }
    5561                 :            : }
    5562                 :            : #if defined(_DERIVATE)
    5563                 :          0 : t1_Vgatep_sourcep=0.0;
    5564                 :          0 : t1_Vdrainp_sourcep=0.0;
    5565                 :          0 : t1_Vdrainb_sourcep=0.0;
    5566                 :          0 : t1_Vbulkp_sourcep=evbs_Vbulkp_sourcep;
    5567                 :          0 : t1_Vsourceb_sourcep=evbs_Vsourceb_sourcep;
    5568                 :            : #endif
    5569                 :          0 : t1=(evbs-1.0);
    5570                 :            : #if defined(_DERIVATE)
    5571                 :          0 : t2_Vgatep_sourcep=0.0;
    5572                 :          0 : t2_Vdrainp_sourcep=0.0;
    5573                 :          0 : t2_Vdrainb_sourcep=0.0;
    5574                 :          0 : t2_Vbulkp_sourcep=(sslprev*vbs_jct_Vbulkp_sourcep);
    5575                 :          0 : t2_Vsourceb_sourcep=(sslprev*vbs_jct_Vsourceb_sourcep);
    5576                 :            : #endif
    5577                 :          0 : t2=(ivjsmrev+(sslprev*(vbs_jct-vjsmrev)));
    5578                 :            : #if defined(_DERIVATE)
    5579                 :          0 : cbs_Vbulkp_sourcep=(((t1_Vbulkp_sourcep*t2)+(t1*t2_Vbulkp_sourcep))+(gmin*vbs_jct_Vbulkp_sourcep));
    5580                 :          0 : cbs_Vsourceb_sourcep=(((t1_Vsourceb_sourcep*t2)+(t1*t2_Vsourceb_sourcep))+(gmin*vbs_jct_Vsourceb_sourcep));
    5581                 :            : #endif
    5582                 :          0 : cbs=((t1*t2)+(gmin*vbs_jct));
    5583                 :            : }
    5584                 :            : else
    5585                 :            : {
    5586         [ #  # ]:          0 : if
    5587                 :            : (vbs_jct<=vjsmfwd)
    5588                 :            : {
    5589                 :            : #if defined(_DERIVATE)
    5590                 :          0 : t0_Vgatep_sourcep=0.0;
    5591                 :          0 : t0_Vdrainp_sourcep=0.0;
    5592                 :          0 : t0_Vdrainb_sourcep=0.0;
    5593                 :          0 : t0_Vbulkp_sourcep=(vbs_jct_Vbulkp_sourcep/nvtms);
    5594                 :          0 : t0_Vsourceb_sourcep=(vbs_jct_Vsourceb_sourcep/nvtms);
    5595                 :            : #endif
    5596                 :          0 : t0=(vbs_jct/nvtms);
    5597         [ #  # ]:          0 : if
    5598                 :            : (t0<(-34.0))
    5599                 :            : {
    5600                 :            : #if defined(_DERIVATE)
    5601                 :          0 : evbs_Vbulkp_sourcep=0.0;
    5602                 :          0 : evbs_Vsourceb_sourcep=0.0;
    5603                 :            : #endif
    5604                 :          0 : evbs=1.713908431e-15;
    5605                 :            : }
    5606                 :            : else
    5607                 :            : {
    5608                 :            : {
    5609                 :          0 : double m00_exp(d00_exp0,t0)
    5610                 :            : #if defined(_DERIVATE)
    5611                 :            : #define d10_exp0 d00_exp0
    5612                 :            : #endif
    5613                 :            : #if defined(_DERIVATE)
    5614                 :          0 : evbs_Vbulkp_sourcep=t0_Vbulkp_sourcep*d10_exp0;
    5615                 :          0 : evbs_Vsourceb_sourcep=t0_Vsourceb_sourcep*d10_exp0;
    5616                 :            : #endif
    5617                 :          0 : evbs=d00_exp0;
    5618                 :            : }
    5619                 :            : }
    5620                 :            : #if defined(_DERIVATE)
    5621                 :          0 : t3_Vgatep_sourcep=0.0;
    5622                 :          0 : t3_Vdrainp_sourcep=0.0;
    5623                 :          0 : t3_Vdrainb_sourcep=0.0;
    5624                 :          0 : t3_Vbulkp_sourcep=(vbs_jct_Vbulkp_sourcep/nvtms);
    5625                 :          0 : t3_Vsourceb_sourcep=(vbs_jct_Vsourceb_sourcep/nvtms);
    5626                 :            : #endif
    5627                 :          0 : t3=((bvs+vbs_jct)/nvtms);
    5628         [ #  # ]:          0 : if
    5629                 :            : (t1>34.0)
    5630                 :            : {
    5631                 :            : #if defined(_DERIVATE)
    5632                 :          0 : t2_Vgatep_sourcep=0.0;
    5633                 :          0 : t2_Vdrainp_sourcep=0.0;
    5634                 :          0 : t2_Vdrainb_sourcep=0.0;
    5635                 :          0 : t2_Vbulkp_sourcep=0.0;
    5636                 :          0 : t2_Vsourceb_sourcep=0.0;
    5637                 :            : #endif
    5638                 :          0 : t2=1.713908431e-15;
    5639                 :            : }
    5640                 :            : else
    5641                 :            : {
    5642                 :            : {
    5643                 :          0 : double m00_exp(d00_exp0,(-t1))
    5644                 :            : #if defined(_DERIVATE)
    5645                 :            : #define d10_exp0 d00_exp0
    5646                 :            : #endif
    5647                 :            : #if defined(_DERIVATE)
    5648                 :          0 : t2_Vgatep_sourcep=0.0;
    5649                 :          0 : t2_Vdrainp_sourcep=0.0;
    5650                 :          0 : t2_Vdrainb_sourcep=0.0;
    5651                 :          0 : t2_Vbulkp_sourcep=(-t1_Vbulkp_sourcep)*d10_exp0;
    5652                 :          0 : t2_Vsourceb_sourcep=(-t1_Vsourceb_sourcep)*d10_exp0;
    5653                 :            : #endif
    5654                 :          0 : t2=d00_exp0;
    5655                 :            : }
    5656                 :            : }
    5657                 :            : #if defined(_DERIVATE)
    5658                 :          0 : cbs_Vbulkp_sourcep=((isbs*(evbs_Vbulkp_sourcep-(xjbvs*t2_Vbulkp_sourcep)))+(gmin*vbs_jct_Vbulkp_sourcep));
    5659                 :          0 : cbs_Vsourceb_sourcep=((isbs*(evbs_Vsourceb_sourcep-(xjbvs*t2_Vsourceb_sourcep)))+(gmin*vbs_jct_Vsourceb_sourcep));
    5660                 :            : #endif
    5661                 :          0 : cbs=((isbs*(((evbs+xexpbvs)-1.0)-(xjbvs*t2)))+(gmin*vbs_jct));
    5662                 :            : }
    5663                 :            : else
    5664                 :            : {
    5665                 :            : #if defined(_DERIVATE)
    5666                 :          0 : cbs_Vbulkp_sourcep=((sslpfwd*vbs_jct_Vbulkp_sourcep)+(gmin*vbs_jct_Vbulkp_sourcep));
    5667                 :          0 : cbs_Vsourceb_sourcep=((sslpfwd*vbs_jct_Vsourceb_sourcep)+(gmin*vbs_jct_Vsourceb_sourcep));
    5668                 :            : #endif
    5669                 :          0 : cbs=((ivjsmfwd+(sslpfwd*(vbs_jct-vjsmfwd)))+(gmin*vbs_jct));
    5670                 :            : }
    5671                 :            : }
    5672                 :            : }
    5673                 :            : else
    5674                 :            : { /* no default */ }
    5675                 :            : }
    5676                 :       7356 : nvtmd=(vtm*njd);
    5677 [ -  + ][ #  # ]:       7356 : if
    5678                 :            : ((adeff<=0.0)&&(pdeff<=0.0))
    5679                 :            : {
    5680                 :          0 : isbd=1.0e-14;
    5681                 :            : }
    5682                 :            : else
    5683                 :            : {
    5684                 :       7356 : isbd=(((adeff*jsd_temp)+(pdeff*jswd_temp))+((weffcj*nf)*jswgd_temp));
    5685                 :            : }
    5686         [ -  + ]:       7356 : if
    5687                 :            : (isbd<=0.0)
    5688                 :            : {
    5689                 :            : #if defined(_DERIVATE)
    5690                 :          0 : cbd_Vsourceb_sourcep=0.0;
    5691                 :          0 : cbd_Vbulkp_sourcep=(gmin*vbd_jct_Vbulkp_sourcep);
    5692                 :          0 : cbd_Vdrainp_sourcep=(gmin*vbd_jct_Vdrainp_sourcep);
    5693                 :          0 : cbd_Vdrainb_sourcep=(gmin*vbd_jct_Vdrainb_sourcep);
    5694                 :            : #endif
    5695                 :          0 : cbd=(gmin*vbd_jct);
    5696                 :            : }
    5697                 :            : else
    5698                 :            : {
    5699         [ -  + ]:       7356 : if
    5700                 :            : ((diomod)==(0))
    5701                 :            : {
    5702                 :            : {
    5703                 :          0 : double m00_exp(d00_exp0,(vbd_jct/nvtmd))
    5704                 :            : #if defined(_DERIVATE)
    5705                 :            : #define d10_exp0 d00_exp0
    5706                 :            : #endif
    5707                 :            : #if defined(_DERIVATE)
    5708                 :          0 : evbd_Vsourceb_sourcep=0.0;
    5709                 :          0 : evbd_Vbulkp_sourcep=(vbd_jct_Vbulkp_sourcep/nvtmd)*d10_exp0;
    5710                 :          0 : evbd_Vdrainp_sourcep=(vbd_jct_Vdrainp_sourcep/nvtmd)*d10_exp0;
    5711                 :          0 : evbd_Vdrainb_sourcep=(vbd_jct_Vdrainb_sourcep/nvtmd)*d10_exp0;
    5712                 :            : #endif
    5713                 :          0 : evbd=d00_exp0;
    5714                 :            : }
    5715                 :            : {
    5716                 :          0 : double m00_exp(d00_exp0,((-(bvd+vbd_jct))/nvtmd))
    5717                 :            : #if defined(_DERIVATE)
    5718                 :            : #define d10_exp0 d00_exp0
    5719                 :            : #endif
    5720                 :            : #if defined(_DERIVATE)
    5721                 :          0 : t1_Vgatep_sourcep=0.0;
    5722                 :          0 : t1_Vdrainp_sourcep=(xjbvd*((-vbd_jct_Vdrainp_sourcep)/nvtmd)*d10_exp0);
    5723                 :          0 : t1_Vdrainb_sourcep=(xjbvd*((-vbd_jct_Vdrainb_sourcep)/nvtmd)*d10_exp0);
    5724                 :          0 : t1_Vbulkp_sourcep=(xjbvd*((-vbd_jct_Vbulkp_sourcep)/nvtmd)*d10_exp0);
    5725                 :          0 : t1_Vsourceb_sourcep=0.0;
    5726                 :            : #endif
    5727                 :          0 : t1=(xjbvd*d00_exp0);
    5728                 :            : }
    5729                 :            : #if defined(_DERIVATE)
    5730                 :          0 : cbd_Vsourceb_sourcep=(isbd*(evbd_Vsourceb_sourcep-t1_Vsourceb_sourcep));
    5731                 :          0 : cbd_Vbulkp_sourcep=((isbd*(evbd_Vbulkp_sourcep-t1_Vbulkp_sourcep))+(gmin*vbd_jct_Vbulkp_sourcep));
    5732                 :          0 : cbd_Vdrainp_sourcep=((isbd*(evbd_Vdrainp_sourcep-t1_Vdrainp_sourcep))+(gmin*vbd_jct_Vdrainp_sourcep));
    5733                 :          0 : cbd_Vdrainb_sourcep=((isbd*(evbd_Vdrainb_sourcep-t1_Vdrainb_sourcep))+(gmin*vbd_jct_Vdrainb_sourcep));
    5734                 :            : #endif
    5735                 :          0 : cbd=((isbd*(((evbd+xexpbvd)-t1)-1.0))+(gmin*vbd_jct));
    5736                 :            : }
    5737                 :            : else
    5738         [ +  - ]:       7356 : if
    5739                 :            : ((diomod)==(1))
    5740                 :            : {
    5741                 :            : #if defined(_DERIVATE)
    5742                 :       7356 : t2_Vgatep_sourcep=0.0;
    5743                 :       7356 : t2_Vdrainp_sourcep=(vbd_jct_Vdrainp_sourcep/nvtmd);
    5744                 :       7356 : t2_Vdrainb_sourcep=(vbd_jct_Vdrainb_sourcep/nvtmd);
    5745                 :       7356 : t2_Vbulkp_sourcep=(vbd_jct_Vbulkp_sourcep/nvtmd);
    5746                 :       7356 : t2_Vsourceb_sourcep=0.0;
    5747                 :            : #endif
    5748                 :       7356 : t2=(vbd_jct/nvtmd);
    5749         [ +  + ]:       7356 : if
    5750                 :            : (t2<(-34.0))
    5751                 :            : {
    5752                 :            : #if defined(_DERIVATE)
    5753                 :       3788 : cbd_Vsourceb_sourcep=0.0;
    5754                 :       3788 : cbd_Vbulkp_sourcep=(gmin*vbd_jct_Vbulkp_sourcep);
    5755                 :       3788 : cbd_Vdrainp_sourcep=(gmin*vbd_jct_Vdrainp_sourcep);
    5756                 :       3788 : cbd_Vdrainb_sourcep=(gmin*vbd_jct_Vdrainb_sourcep);
    5757                 :            : #endif
    5758                 :       3788 : cbd=((isbd*(1.713908431e-15-1.0))+(gmin*vbd_jct));
    5759                 :            : }
    5760                 :            : else
    5761                 :            : {
    5762         [ +  - ]:       3568 : if
    5763                 :            : (vbd_jct<=vjdmfwd)
    5764                 :            : {
    5765                 :            : {
    5766                 :       3568 : double m00_exp(d00_exp0,t2)
    5767                 :            : #if defined(_DERIVATE)
    5768                 :            : #define d10_exp0 d00_exp0
    5769                 :            : #endif
    5770                 :            : #if defined(_DERIVATE)
    5771                 :       3568 : evbd_Vsourceb_sourcep=t2_Vsourceb_sourcep*d10_exp0;
    5772                 :       3568 : evbd_Vbulkp_sourcep=t2_Vbulkp_sourcep*d10_exp0;
    5773                 :       3568 : evbd_Vdrainp_sourcep=t2_Vdrainp_sourcep*d10_exp0;
    5774                 :       3568 : evbd_Vdrainb_sourcep=t2_Vdrainb_sourcep*d10_exp0;
    5775                 :            : #endif
    5776                 :       3568 : evbd=d00_exp0;
    5777                 :            : }
    5778                 :            : #if defined(_DERIVATE)
    5779                 :       3568 : cbd_Vsourceb_sourcep=(isbd*evbd_Vsourceb_sourcep);
    5780                 :       3568 : cbd_Vbulkp_sourcep=((isbd*evbd_Vbulkp_sourcep)+(gmin*vbd_jct_Vbulkp_sourcep));
    5781                 :       3568 : cbd_Vdrainp_sourcep=((isbd*evbd_Vdrainp_sourcep)+(gmin*vbd_jct_Vdrainp_sourcep));
    5782                 :       3568 : cbd_Vdrainb_sourcep=((isbd*evbd_Vdrainb_sourcep)+(gmin*vbd_jct_Vdrainb_sourcep));
    5783                 :            : #endif
    5784                 :       3568 : cbd=((isbd*(evbd-1.0))+(gmin*vbd_jct));
    5785                 :            : }
    5786                 :            : else
    5787                 :            : {
    5788                 :            : #if defined(_DERIVATE)
    5789                 :          0 : t0_Vgatep_sourcep=0.0;
    5790                 :          0 : t0_Vdrainp_sourcep=0.0;
    5791                 :          0 : t0_Vdrainb_sourcep=0.0;
    5792                 :          0 : t0_Vbulkp_sourcep=0.0;
    5793                 :          0 : t0_Vsourceb_sourcep=0.0;
    5794                 :            : #endif
    5795                 :          0 : t0=(ivjdmfwd/nvtmd);
    5796                 :            : #if defined(_DERIVATE)
    5797                 :          0 : cbd_Vsourceb_sourcep=t0_Vsourceb_sourcep*(vbd_jct-vjdmfwd);
    5798                 :          0 : cbd_Vbulkp_sourcep=(((t0_Vbulkp_sourcep*(vbd_jct-vjdmfwd))+(t0*vbd_jct_Vbulkp_sourcep))+(gmin*vbd_jct_Vbulkp_sourcep));
    5799                 :          0 : cbd_Vdrainp_sourcep=(((t0_Vdrainp_sourcep*(vbd_jct-vjdmfwd))+(t0*vbd_jct_Vdrainp_sourcep))+(gmin*vbd_jct_Vdrainp_sourcep));
    5800                 :          0 : cbd_Vdrainb_sourcep=(((t0_Vdrainb_sourcep*(vbd_jct-vjdmfwd))+(t0*vbd_jct_Vdrainb_sourcep))+(gmin*vbd_jct_Vdrainb_sourcep));
    5801                 :            : #endif
    5802                 :          0 : cbd=(((ivjdmfwd-isbd)+(t0*(vbd_jct-vjdmfwd)))+(gmin*vbd_jct));
    5803                 :            : }
    5804                 :            : }
    5805                 :            : }
    5806                 :            : else
    5807         [ #  # ]:          0 : if
    5808                 :            : ((diomod)==(2))
    5809                 :            : {
    5810         [ #  # ]:          0 : if
    5811                 :            : (vbd_jct<vjdmrev)
    5812                 :            : {
    5813                 :            : #if defined(_DERIVATE)
    5814                 :          0 : t0_Vgatep_sourcep=0.0;
    5815                 :          0 : t0_Vdrainp_sourcep=(vbd_jct_Vdrainp_sourcep/nvtmd);
    5816                 :          0 : t0_Vdrainb_sourcep=(vbd_jct_Vdrainb_sourcep/nvtmd);
    5817                 :          0 : t0_Vbulkp_sourcep=(vbd_jct_Vbulkp_sourcep/nvtmd);
    5818                 :          0 : t0_Vsourceb_sourcep=0.0;
    5819                 :            : #endif
    5820                 :          0 : t0=(vbd_jct/nvtmd);
    5821         [ #  # ]:          0 : if
    5822                 :            : (t0<(-34.0))
    5823                 :            : {
    5824                 :            : #if defined(_DERIVATE)
    5825                 :          0 : evbd_Vsourceb_sourcep=0.0;
    5826                 :          0 : evbd_Vbulkp_sourcep=0.0;
    5827                 :          0 : evbd_Vdrainp_sourcep=0.0;
    5828                 :          0 : evbd_Vdrainb_sourcep=0.0;
    5829                 :            : #endif
    5830                 :          0 : evbd=1.713908431e-15;
    5831                 :            : }
    5832                 :            : else
    5833                 :            : {
    5834                 :            : {
    5835                 :          0 : double m00_exp(d00_exp0,t0)
    5836                 :            : #if defined(_DERIVATE)
    5837                 :            : #define d10_exp0 d00_exp0
    5838                 :            : #endif
    5839                 :            : #if defined(_DERIVATE)
    5840                 :          0 : evbd_Vsourceb_sourcep=t0_Vsourceb_sourcep*d10_exp0;
    5841                 :          0 : evbd_Vbulkp_sourcep=t0_Vbulkp_sourcep*d10_exp0;
    5842                 :          0 : evbd_Vdrainp_sourcep=t0_Vdrainp_sourcep*d10_exp0;
    5843                 :          0 : evbd_Vdrainb_sourcep=t0_Vdrainb_sourcep*d10_exp0;
    5844                 :            : #endif
    5845                 :          0 : evbd=d00_exp0;
    5846                 :            : }
    5847                 :            : }
    5848                 :            : #if defined(_DERIVATE)
    5849                 :          0 : t1_Vgatep_sourcep=0.0;
    5850                 :          0 : t1_Vdrainp_sourcep=evbd_Vdrainp_sourcep;
    5851                 :          0 : t1_Vdrainb_sourcep=evbd_Vdrainb_sourcep;
    5852                 :          0 : t1_Vbulkp_sourcep=evbd_Vbulkp_sourcep;
    5853                 :          0 : t1_Vsourceb_sourcep=evbd_Vsourceb_sourcep;
    5854                 :            : #endif
    5855                 :          0 : t1=(evbd-1.0);
    5856                 :            : #if defined(_DERIVATE)
    5857                 :          0 : t2_Vgatep_sourcep=0.0;
    5858                 :          0 : t2_Vdrainp_sourcep=(dslprev*vbd_jct_Vdrainp_sourcep);
    5859                 :          0 : t2_Vdrainb_sourcep=(dslprev*vbd_jct_Vdrainb_sourcep);
    5860                 :          0 : t2_Vbulkp_sourcep=(dslprev*vbd_jct_Vbulkp_sourcep);
    5861                 :          0 : t2_Vsourceb_sourcep=0.0;
    5862                 :            : #endif
    5863                 :          0 : t2=(ivjdmrev+(dslprev*(vbd_jct-vjdmrev)));
    5864                 :            : #if defined(_DERIVATE)
    5865                 :          0 : cbd_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t2)+(t1*t2_Vsourceb_sourcep));
    5866                 :          0 : cbd_Vbulkp_sourcep=(((t1_Vbulkp_sourcep*t2)+(t1*t2_Vbulkp_sourcep))+(gmin*vbd_jct_Vbulkp_sourcep));
    5867                 :          0 : cbd_Vdrainp_sourcep=(((t1_Vdrainp_sourcep*t2)+(t1*t2_Vdrainp_sourcep))+(gmin*vbd_jct_Vdrainp_sourcep));
    5868                 :          0 : cbd_Vdrainb_sourcep=(((t1_Vdrainb_sourcep*t2)+(t1*t2_Vdrainb_sourcep))+(gmin*vbd_jct_Vdrainb_sourcep));
    5869                 :            : #endif
    5870                 :          0 : cbd=((t1*t2)+(gmin*vbd_jct));
    5871                 :            : }
    5872                 :            : else
    5873                 :            : {
    5874         [ #  # ]:          0 : if
    5875                 :            : (vbd_jct<=vjdmfwd)
    5876                 :            : {
    5877                 :            : #if defined(_DERIVATE)
    5878                 :          0 : t0_Vgatep_sourcep=0.0;
    5879                 :          0 : t0_Vdrainp_sourcep=(vbd_jct_Vdrainp_sourcep/nvtmd);
    5880                 :          0 : t0_Vdrainb_sourcep=(vbd_jct_Vdrainb_sourcep/nvtmd);
    5881                 :          0 : t0_Vbulkp_sourcep=(vbd_jct_Vbulkp_sourcep/nvtmd);
    5882                 :          0 : t0_Vsourceb_sourcep=0.0;
    5883                 :            : #endif
    5884                 :          0 : t0=(vbd_jct/nvtmd);
    5885         [ #  # ]:          0 : if
    5886                 :            : (t0<(-34.0))
    5887                 :            : {
    5888                 :            : #if defined(_DERIVATE)
    5889                 :          0 : evbd_Vsourceb_sourcep=0.0;
    5890                 :          0 : evbd_Vbulkp_sourcep=0.0;
    5891                 :          0 : evbd_Vdrainp_sourcep=0.0;
    5892                 :          0 : evbd_Vdrainb_sourcep=0.0;
    5893                 :            : #endif
    5894                 :          0 : evbd=1.713908431e-15;
    5895                 :            : }
    5896                 :            : else
    5897                 :            : {
    5898                 :            : {
    5899                 :          0 : double m00_exp(d00_exp0,t0)
    5900                 :            : #if defined(_DERIVATE)
    5901                 :            : #define d10_exp0 d00_exp0
    5902                 :            : #endif
    5903                 :            : #if defined(_DERIVATE)
    5904                 :          0 : evbd_Vsourceb_sourcep=t0_Vsourceb_sourcep*d10_exp0;
    5905                 :          0 : evbd_Vbulkp_sourcep=t0_Vbulkp_sourcep*d10_exp0;
    5906                 :          0 : evbd_Vdrainp_sourcep=t0_Vdrainp_sourcep*d10_exp0;
    5907                 :          0 : evbd_Vdrainb_sourcep=t0_Vdrainb_sourcep*d10_exp0;
    5908                 :            : #endif
    5909                 :          0 : evbd=d00_exp0;
    5910                 :            : }
    5911                 :            : }
    5912                 :            : #if defined(_DERIVATE)
    5913                 :          0 : t1_Vgatep_sourcep=0.0;
    5914                 :          0 : t1_Vdrainp_sourcep=(vbd_jct_Vdrainp_sourcep/nvtmd);
    5915                 :          0 : t1_Vdrainb_sourcep=(vbd_jct_Vdrainb_sourcep/nvtmd);
    5916                 :          0 : t1_Vbulkp_sourcep=(vbd_jct_Vbulkp_sourcep/nvtmd);
    5917                 :          0 : t1_Vsourceb_sourcep=0.0;
    5918                 :            : #endif
    5919                 :          0 : t1=((bvd+vbd_jct)/nvtmd);
    5920         [ #  # ]:          0 : if
    5921                 :            : (t1>34.0)
    5922                 :            : {
    5923                 :            : #if defined(_DERIVATE)
    5924                 :          0 : t2_Vgatep_sourcep=0.0;
    5925                 :          0 : t2_Vdrainp_sourcep=0.0;
    5926                 :          0 : t2_Vdrainb_sourcep=0.0;
    5927                 :          0 : t2_Vbulkp_sourcep=0.0;
    5928                 :          0 : t2_Vsourceb_sourcep=0.0;
    5929                 :            : #endif
    5930                 :          0 : t2=1.713908431e-15;
    5931                 :            : }
    5932                 :            : else
    5933                 :            : {
    5934                 :            : {
    5935                 :          0 : double m00_exp(d00_exp0,(-t1))
    5936                 :            : #if defined(_DERIVATE)
    5937                 :            : #define d10_exp0 d00_exp0
    5938                 :            : #endif
    5939                 :            : #if defined(_DERIVATE)
    5940                 :          0 : t2_Vgatep_sourcep=0.0;
    5941                 :          0 : t2_Vdrainp_sourcep=(-t1_Vdrainp_sourcep)*d10_exp0;
    5942                 :          0 : t2_Vdrainb_sourcep=(-t1_Vdrainb_sourcep)*d10_exp0;
    5943                 :          0 : t2_Vbulkp_sourcep=(-t1_Vbulkp_sourcep)*d10_exp0;
    5944                 :          0 : t2_Vsourceb_sourcep=(-t1_Vsourceb_sourcep)*d10_exp0;
    5945                 :            : #endif
    5946                 :          0 : t2=d00_exp0;
    5947                 :            : }
    5948                 :            : }
    5949                 :            : #if defined(_DERIVATE)
    5950                 :          0 : cbd_Vsourceb_sourcep=(isbd*(evbd_Vsourceb_sourcep-(xjbvd*t2_Vsourceb_sourcep)));
    5951                 :          0 : cbd_Vbulkp_sourcep=((isbd*(evbd_Vbulkp_sourcep-(xjbvd*t2_Vbulkp_sourcep)))+(gmin*vbd_jct_Vbulkp_sourcep));
    5952                 :          0 : cbd_Vdrainp_sourcep=((isbd*(evbd_Vdrainp_sourcep-(xjbvd*t2_Vdrainp_sourcep)))+(gmin*vbd_jct_Vdrainp_sourcep));
    5953                 :          0 : cbd_Vdrainb_sourcep=((isbd*(evbd_Vdrainb_sourcep-(xjbvd*t2_Vdrainb_sourcep)))+(gmin*vbd_jct_Vdrainb_sourcep));
    5954                 :            : #endif
    5955                 :          0 : cbd=((isbd*(((evbd+xexpbvd)-1.0)-(xjbvd*t2)))+(gmin*vbd_jct));
    5956                 :            : }
    5957                 :            : else
    5958                 :            : {
    5959                 :            : #if defined(_DERIVATE)
    5960                 :          0 : cbd_Vsourceb_sourcep=0.0;
    5961                 :          0 : cbd_Vbulkp_sourcep=((dslpfwd*vbd_jct_Vbulkp_sourcep)+(gmin*vbd_jct_Vbulkp_sourcep));
    5962                 :          0 : cbd_Vdrainp_sourcep=((dslpfwd*vbd_jct_Vdrainp_sourcep)+(gmin*vbd_jct_Vdrainp_sourcep));
    5963                 :          0 : cbd_Vdrainb_sourcep=((dslpfwd*vbd_jct_Vdrainb_sourcep)+(gmin*vbd_jct_Vdrainb_sourcep));
    5964                 :            : #endif
    5965                 :          0 : cbd=((ivjdmfwd+(dslpfwd*(vbd_jct-vjdmfwd)))+(gmin*vbd_jct));
    5966                 :            : }
    5967                 :            : }
    5968                 :            : }
    5969                 :            : else
    5970                 :            : { /* no default */ }
    5971                 :            : }
    5972         [ +  - ]:       7356 : if
    5973                 :            : (vds>=0.0)
    5974                 :            : {
    5975                 :       7356 : mode=1;
    5976                 :            : #if defined(_DERIVATE)
    5977                 :       7356 : Vds_Vdrainp_sourcep=vds_Vdrainp_sourcep;
    5978                 :            : #endif
    5979                 :       7356 : Vds=vds;
    5980                 :            : #if defined(_DERIVATE)
    5981                 :       7356 : Vbs_Vdrainp_sourcep=0.0;
    5982                 :       7356 : Vbs_Vbulkp_sourcep=vbs_Vbulkp_sourcep;
    5983                 :            : #endif
    5984                 :       7356 : Vbs=vbs;
    5985                 :            : }
    5986                 :            : else
    5987                 :            : {
    5988                 :          0 : mode=(-1);
    5989                 :            : #if defined(_DERIVATE)
    5990                 :          0 : Vds_Vdrainp_sourcep=(-vds_Vdrainp_sourcep);
    5991                 :            : #endif
    5992                 :          0 : Vds=(-vds);
    5993                 :            : #if defined(_DERIVATE)
    5994                 :          0 : Vbs_Vdrainp_sourcep=vbd_Vdrainp_sourcep;
    5995                 :          0 : Vbs_Vbulkp_sourcep=vbd_Vbulkp_sourcep;
    5996                 :            : #endif
    5997                 :          0 : Vbs=vbd;
    5998                 :            : }
    5999                 :            : #if defined(_DERIVATE)
    6000                 :       7356 : t0_Vgatep_sourcep=0.0;
    6001                 :       7356 : t0_Vdrainp_sourcep=Vbs_Vdrainp_sourcep;
    6002                 :       7356 : t0_Vdrainb_sourcep=0.0;
    6003                 :       7356 : t0_Vbulkp_sourcep=Vbs_Vbulkp_sourcep;
    6004                 :       7356 : t0_Vsourceb_sourcep=0.0;
    6005                 :            : #endif
    6006                 :       7356 : t0=((Vbs-vbsc)-0.001);
    6007                 :            : {
    6008                 :       7356 : double m00_sqrt(d00_sqrt0,((t0*t0)-(0.004*vbsc)))
    6009                 :            : #if defined(_DERIVATE)
    6010                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)-(0.004*vbsc)))
    6011                 :            : #endif
    6012                 :            : #if defined(_DERIVATE)
    6013                 :       7356 : t1_Vgatep_sourcep=0.0;
    6014                 :       7356 : t1_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))*d10_sqrt0;
    6015                 :       7356 : t1_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))*d10_sqrt0;
    6016                 :       7356 : t1_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))*d10_sqrt0;
    6017                 :       7356 : t1_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))*d10_sqrt0;
    6018                 :            : #endif
    6019                 :       7356 : t1=d00_sqrt0;
    6020                 :            : }
    6021         [ +  - ]:       7356 : if
    6022                 :            : (t0>=0.0)
    6023                 :            : {
    6024                 :            : #if defined(_DERIVATE)
    6025                 :       7356 : vbseff_Vdrainp_sourcep=(0.5*(t0_Vdrainp_sourcep+t1_Vdrainp_sourcep));
    6026                 :       7356 : vbseff_Vdrainb_sourcep=(0.5*(t0_Vdrainb_sourcep+t1_Vdrainb_sourcep));
    6027                 :       7356 : vbseff_Vbulkp_sourcep=(0.5*(t0_Vbulkp_sourcep+t1_Vbulkp_sourcep));
    6028                 :       7356 : vbseff_Vsourceb_sourcep=(0.5*(t0_Vsourceb_sourcep+t1_Vsourceb_sourcep));
    6029                 :            : #endif
    6030                 :       7356 : vbseff=(vbsc+(0.5*(t0+t1)));
    6031                 :            : }
    6032                 :            : else
    6033                 :            : {
    6034                 :            : #if defined(_DERIVATE)
    6035                 :          0 : t2_Vgatep_sourcep=0.0;
    6036                 :          0 : t2_Vdrainp_sourcep=(-(-0.002)*(t1_Vdrainp_sourcep-t0_Vdrainp_sourcep)/(t1-t0)/(t1-t0));
    6037                 :          0 : t2_Vdrainb_sourcep=(-(-0.002)*(t1_Vdrainb_sourcep-t0_Vdrainb_sourcep)/(t1-t0)/(t1-t0));
    6038                 :          0 : t2_Vbulkp_sourcep=(-(-0.002)*(t1_Vbulkp_sourcep-t0_Vbulkp_sourcep)/(t1-t0)/(t1-t0));
    6039                 :          0 : t2_Vsourceb_sourcep=(-(-0.002)*(t1_Vsourceb_sourcep-t0_Vsourceb_sourcep)/(t1-t0)/(t1-t0));
    6040                 :            : #endif
    6041                 :          0 : t2=((-0.002)/(t1-t0));
    6042                 :            : #if defined(_DERIVATE)
    6043                 :          0 : vbseff_Vdrainp_sourcep=(vbsc*t2_Vdrainp_sourcep);
    6044                 :          0 : vbseff_Vdrainb_sourcep=(vbsc*t2_Vdrainb_sourcep);
    6045                 :          0 : vbseff_Vbulkp_sourcep=(vbsc*t2_Vbulkp_sourcep);
    6046                 :          0 : vbseff_Vsourceb_sourcep=(vbsc*t2_Vsourceb_sourcep);
    6047                 :            : #endif
    6048                 :          0 : vbseff=(vbsc*(1.0+t2));
    6049                 :            : }
    6050                 :            : #if defined(_DERIVATE)
    6051                 :       7356 : t9_Vgatep_sourcep=0.0;
    6052                 :       7356 : t9_Vdrainp_sourcep=0.0;
    6053                 :       7356 : t9_Vdrainb_sourcep=0.0;
    6054                 :       7356 : t9_Vbulkp_sourcep=0.0;
    6055                 :       7356 : t9_Vsourceb_sourcep=0.0;
    6056                 :            : #endif
    6057                 :       7356 : t9=(0.95*phi);
    6058                 :            : #if defined(_DERIVATE)
    6059                 :       7356 : t0_Vgatep_sourcep=0.0;
    6060                 :       7356 : t0_Vdrainp_sourcep=(t9_Vdrainp_sourcep-vbseff_Vdrainp_sourcep);
    6061                 :       7356 : t0_Vdrainb_sourcep=(t9_Vdrainb_sourcep-vbseff_Vdrainb_sourcep);
    6062                 :       7356 : t0_Vbulkp_sourcep=(t9_Vbulkp_sourcep-vbseff_Vbulkp_sourcep);
    6063                 :       7356 : t0_Vsourceb_sourcep=(t9_Vsourceb_sourcep-vbseff_Vsourceb_sourcep);
    6064                 :            : #endif
    6065                 :       7356 : t0=((t9-vbseff)-0.001);
    6066                 :            : {
    6067                 :       7356 : double m00_sqrt(d00_sqrt0,((t0*t0)+(0.004*t9)))
    6068                 :            : #if defined(_DERIVATE)
    6069                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+(0.004*t9)))
    6070                 :            : #endif
    6071                 :            : #if defined(_DERIVATE)
    6072                 :       7356 : t1_Vgatep_sourcep=0.0;
    6073                 :       7356 : t1_Vdrainp_sourcep=(((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))+(0.004*t9_Vdrainp_sourcep))*d10_sqrt0;
    6074                 :       7356 : t1_Vdrainb_sourcep=(((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))+(0.004*t9_Vdrainb_sourcep))*d10_sqrt0;
    6075                 :       7356 : t1_Vbulkp_sourcep=(((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))+(0.004*t9_Vbulkp_sourcep))*d10_sqrt0;
    6076                 :       7356 : t1_Vsourceb_sourcep=(((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))+(0.004*t9_Vsourceb_sourcep))*d10_sqrt0;
    6077                 :            : #endif
    6078                 :       7356 : t1=d00_sqrt0;
    6079                 :            : }
    6080                 :            : #if defined(_DERIVATE)
    6081                 :       7356 : vbseff_Vdrainp_sourcep=(t9_Vdrainp_sourcep-(0.5*(t0_Vdrainp_sourcep+t1_Vdrainp_sourcep)));
    6082                 :       7356 : vbseff_Vdrainb_sourcep=(t9_Vdrainb_sourcep-(0.5*(t0_Vdrainb_sourcep+t1_Vdrainb_sourcep)));
    6083                 :       7356 : vbseff_Vbulkp_sourcep=(t9_Vbulkp_sourcep-(0.5*(t0_Vbulkp_sourcep+t1_Vbulkp_sourcep)));
    6084                 :       7356 : vbseff_Vsourceb_sourcep=(t9_Vsourceb_sourcep-(0.5*(t0_Vsourceb_sourcep+t1_Vsourceb_sourcep)));
    6085                 :            : #endif
    6086                 :       7356 : vbseff=(t9-(0.5*(t0+t1)));
    6087                 :            : #if defined(_DERIVATE)
    6088                 :       7356 : phis_Vdrainp_sourcep=(-vbseff_Vdrainp_sourcep);
    6089                 :       7356 : phis_Vdrainb_sourcep=(-vbseff_Vdrainb_sourcep);
    6090                 :       7356 : phis_Vbulkp_sourcep=(-vbseff_Vbulkp_sourcep);
    6091                 :       7356 : phis_Vsourceb_sourcep=(-vbseff_Vsourceb_sourcep);
    6092                 :            : #endif
    6093                 :       7356 : phis=(phi-vbseff);
    6094                 :            : {
    6095                 :       7356 : double m00_sqrt(d00_sqrt0,phis)
    6096                 :            : #if defined(_DERIVATE)
    6097                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,phis)
    6098                 :            : #endif
    6099                 :            : #if defined(_DERIVATE)
    6100                 :       7356 : sqrtphis_Vdrainp_sourcep=phis_Vdrainp_sourcep*d10_sqrt0;
    6101                 :       7356 : sqrtphis_Vdrainb_sourcep=phis_Vdrainb_sourcep*d10_sqrt0;
    6102                 :       7356 : sqrtphis_Vbulkp_sourcep=phis_Vbulkp_sourcep*d10_sqrt0;
    6103                 :       7356 : sqrtphis_Vsourceb_sourcep=phis_Vsourceb_sourcep*d10_sqrt0;
    6104                 :            : #endif
    6105                 :       7356 : sqrtphis=d00_sqrt0;
    6106                 :            : }
    6107                 :            : {
    6108                 :       7356 : double m00_sqrt(d00_sqrt0,phi)
    6109                 :            : #if defined(_DERIVATE)
    6110                 :       7356 : xdep_Vdrainp_sourcep=((xdep0*sqrtphis_Vdrainp_sourcep)/d00_sqrt0);
    6111                 :       7356 : xdep_Vdrainb_sourcep=((xdep0*sqrtphis_Vdrainb_sourcep)/d00_sqrt0);
    6112                 :       7356 : xdep_Vbulkp_sourcep=((xdep0*sqrtphis_Vbulkp_sourcep)/d00_sqrt0);
    6113                 :       7356 : xdep_Vsourceb_sourcep=((xdep0*sqrtphis_Vsourceb_sourcep)/d00_sqrt0);
    6114                 :            : #endif
    6115                 :       7356 : xdep=((xdep0*sqrtphis)/d00_sqrt0);
    6116                 :            : }
    6117                 :            : {
    6118                 :       7356 : double m00_sqrt(d00_sqrt0,xdep)
    6119                 :            : #if defined(_DERIVATE)
    6120                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,xdep)
    6121                 :            : #endif
    6122                 :            : #if defined(_DERIVATE)
    6123                 :       7356 : t3_Vgatep_sourcep=0.0;
    6124                 :       7356 : t3_Vdrainp_sourcep=xdep_Vdrainp_sourcep*d10_sqrt0;
    6125                 :       7356 : t3_Vdrainb_sourcep=xdep_Vdrainb_sourcep*d10_sqrt0;
    6126                 :       7356 : t3_Vbulkp_sourcep=xdep_Vbulkp_sourcep*d10_sqrt0;
    6127                 :       7356 : t3_Vsourceb_sourcep=xdep_Vsourceb_sourcep*d10_sqrt0;
    6128                 :            : #endif
    6129                 :       7356 : t3=d00_sqrt0;
    6130                 :            : }
    6131                 :       7356 : v0=(vbi-phi);
    6132                 :            : #if defined(_DERIVATE)
    6133                 :       7356 : t0_Vgatep_sourcep=0.0;
    6134                 :       7356 : t0_Vdrainp_sourcep=(dvt2*vbseff_Vdrainp_sourcep);
    6135                 :       7356 : t0_Vdrainb_sourcep=(dvt2*vbseff_Vdrainb_sourcep);
    6136                 :       7356 : t0_Vbulkp_sourcep=(dvt2*vbseff_Vbulkp_sourcep);
    6137                 :       7356 : t0_Vsourceb_sourcep=(dvt2*vbseff_Vsourceb_sourcep);
    6138                 :            : #endif
    6139                 :       7356 : t0=(dvt2*vbseff);
    6140         [ +  - ]:       7356 : if
    6141                 :            : (t0>=(-0.5))
    6142                 :            : {
    6143                 :            : #if defined(_DERIVATE)
    6144                 :       7356 : t1_Vgatep_sourcep=0.0;
    6145                 :       7356 : t1_Vdrainp_sourcep=t0_Vdrainp_sourcep;
    6146                 :       7356 : t1_Vdrainb_sourcep=t0_Vdrainb_sourcep;
    6147                 :       7356 : t1_Vbulkp_sourcep=t0_Vbulkp_sourcep;
    6148                 :       7356 : t1_Vsourceb_sourcep=t0_Vsourceb_sourcep;
    6149                 :            : #endif
    6150                 :       7356 : t1=(1.0+t0);
    6151                 :            : #if defined(_DERIVATE)
    6152                 :       7356 : t2_Vgatep_sourcep=0.0;
    6153                 :       7356 : t2_Vdrainp_sourcep=0.0;
    6154                 :       7356 : t2_Vdrainb_sourcep=0.0;
    6155                 :       7356 : t2_Vbulkp_sourcep=0.0;
    6156                 :       7356 : t2_Vsourceb_sourcep=0.0;
    6157                 :            : #endif
    6158                 :       7356 : t2=dvt2;
    6159                 :            : }
    6160                 :            : else
    6161                 :            : {
    6162                 :            : #if defined(_DERIVATE)
    6163                 :          0 : t4_Vgatep_sourcep=0.0;
    6164                 :          0 : t4_Vdrainp_sourcep=(-(8.0*t0_Vdrainp_sourcep)/(3.0+(8.0*t0))/(3.0+(8.0*t0)));
    6165                 :          0 : t4_Vdrainb_sourcep=(-(8.0*t0_Vdrainb_sourcep)/(3.0+(8.0*t0))/(3.0+(8.0*t0)));
    6166                 :          0 : t4_Vbulkp_sourcep=(-(8.0*t0_Vbulkp_sourcep)/(3.0+(8.0*t0))/(3.0+(8.0*t0)));
    6167                 :          0 : t4_Vsourceb_sourcep=(-(8.0*t0_Vsourceb_sourcep)/(3.0+(8.0*t0))/(3.0+(8.0*t0)));
    6168                 :            : #endif
    6169                 :          0 : t4=(1.0/(3.0+(8.0*t0)));
    6170                 :            : #if defined(_DERIVATE)
    6171                 :          0 : t1_Vgatep_sourcep=0.0;
    6172                 :          0 : t1_Vdrainp_sourcep=(((3.0*t0_Vdrainp_sourcep)*t4)+((1.0+(3.0*t0))*t4_Vdrainp_sourcep));
    6173                 :          0 : t1_Vdrainb_sourcep=(((3.0*t0_Vdrainb_sourcep)*t4)+((1.0+(3.0*t0))*t4_Vdrainb_sourcep));
    6174                 :          0 : t1_Vbulkp_sourcep=(((3.0*t0_Vbulkp_sourcep)*t4)+((1.0+(3.0*t0))*t4_Vbulkp_sourcep));
    6175                 :          0 : t1_Vsourceb_sourcep=(((3.0*t0_Vsourceb_sourcep)*t4)+((1.0+(3.0*t0))*t4_Vsourceb_sourcep));
    6176                 :            : #endif
    6177                 :          0 : t1=((1.0+(3.0*t0))*t4);
    6178                 :            : #if defined(_DERIVATE)
    6179                 :          0 : t2_Vgatep_sourcep=0.0;
    6180                 :          0 : t2_Vdrainp_sourcep=(((dvt2*t4_Vdrainp_sourcep)*t4)+((dvt2*t4)*t4_Vdrainp_sourcep));
    6181                 :          0 : t2_Vdrainb_sourcep=(((dvt2*t4_Vdrainb_sourcep)*t4)+((dvt2*t4)*t4_Vdrainb_sourcep));
    6182                 :          0 : t2_Vbulkp_sourcep=(((dvt2*t4_Vbulkp_sourcep)*t4)+((dvt2*t4)*t4_Vbulkp_sourcep));
    6183                 :          0 : t2_Vsourceb_sourcep=(((dvt2*t4_Vsourceb_sourcep)*t4)+((dvt2*t4)*t4_Vsourceb_sourcep));
    6184                 :            : #endif
    6185                 :          0 : t2=((dvt2*t4)*t4);
    6186                 :            : }
    6187                 :            : #if defined(_DERIVATE)
    6188                 :       7356 : lt1_Vdrainp_sourcep=(((factor1*t3_Vdrainp_sourcep)*t1)+((factor1*t3)*t1_Vdrainp_sourcep));
    6189                 :       7356 : lt1_Vdrainb_sourcep=(((factor1*t3_Vdrainb_sourcep)*t1)+((factor1*t3)*t1_Vdrainb_sourcep));
    6190                 :       7356 : lt1_Vbulkp_sourcep=(((factor1*t3_Vbulkp_sourcep)*t1)+((factor1*t3)*t1_Vbulkp_sourcep));
    6191                 :       7356 : lt1_Vsourceb_sourcep=(((factor1*t3_Vsourceb_sourcep)*t1)+((factor1*t3)*t1_Vsourceb_sourcep));
    6192                 :            : #endif
    6193                 :       7356 : lt1=((factor1*t3)*t1);
    6194                 :            : #if defined(_DERIVATE)
    6195                 :       7356 : t0_Vgatep_sourcep=0.0;
    6196                 :       7356 : t0_Vdrainp_sourcep=(dvt2w*vbseff_Vdrainp_sourcep);
    6197                 :       7356 : t0_Vdrainb_sourcep=(dvt2w*vbseff_Vdrainb_sourcep);
    6198                 :       7356 : t0_Vbulkp_sourcep=(dvt2w*vbseff_Vbulkp_sourcep);
    6199                 :       7356 : t0_Vsourceb_sourcep=(dvt2w*vbseff_Vsourceb_sourcep);
    6200                 :            : #endif
    6201                 :       7356 : t0=(dvt2w*vbseff);
    6202         [ +  - ]:       7356 : if
    6203                 :            : (t0>=(-0.5))
    6204                 :            : {
    6205                 :            : #if defined(_DERIVATE)
    6206                 :       7356 : t1_Vgatep_sourcep=0.0;
    6207                 :       7356 : t1_Vdrainp_sourcep=t0_Vdrainp_sourcep;
    6208                 :       7356 : t1_Vdrainb_sourcep=t0_Vdrainb_sourcep;
    6209                 :       7356 : t1_Vbulkp_sourcep=t0_Vbulkp_sourcep;
    6210                 :       7356 : t1_Vsourceb_sourcep=t0_Vsourceb_sourcep;
    6211                 :            : #endif
    6212                 :       7356 : t1=(1.0+t0);
    6213                 :            : #if defined(_DERIVATE)
    6214                 :       7356 : t2_Vgatep_sourcep=0.0;
    6215                 :       7356 : t2_Vdrainp_sourcep=0.0;
    6216                 :       7356 : t2_Vdrainb_sourcep=0.0;
    6217                 :       7356 : t2_Vbulkp_sourcep=0.0;
    6218                 :       7356 : t2_Vsourceb_sourcep=0.0;
    6219                 :            : #endif
    6220                 :       7356 : t2=dvt2w;
    6221                 :            : }
    6222                 :            : else
    6223                 :            : {
    6224                 :            : #if defined(_DERIVATE)
    6225                 :          0 : t4_Vgatep_sourcep=0.0;
    6226                 :          0 : t4_Vdrainp_sourcep=(-(8.0*t0_Vdrainp_sourcep)/(3.0+(8.0*t0))/(3.0+(8.0*t0)));
    6227                 :          0 : t4_Vdrainb_sourcep=(-(8.0*t0_Vdrainb_sourcep)/(3.0+(8.0*t0))/(3.0+(8.0*t0)));
    6228                 :          0 : t4_Vbulkp_sourcep=(-(8.0*t0_Vbulkp_sourcep)/(3.0+(8.0*t0))/(3.0+(8.0*t0)));
    6229                 :          0 : t4_Vsourceb_sourcep=(-(8.0*t0_Vsourceb_sourcep)/(3.0+(8.0*t0))/(3.0+(8.0*t0)));
    6230                 :            : #endif
    6231                 :          0 : t4=(1.0/(3.0+(8.0*t0)));
    6232                 :            : #if defined(_DERIVATE)
    6233                 :          0 : t1_Vgatep_sourcep=0.0;
    6234                 :          0 : t1_Vdrainp_sourcep=(((3.0*t0_Vdrainp_sourcep)*t4)+((1.0+(3.0*t0))*t4_Vdrainp_sourcep));
    6235                 :          0 : t1_Vdrainb_sourcep=(((3.0*t0_Vdrainb_sourcep)*t4)+((1.0+(3.0*t0))*t4_Vdrainb_sourcep));
    6236                 :          0 : t1_Vbulkp_sourcep=(((3.0*t0_Vbulkp_sourcep)*t4)+((1.0+(3.0*t0))*t4_Vbulkp_sourcep));
    6237                 :          0 : t1_Vsourceb_sourcep=(((3.0*t0_Vsourceb_sourcep)*t4)+((1.0+(3.0*t0))*t4_Vsourceb_sourcep));
    6238                 :            : #endif
    6239                 :          0 : t1=((1.0+(3.0*t0))*t4);
    6240                 :            : #if defined(_DERIVATE)
    6241                 :          0 : t2_Vgatep_sourcep=0.0;
    6242                 :          0 : t2_Vdrainp_sourcep=(((dvt2w*t4_Vdrainp_sourcep)*t4)+((dvt2w*t4)*t4_Vdrainp_sourcep));
    6243                 :          0 : t2_Vdrainb_sourcep=(((dvt2w*t4_Vdrainb_sourcep)*t4)+((dvt2w*t4)*t4_Vdrainb_sourcep));
    6244                 :          0 : t2_Vbulkp_sourcep=(((dvt2w*t4_Vbulkp_sourcep)*t4)+((dvt2w*t4)*t4_Vbulkp_sourcep));
    6245                 :          0 : t2_Vsourceb_sourcep=(((dvt2w*t4_Vsourceb_sourcep)*t4)+((dvt2w*t4)*t4_Vsourceb_sourcep));
    6246                 :            : #endif
    6247                 :          0 : t2=((dvt2w*t4)*t4);
    6248                 :            : }
    6249                 :            : #if defined(_DERIVATE)
    6250                 :       7356 : ltw_Vdrainp_sourcep=(((factor1*t3_Vdrainp_sourcep)*t1)+((factor1*t3)*t1_Vdrainp_sourcep));
    6251                 :       7356 : ltw_Vdrainb_sourcep=(((factor1*t3_Vdrainb_sourcep)*t1)+((factor1*t3)*t1_Vdrainb_sourcep));
    6252                 :       7356 : ltw_Vbulkp_sourcep=(((factor1*t3_Vbulkp_sourcep)*t1)+((factor1*t3)*t1_Vbulkp_sourcep));
    6253                 :       7356 : ltw_Vsourceb_sourcep=(((factor1*t3_Vsourceb_sourcep)*t1)+((factor1*t3)*t1_Vsourceb_sourcep));
    6254                 :            : #endif
    6255                 :       7356 : ltw=((factor1*t3)*t1);
    6256                 :            : #if defined(_DERIVATE)
    6257                 :       7356 : t0_Vgatep_sourcep=0.0;
    6258                 :       7356 : t0_Vdrainp_sourcep=(-(dvt1*leff)*lt1_Vdrainp_sourcep/lt1/lt1);
    6259                 :       7356 : t0_Vdrainb_sourcep=(-(dvt1*leff)*lt1_Vdrainb_sourcep/lt1/lt1);
    6260                 :       7356 : t0_Vbulkp_sourcep=(-(dvt1*leff)*lt1_Vbulkp_sourcep/lt1/lt1);
    6261                 :       7356 : t0_Vsourceb_sourcep=(-(dvt1*leff)*lt1_Vsourceb_sourcep/lt1/lt1);
    6262                 :            : #endif
    6263                 :       7356 : t0=((dvt1*leff)/lt1);
    6264         [ -  + ]:       7356 : if
    6265                 :            : (t0<34.0)
    6266                 :            : {
    6267                 :            : {
    6268                 :          0 : double m00_exp(d00_exp0,t0)
    6269                 :            : #if defined(_DERIVATE)
    6270                 :            : #define d10_exp0 d00_exp0
    6271                 :            : #endif
    6272                 :            : #if defined(_DERIVATE)
    6273                 :          0 : t1_Vgatep_sourcep=0.0;
    6274                 :          0 : t1_Vdrainp_sourcep=t0_Vdrainp_sourcep*d10_exp0;
    6275                 :          0 : t1_Vdrainb_sourcep=t0_Vdrainb_sourcep*d10_exp0;
    6276                 :          0 : t1_Vbulkp_sourcep=t0_Vbulkp_sourcep*d10_exp0;
    6277                 :          0 : t1_Vsourceb_sourcep=t0_Vsourceb_sourcep*d10_exp0;
    6278                 :            : #endif
    6279                 :          0 : t1=d00_exp0;
    6280                 :            : }
    6281                 :            : #if defined(_DERIVATE)
    6282                 :          0 : t2_Vgatep_sourcep=0.0;
    6283                 :          0 : t2_Vdrainp_sourcep=t1_Vdrainp_sourcep;
    6284                 :          0 : t2_Vdrainb_sourcep=t1_Vdrainb_sourcep;
    6285                 :          0 : t2_Vbulkp_sourcep=t1_Vbulkp_sourcep;
    6286                 :          0 : t2_Vsourceb_sourcep=t1_Vsourceb_sourcep;
    6287                 :            : #endif
    6288                 :          0 : t2=(t1-1.0);
    6289                 :            : #if defined(_DERIVATE)
    6290                 :          0 : t3_Vgatep_sourcep=0.0;
    6291                 :          0 : t3_Vdrainp_sourcep=((t2_Vdrainp_sourcep*t2)+(t2*t2_Vdrainp_sourcep));
    6292                 :          0 : t3_Vdrainb_sourcep=((t2_Vdrainb_sourcep*t2)+(t2*t2_Vdrainb_sourcep));
    6293                 :          0 : t3_Vbulkp_sourcep=((t2_Vbulkp_sourcep*t2)+(t2*t2_Vbulkp_sourcep));
    6294                 :          0 : t3_Vsourceb_sourcep=((t2_Vsourceb_sourcep*t2)+(t2*t2_Vsourceb_sourcep));
    6295                 :            : #endif
    6296                 :          0 : t3=(t2*t2);
    6297                 :            : #if defined(_DERIVATE)
    6298                 :          0 : t4_Vgatep_sourcep=0.0;
    6299                 :          0 : t4_Vdrainp_sourcep=(t3_Vdrainp_sourcep+(2.0*t1_Vdrainp_sourcep)*1.713908431e-15);
    6300                 :          0 : t4_Vdrainb_sourcep=(t3_Vdrainb_sourcep+(2.0*t1_Vdrainb_sourcep)*1.713908431e-15);
    6301                 :          0 : t4_Vbulkp_sourcep=(t3_Vbulkp_sourcep+(2.0*t1_Vbulkp_sourcep)*1.713908431e-15);
    6302                 :          0 : t4_Vsourceb_sourcep=(t3_Vsourceb_sourcep+(2.0*t1_Vsourceb_sourcep)*1.713908431e-15);
    6303                 :            : #endif
    6304                 :          0 : t4=(t3+((2.0*t1)*1.713908431e-15));
    6305                 :            : #if defined(_DERIVATE)
    6306                 :          0 : theta0_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t4-t1*t4_Vdrainp_sourcep)/t4/t4);
    6307                 :          0 : theta0_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t4-t1*t4_Vdrainb_sourcep)/t4/t4);
    6308                 :          0 : theta0_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t4-t1*t4_Vbulkp_sourcep)/t4/t4);
    6309                 :          0 : theta0_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t4-t1*t4_Vsourceb_sourcep)/t4/t4);
    6310                 :            : #endif
    6311                 :          0 : theta0=(t1/t4);
    6312                 :            : }
    6313                 :            : else
    6314                 :            : {
    6315                 :            : #if defined(_DERIVATE)
    6316                 :       7356 : theta0_Vdrainp_sourcep=0.0;
    6317                 :       7356 : theta0_Vdrainb_sourcep=0.0;
    6318                 :       7356 : theta0_Vbulkp_sourcep=0.0;
    6319                 :       7356 : theta0_Vsourceb_sourcep=0.0;
    6320                 :            : #endif
    6321                 :       7356 : theta0=(1.0/(5.834617425e14-2.0));
    6322                 :            : }
    6323                 :            : #if defined(_DERIVATE)
    6324                 :       7356 : thetavth_Vdrainp_sourcep=(dvt0*theta0_Vdrainp_sourcep);
    6325                 :       7356 : thetavth_Vdrainb_sourcep=(dvt0*theta0_Vdrainb_sourcep);
    6326                 :       7356 : thetavth_Vbulkp_sourcep=(dvt0*theta0_Vbulkp_sourcep);
    6327                 :       7356 : thetavth_Vsourceb_sourcep=(dvt0*theta0_Vsourceb_sourcep);
    6328                 :            : #endif
    6329                 :       7356 : thetavth=(dvt0*theta0);
    6330                 :            : #if defined(_DERIVATE)
    6331                 :       7356 : delt_vth_Vdrainp_sourcep=thetavth_Vdrainp_sourcep*v0;
    6332                 :       7356 : delt_vth_Vdrainb_sourcep=thetavth_Vdrainb_sourcep*v0;
    6333                 :       7356 : delt_vth_Vbulkp_sourcep=thetavth_Vbulkp_sourcep*v0;
    6334                 :       7356 : delt_vth_Vsourceb_sourcep=thetavth_Vsourceb_sourcep*v0;
    6335                 :            : #endif
    6336                 :       7356 : delt_vth=(thetavth*v0);
    6337                 :            : #if defined(_DERIVATE)
    6338                 :       7356 : t0_Vgatep_sourcep=0.0;
    6339                 :       7356 : t0_Vdrainp_sourcep=(-((dvt1w*weff)*leff)*ltw_Vdrainp_sourcep/ltw/ltw);
    6340                 :       7356 : t0_Vdrainb_sourcep=(-((dvt1w*weff)*leff)*ltw_Vdrainb_sourcep/ltw/ltw);
    6341                 :       7356 : t0_Vbulkp_sourcep=(-((dvt1w*weff)*leff)*ltw_Vbulkp_sourcep/ltw/ltw);
    6342                 :       7356 : t0_Vsourceb_sourcep=(-((dvt1w*weff)*leff)*ltw_Vsourceb_sourcep/ltw/ltw);
    6343                 :            : #endif
    6344                 :       7356 : t0=(((dvt1w*weff)*leff)/ltw);
    6345         [ -  + ]:       7356 : if
    6346                 :            : (t0<34.0)
    6347                 :            : {
    6348                 :            : {
    6349                 :          0 : double m00_exp(d00_exp0,t0)
    6350                 :            : #if defined(_DERIVATE)
    6351                 :            : #define d10_exp0 d00_exp0
    6352                 :            : #endif
    6353                 :            : #if defined(_DERIVATE)
    6354                 :          0 : t1_Vgatep_sourcep=0.0;
    6355                 :          0 : t1_Vdrainp_sourcep=t0_Vdrainp_sourcep*d10_exp0;
    6356                 :          0 : t1_Vdrainb_sourcep=t0_Vdrainb_sourcep*d10_exp0;
    6357                 :          0 : t1_Vbulkp_sourcep=t0_Vbulkp_sourcep*d10_exp0;
    6358                 :          0 : t1_Vsourceb_sourcep=t0_Vsourceb_sourcep*d10_exp0;
    6359                 :            : #endif
    6360                 :          0 : t1=d00_exp0;
    6361                 :            : }
    6362                 :            : #if defined(_DERIVATE)
    6363                 :          0 : t2_Vgatep_sourcep=0.0;
    6364                 :          0 : t2_Vdrainp_sourcep=t1_Vdrainp_sourcep;
    6365                 :          0 : t2_Vdrainb_sourcep=t1_Vdrainb_sourcep;
    6366                 :          0 : t2_Vbulkp_sourcep=t1_Vbulkp_sourcep;
    6367                 :          0 : t2_Vsourceb_sourcep=t1_Vsourceb_sourcep;
    6368                 :            : #endif
    6369                 :          0 : t2=(t1-1.0);
    6370                 :            : #if defined(_DERIVATE)
    6371                 :          0 : t3_Vgatep_sourcep=0.0;
    6372                 :          0 : t3_Vdrainp_sourcep=((t2_Vdrainp_sourcep*t2)+(t2*t2_Vdrainp_sourcep));
    6373                 :          0 : t3_Vdrainb_sourcep=((t2_Vdrainb_sourcep*t2)+(t2*t2_Vdrainb_sourcep));
    6374                 :          0 : t3_Vbulkp_sourcep=((t2_Vbulkp_sourcep*t2)+(t2*t2_Vbulkp_sourcep));
    6375                 :          0 : t3_Vsourceb_sourcep=((t2_Vsourceb_sourcep*t2)+(t2*t2_Vsourceb_sourcep));
    6376                 :            : #endif
    6377                 :          0 : t3=(t2*t2);
    6378                 :            : #if defined(_DERIVATE)
    6379                 :          0 : t4_Vgatep_sourcep=0.0;
    6380                 :          0 : t4_Vdrainp_sourcep=(t3_Vdrainp_sourcep+(2.0*t1_Vdrainp_sourcep)*1.713908431e-15);
    6381                 :          0 : t4_Vdrainb_sourcep=(t3_Vdrainb_sourcep+(2.0*t1_Vdrainb_sourcep)*1.713908431e-15);
    6382                 :          0 : t4_Vbulkp_sourcep=(t3_Vbulkp_sourcep+(2.0*t1_Vbulkp_sourcep)*1.713908431e-15);
    6383                 :          0 : t4_Vsourceb_sourcep=(t3_Vsourceb_sourcep+(2.0*t1_Vsourceb_sourcep)*1.713908431e-15);
    6384                 :            : #endif
    6385                 :          0 : t4=(t3+((2.0*t1)*1.713908431e-15));
    6386                 :            : #if defined(_DERIVATE)
    6387                 :          0 : t5_Vgatep_sourcep=0.0;
    6388                 :          0 : t5_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t4-t1*t4_Vdrainp_sourcep)/t4/t4);
    6389                 :          0 : t5_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t4-t1*t4_Vdrainb_sourcep)/t4/t4);
    6390                 :          0 : t5_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t4-t1*t4_Vbulkp_sourcep)/t4/t4);
    6391                 :          0 : t5_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t4-t1*t4_Vsourceb_sourcep)/t4/t4);
    6392                 :            : #endif
    6393                 :          0 : t5=(t1/t4);
    6394                 :            : }
    6395                 :            : else
    6396                 :            : {
    6397                 :            : #if defined(_DERIVATE)
    6398                 :       7356 : t5_Vgatep_sourcep=0.0;
    6399                 :       7356 : t5_Vdrainp_sourcep=0.0;
    6400                 :       7356 : t5_Vdrainb_sourcep=0.0;
    6401                 :       7356 : t5_Vbulkp_sourcep=0.0;
    6402                 :       7356 : t5_Vsourceb_sourcep=0.0;
    6403                 :            : #endif
    6404                 :       7356 : t5=(1.0/(5.834617425e14-2.0));
    6405                 :            : }
    6406                 :            : #if defined(_DERIVATE)
    6407                 :       7356 : t0_Vgatep_sourcep=0.0;
    6408                 :       7356 : t0_Vdrainp_sourcep=(dvt0w*t5_Vdrainp_sourcep);
    6409                 :       7356 : t0_Vdrainb_sourcep=(dvt0w*t5_Vdrainb_sourcep);
    6410                 :       7356 : t0_Vbulkp_sourcep=(dvt0w*t5_Vbulkp_sourcep);
    6411                 :       7356 : t0_Vsourceb_sourcep=(dvt0w*t5_Vsourceb_sourcep);
    6412                 :            : #endif
    6413                 :       7356 : t0=(dvt0w*t5);
    6414                 :            : #if defined(_DERIVATE)
    6415                 :       7356 : t2_Vgatep_sourcep=0.0;
    6416                 :       7356 : t2_Vdrainp_sourcep=t0_Vdrainp_sourcep*v0;
    6417                 :       7356 : t2_Vdrainb_sourcep=t0_Vdrainb_sourcep*v0;
    6418                 :       7356 : t2_Vbulkp_sourcep=t0_Vbulkp_sourcep*v0;
    6419                 :       7356 : t2_Vsourceb_sourcep=t0_Vsourceb_sourcep*v0;
    6420                 :            : #endif
    6421                 :       7356 : t2=(t0*v0);
    6422                 :       7356 : tratio=((Temp/tnom)-1.0);
    6423                 :            : {
    6424                 :       7356 : double m00_sqrt(d00_sqrt0,(1.0+(lpe0/leff)))
    6425                 :            : #if defined(_DERIVATE)
    6426                 :       7356 : t0_Vgatep_sourcep=0.0;
    6427                 :       7356 : t0_Vdrainp_sourcep=0.0;
    6428                 :       7356 : t0_Vdrainb_sourcep=0.0;
    6429                 :       7356 : t0_Vbulkp_sourcep=0.0;
    6430                 :       7356 : t0_Vsourceb_sourcep=0.0;
    6431                 :            : #endif
    6432                 :       7356 : t0=d00_sqrt0;
    6433                 :            : }
    6434                 :            : #if defined(_DERIVATE)
    6435                 :       7356 : t1_Vgatep_sourcep=0.0;
    6436                 :       7356 : t1_Vdrainp_sourcep=((k1ox*t0_Vdrainp_sourcep)*sqrtphi+(kt2*vbseff_Vdrainp_sourcep)*tratio);
    6437                 :       7356 : t1_Vdrainb_sourcep=((k1ox*t0_Vdrainb_sourcep)*sqrtphi+(kt2*vbseff_Vdrainb_sourcep)*tratio);
    6438                 :       7356 : t1_Vbulkp_sourcep=((k1ox*t0_Vbulkp_sourcep)*sqrtphi+(kt2*vbseff_Vbulkp_sourcep)*tratio);
    6439                 :       7356 : t1_Vsourceb_sourcep=((k1ox*t0_Vsourceb_sourcep)*sqrtphi+(kt2*vbseff_Vsourceb_sourcep)*tratio);
    6440                 :            : #endif
    6441                 :       7356 : t1=(((k1ox*(t0-1.0))*sqrtphi)+(((kt1+(kt1l/leff))+(kt2*vbseff))*tratio));
    6442                 :       7356 : vth_narroww=((toxe*phi)/(weff+w0));
    6443                 :            : #if defined(_DERIVATE)
    6444                 :       7356 : t3_Vgatep_sourcep=0.0;
    6445                 :       7356 : t3_Vdrainp_sourcep=(etab*vbseff_Vdrainp_sourcep);
    6446                 :       7356 : t3_Vdrainb_sourcep=(etab*vbseff_Vdrainb_sourcep);
    6447                 :       7356 : t3_Vbulkp_sourcep=(etab*vbseff_Vbulkp_sourcep);
    6448                 :       7356 : t3_Vsourceb_sourcep=(etab*vbseff_Vsourceb_sourcep);
    6449                 :            : #endif
    6450                 :       7356 : t3=(eta0+(etab*vbseff));
    6451         [ -  + ]:       7356 : if
    6452                 :            : (t3<1.0e-4)
    6453                 :            : {
    6454                 :            : #if defined(_DERIVATE)
    6455                 :          0 : t9_Vgatep_sourcep=0.0;
    6456                 :          0 : t9_Vdrainp_sourcep=(-(-(2.0e4*t3_Vdrainp_sourcep))/(3.0-(2.0e4*t3))/(3.0-(2.0e4*t3)));
    6457                 :          0 : t9_Vdrainb_sourcep=(-(-(2.0e4*t3_Vdrainb_sourcep))/(3.0-(2.0e4*t3))/(3.0-(2.0e4*t3)));
    6458                 :          0 : t9_Vbulkp_sourcep=(-(-(2.0e4*t3_Vbulkp_sourcep))/(3.0-(2.0e4*t3))/(3.0-(2.0e4*t3)));
    6459                 :          0 : t9_Vsourceb_sourcep=(-(-(2.0e4*t3_Vsourceb_sourcep))/(3.0-(2.0e4*t3))/(3.0-(2.0e4*t3)));
    6460                 :            : #endif
    6461                 :          0 : t9=(1.0/(3.0-(2.0e4*t3)));
    6462                 :            : #if defined(_DERIVATE)
    6463                 :          0 : t3_Vgatep_sourcep=0.0;
    6464                 :          0 : t3_Vdrainp_sourcep=(((-t3_Vdrainp_sourcep)*t9)+((2.0e-4-t3)*t9_Vdrainp_sourcep));
    6465                 :          0 : t3_Vdrainb_sourcep=(((-t3_Vdrainb_sourcep)*t9)+((2.0e-4-t3)*t9_Vdrainb_sourcep));
    6466                 :          0 : t3_Vbulkp_sourcep=(((-t3_Vbulkp_sourcep)*t9)+((2.0e-4-t3)*t9_Vbulkp_sourcep));
    6467                 :          0 : t3_Vsourceb_sourcep=(((-t3_Vsourceb_sourcep)*t9)+((2.0e-4-t3)*t9_Vsourceb_sourcep));
    6468                 :            : #endif
    6469                 :          0 : t3=((2.0e-4-t3)*t9);
    6470                 :            : #if defined(_DERIVATE)
    6471                 :          0 : t4_Vgatep_sourcep=0.0;
    6472                 :          0 : t4_Vdrainp_sourcep=((t9_Vdrainp_sourcep*t9)+(t9*t9_Vdrainp_sourcep));
    6473                 :          0 : t4_Vdrainb_sourcep=((t9_Vdrainb_sourcep*t9)+(t9*t9_Vdrainb_sourcep));
    6474                 :          0 : t4_Vbulkp_sourcep=((t9_Vbulkp_sourcep*t9)+(t9*t9_Vbulkp_sourcep));
    6475                 :          0 : t4_Vsourceb_sourcep=((t9_Vsourceb_sourcep*t9)+(t9*t9_Vsourceb_sourcep));
    6476                 :            : #endif
    6477                 :          0 : t4=(t9*t9);
    6478                 :            : }
    6479                 :            : else
    6480                 :            : {
    6481                 :            : #if defined(_DERIVATE)
    6482                 :       7356 : t4_Vgatep_sourcep=0.0;
    6483                 :       7356 : t4_Vdrainp_sourcep=0.0;
    6484                 :       7356 : t4_Vdrainb_sourcep=0.0;
    6485                 :       7356 : t4_Vbulkp_sourcep=0.0;
    6486                 :       7356 : t4_Vsourceb_sourcep=0.0;
    6487                 :            : #endif
    6488                 :       7356 : t4=1.0;
    6489                 :            : }
    6490                 :            : #if defined(_DERIVATE)
    6491                 :       7356 : ddibl_sft_dvd_Vdrainp_sourcep=t3_Vdrainp_sourcep*theta0vb0;
    6492                 :       7356 : ddibl_sft_dvd_Vdrainb_sourcep=t3_Vdrainb_sourcep*theta0vb0;
    6493                 :       7356 : ddibl_sft_dvd_Vbulkp_sourcep=t3_Vbulkp_sourcep*theta0vb0;
    6494                 :       7356 : ddibl_sft_dvd_Vsourceb_sourcep=t3_Vsourceb_sourcep*theta0vb0;
    6495                 :            : #endif
    6496                 :       7356 : ddibl_sft_dvd=(t3*theta0vb0);
    6497                 :            : #if defined(_DERIVATE)
    6498                 :       7356 : dibl_sft_Vdrainp_sourcep=((ddibl_sft_dvd_Vdrainp_sourcep*Vds)+(ddibl_sft_dvd*Vds_Vdrainp_sourcep));
    6499                 :       7356 : dibl_sft_Vdrainb_sourcep=ddibl_sft_dvd_Vdrainb_sourcep*Vds;
    6500                 :       7356 : dibl_sft_Vbulkp_sourcep=ddibl_sft_dvd_Vbulkp_sourcep*Vds;
    6501                 :       7356 : dibl_sft_Vsourceb_sourcep=ddibl_sft_dvd_Vsourceb_sourcep*Vds;
    6502                 :            : #endif
    6503                 :       7356 : dibl_sft=(ddibl_sft_dvd*Vds);
    6504                 :            : {
    6505                 :       7356 : double m00_sqrt(d00_sqrt0,(1.0+(lpeb/leff)))
    6506                 :       7356 : lpe_vb=d00_sqrt0;
    6507                 :            : }
    6508                 :            : {
    6509                 :       7356 : double m00_sqrt(d00_sqrt0,phi)
    6510                 :            : #if defined(_DERIVATE)
    6511                 :       7356 : vth_Vdrainp_sourcep=(((((((k1ox*sqrtphis_Vdrainp_sourcep)*lpe_vb-(k2ox*vbseff_Vdrainp_sourcep))-delt_vth_Vdrainp_sourcep)-t2_Vdrainp_sourcep)+(k3b*vbseff_Vdrainp_sourcep)*vth_narroww)+t1_Vdrainp_sourcep)-dibl_sft_Vdrainp_sourcep);
    6512                 :       7356 : vth_Vdrainb_sourcep=(((((((k1ox*sqrtphis_Vdrainb_sourcep)*lpe_vb-(k2ox*vbseff_Vdrainb_sourcep))-delt_vth_Vdrainb_sourcep)-t2_Vdrainb_sourcep)+(k3b*vbseff_Vdrainb_sourcep)*vth_narroww)+t1_Vdrainb_sourcep)-dibl_sft_Vdrainb_sourcep);
    6513                 :       7356 : vth_Vbulkp_sourcep=(((((((k1ox*sqrtphis_Vbulkp_sourcep)*lpe_vb-(k2ox*vbseff_Vbulkp_sourcep))-delt_vth_Vbulkp_sourcep)-t2_Vbulkp_sourcep)+(k3b*vbseff_Vbulkp_sourcep)*vth_narroww)+t1_Vbulkp_sourcep)-dibl_sft_Vbulkp_sourcep);
    6514                 :       7356 : vth_Vsourceb_sourcep=(((((((k1ox*sqrtphis_Vsourceb_sourcep)*lpe_vb-(k2ox*vbseff_Vsourceb_sourcep))-delt_vth_Vsourceb_sourcep)-t2_Vsourceb_sourcep)+(k3b*vbseff_Vsourceb_sourcep)*vth_narroww)+t1_Vsourceb_sourcep)-dibl_sft_Vsourceb_sourcep);
    6515                 :            : #endif
    6516                 :       7356 : vth=((((((((type*vth0)+(((k1ox*sqrtphis)-(k1*d00_sqrt0))*lpe_vb))-(k2ox*vbseff))-delt_vth)-t2)+((k3+(k3b*vbseff))*vth_narroww))+t1)-dibl_sft);
    6517                 :            : }
    6518                 :            : #if defined(_DERIVATE)
    6519                 :       7356 : tmp1_Vgatep_sourcep=0.0;
    6520                 :       7356 : tmp1_Vdrainp_sourcep=(-1.03594e-10*xdep_Vdrainp_sourcep/xdep/xdep);
    6521                 :       7356 : tmp1_Vdrainb_sourcep=(-1.03594e-10*xdep_Vdrainb_sourcep/xdep/xdep);
    6522                 :       7356 : tmp1_Vbulkp_sourcep=(-1.03594e-10*xdep_Vbulkp_sourcep/xdep/xdep);
    6523                 :       7356 : tmp1_Vsourceb_sourcep=(-1.03594e-10*xdep_Vsourceb_sourcep/xdep/xdep);
    6524                 :            : #endif
    6525                 :       7356 : tmp1=(1.03594e-10/xdep);
    6526                 :            : #if defined(_DERIVATE)
    6527                 :       7356 : tmp2_Vgatep_sourcep=0.0;
    6528                 :       7356 : tmp2_Vdrainp_sourcep=(nfactor*tmp1_Vdrainp_sourcep);
    6529                 :       7356 : tmp2_Vdrainb_sourcep=(nfactor*tmp1_Vdrainb_sourcep);
    6530                 :       7356 : tmp2_Vbulkp_sourcep=(nfactor*tmp1_Vbulkp_sourcep);
    6531                 :       7356 : tmp2_Vsourceb_sourcep=(nfactor*tmp1_Vsourceb_sourcep);
    6532                 :            : #endif
    6533                 :       7356 : tmp2=(nfactor*tmp1);
    6534                 :            : #if defined(_DERIVATE)
    6535                 :       7356 : tmp3_Vgatep_sourcep=0.0;
    6536                 :       7356 : tmp3_Vdrainp_sourcep=((cdscb*vbseff_Vdrainp_sourcep)+(cdscd*Vds_Vdrainp_sourcep));
    6537                 :       7356 : tmp3_Vdrainb_sourcep=(cdscb*vbseff_Vdrainb_sourcep);
    6538                 :       7356 : tmp3_Vbulkp_sourcep=(cdscb*vbseff_Vbulkp_sourcep);
    6539                 :       7356 : tmp3_Vsourceb_sourcep=(cdscb*vbseff_Vsourceb_sourcep);
    6540                 :            : #endif
    6541                 :       7356 : tmp3=((cdsc+(cdscb*vbseff))+(cdscd*Vds));
    6542                 :            : #if defined(_DERIVATE)
    6543                 :       7356 : tmp4_Vgatep_sourcep=0.0;
    6544                 :       7356 : tmp4_Vdrainp_sourcep=((tmp2_Vdrainp_sourcep+((tmp3_Vdrainp_sourcep*theta0)+(tmp3*theta0_Vdrainp_sourcep)))/coxe);
    6545                 :       7356 : tmp4_Vdrainb_sourcep=((tmp2_Vdrainb_sourcep+((tmp3_Vdrainb_sourcep*theta0)+(tmp3*theta0_Vdrainb_sourcep)))/coxe);
    6546                 :       7356 : tmp4_Vbulkp_sourcep=((tmp2_Vbulkp_sourcep+((tmp3_Vbulkp_sourcep*theta0)+(tmp3*theta0_Vbulkp_sourcep)))/coxe);
    6547                 :       7356 : tmp4_Vsourceb_sourcep=((tmp2_Vsourceb_sourcep+((tmp3_Vsourceb_sourcep*theta0)+(tmp3*theta0_Vsourceb_sourcep)))/coxe);
    6548                 :            : #endif
    6549                 :       7356 : tmp4=(((tmp2+(tmp3*theta0))+cit)/coxe);
    6550         [ +  - ]:       7356 : if
    6551                 :            : (tmp4>=(-0.5))
    6552                 :            : {
    6553                 :            : #if defined(_DERIVATE)
    6554                 :       7356 : n_Vdrainp_sourcep=tmp4_Vdrainp_sourcep;
    6555                 :       7356 : n_Vdrainb_sourcep=tmp4_Vdrainb_sourcep;
    6556                 :       7356 : n_Vbulkp_sourcep=tmp4_Vbulkp_sourcep;
    6557                 :       7356 : n_Vsourceb_sourcep=tmp4_Vsourceb_sourcep;
    6558                 :            : #endif
    6559                 :       7356 : n=(1.0+tmp4);
    6560                 :            : }
    6561                 :            : else
    6562                 :            : {
    6563                 :            : #if defined(_DERIVATE)
    6564                 :          0 : t0_Vgatep_sourcep=0.0;
    6565                 :          0 : t0_Vdrainp_sourcep=(-(8.0*tmp4_Vdrainp_sourcep)/(3.0+(8.0*tmp4))/(3.0+(8.0*tmp4)));
    6566                 :          0 : t0_Vdrainb_sourcep=(-(8.0*tmp4_Vdrainb_sourcep)/(3.0+(8.0*tmp4))/(3.0+(8.0*tmp4)));
    6567                 :          0 : t0_Vbulkp_sourcep=(-(8.0*tmp4_Vbulkp_sourcep)/(3.0+(8.0*tmp4))/(3.0+(8.0*tmp4)));
    6568                 :          0 : t0_Vsourceb_sourcep=(-(8.0*tmp4_Vsourceb_sourcep)/(3.0+(8.0*tmp4))/(3.0+(8.0*tmp4)));
    6569                 :            : #endif
    6570                 :          0 : t0=(1.0/(3.0+(8.0*tmp4)));
    6571                 :            : #if defined(_DERIVATE)
    6572                 :          0 : n_Vdrainp_sourcep=(((3.0*tmp4_Vdrainp_sourcep)*t0)+((1.0+(3.0*tmp4))*t0_Vdrainp_sourcep));
    6573                 :          0 : n_Vdrainb_sourcep=(((3.0*tmp4_Vdrainb_sourcep)*t0)+((1.0+(3.0*tmp4))*t0_Vdrainb_sourcep));
    6574                 :          0 : n_Vbulkp_sourcep=(((3.0*tmp4_Vbulkp_sourcep)*t0)+((1.0+(3.0*tmp4))*t0_Vbulkp_sourcep));
    6575                 :          0 : n_Vsourceb_sourcep=(((3.0*tmp4_Vsourceb_sourcep)*t0)+((1.0+(3.0*tmp4))*t0_Vsourceb_sourcep));
    6576                 :            : #endif
    6577                 :          0 : n=((1.0+(3.0*tmp4))*t0);
    6578                 :            : }
    6579         [ -  + ]:       7356 : if
    6580                 :            : (dvtp0>0.0)
    6581                 :            : {
    6582                 :            : #if defined(_DERIVATE)
    6583                 :          0 : t0_Vgatep_sourcep=0.0;
    6584                 :          0 : t0_Vdrainp_sourcep=((-dvtp1)*Vds_Vdrainp_sourcep);
    6585                 :          0 : t0_Vdrainb_sourcep=0.0;
    6586                 :          0 : t0_Vbulkp_sourcep=0.0;
    6587                 :          0 : t0_Vsourceb_sourcep=0.0;
    6588                 :            : #endif
    6589                 :          0 : t0=((-dvtp1)*Vds);
    6590         [ #  # ]:          0 : if
    6591                 :            : (t0<(-34.0))
    6592                 :            : {
    6593                 :            : #if defined(_DERIVATE)
    6594                 :          0 : t2_Vgatep_sourcep=0.0;
    6595                 :          0 : t2_Vdrainp_sourcep=0.0;
    6596                 :          0 : t2_Vdrainb_sourcep=0.0;
    6597                 :          0 : t2_Vbulkp_sourcep=0.0;
    6598                 :          0 : t2_Vsourceb_sourcep=0.0;
    6599                 :            : #endif
    6600                 :          0 : t2=1.713908431e-15;
    6601                 :            : }
    6602                 :            : else
    6603                 :            : {
    6604                 :            : {
    6605                 :          0 : double m00_exp(d00_exp0,t0)
    6606                 :            : #if defined(_DERIVATE)
    6607                 :            : #define d10_exp0 d00_exp0
    6608                 :            : #endif
    6609                 :            : #if defined(_DERIVATE)
    6610                 :          0 : t2_Vgatep_sourcep=0.0;
    6611                 :          0 : t2_Vdrainp_sourcep=t0_Vdrainp_sourcep*d10_exp0;
    6612                 :          0 : t2_Vdrainb_sourcep=t0_Vdrainb_sourcep*d10_exp0;
    6613                 :          0 : t2_Vbulkp_sourcep=t0_Vbulkp_sourcep*d10_exp0;
    6614                 :          0 : t2_Vsourceb_sourcep=t0_Vsourceb_sourcep*d10_exp0;
    6615                 :            : #endif
    6616                 :          0 : t2=d00_exp0;
    6617                 :            : }
    6618                 :            : }
    6619                 :            : #if defined(_DERIVATE)
    6620                 :          0 : t3_Vgatep_sourcep=0.0;
    6621                 :          0 : t3_Vdrainp_sourcep=(dvtp0*t2_Vdrainp_sourcep);
    6622                 :          0 : t3_Vdrainb_sourcep=(dvtp0*t2_Vdrainb_sourcep);
    6623                 :          0 : t3_Vbulkp_sourcep=(dvtp0*t2_Vbulkp_sourcep);
    6624                 :          0 : t3_Vsourceb_sourcep=(dvtp0*t2_Vsourceb_sourcep);
    6625                 :            : #endif
    6626                 :          0 : t3=(leff+(dvtp0*(1.0+t2)));
    6627                 :            : {
    6628                 :          0 : double m00_logE(d00_logE0,(leff/t3))
    6629                 :            : #if defined(_DERIVATE)
    6630                 :          0 : double m10_logE(d10_logE0,d00_logE0,(leff/t3))
    6631                 :            : #endif
    6632                 :            : #if defined(_DERIVATE)
    6633                 :          0 : t4_Vgatep_sourcep=0.0;
    6634                 :          0 : t4_Vdrainp_sourcep=(vtm*(-leff*t3_Vdrainp_sourcep/t3/t3)*d10_logE0);
    6635                 :          0 : t4_Vdrainb_sourcep=(vtm*(-leff*t3_Vdrainb_sourcep/t3/t3)*d10_logE0);
    6636                 :          0 : t4_Vbulkp_sourcep=(vtm*(-leff*t3_Vbulkp_sourcep/t3/t3)*d10_logE0);
    6637                 :          0 : t4_Vsourceb_sourcep=(vtm*(-leff*t3_Vsourceb_sourcep/t3/t3)*d10_logE0);
    6638                 :            : #endif
    6639                 :          0 : t4=(vtm*d00_logE0);
    6640                 :            : }
    6641                 :            : #if defined(_DERIVATE)
    6642                 :          0 : vth_Vdrainp_sourcep=(vth_Vdrainp_sourcep-((n_Vdrainp_sourcep*t4)+(n*t4_Vdrainp_sourcep)));
    6643                 :          0 : vth_Vdrainb_sourcep=(vth_Vdrainb_sourcep-((n_Vdrainb_sourcep*t4)+(n*t4_Vdrainb_sourcep)));
    6644                 :          0 : vth_Vbulkp_sourcep=(vth_Vbulkp_sourcep-((n_Vbulkp_sourcep*t4)+(n*t4_Vbulkp_sourcep)));
    6645                 :          0 : vth_Vsourceb_sourcep=(vth_Vsourceb_sourcep-((n_Vsourceb_sourcep*t4)+(n*t4_Vsourceb_sourcep)));
    6646                 :            : #endif
    6647                 :          0 : vth=(vth-(n*t4));
    6648                 :            : }
    6649                 :            : #if defined(_DERIVATE)
    6650                 :       7356 : t0_Vgatep_sourcep=0.0;
    6651                 :       7356 : t0_Vdrainp_sourcep=0.0;
    6652                 :       7356 : t0_Vdrainb_sourcep=0.0;
    6653                 :       7356 : t0_Vbulkp_sourcep=0.0;
    6654                 :       7356 : t0_Vsourceb_sourcep=0.0;
    6655                 :            : #endif
    6656                 :       7356 : t0=(vfb+phi);
    6657 [ -  + ][ #  # ]:       7356 : if
                 [ #  # ]
    6658                 :            : (((ngate>1.0e18)&&(ngate<1.0e25))&&(vgs>t0))
    6659                 :            : {
    6660                 :            : #if defined(_DERIVATE)
    6661                 :          0 : t1_Vgatep_sourcep=0.0;
    6662                 :          0 : t1_Vdrainp_sourcep=0.0;
    6663                 :          0 : t1_Vdrainb_sourcep=0.0;
    6664                 :          0 : t1_Vbulkp_sourcep=0.0;
    6665                 :          0 : t1_Vsourceb_sourcep=0.0;
    6666                 :            : #endif
    6667                 :          0 : t1=((((1.0e6*1.6021918e-19)*1.03594e-10)*ngate)/(coxe*coxe));
    6668                 :            : #if defined(_DERIVATE)
    6669                 :          0 : t8_Vgatep_sourcep=(vgs_Vgatep_sourcep-t0_Vgatep_sourcep);
    6670                 :          0 : t8_Vdrainp_sourcep=(-t0_Vdrainp_sourcep);
    6671                 :          0 : t8_Vdrainb_sourcep=(-t0_Vdrainb_sourcep);
    6672                 :          0 : t8_Vbulkp_sourcep=(-t0_Vbulkp_sourcep);
    6673                 :          0 : t8_Vsourceb_sourcep=(-t0_Vsourceb_sourcep);
    6674                 :            : #endif
    6675                 :          0 : t8=(vgs-t0);
    6676                 :            : {
    6677                 :          0 : double m00_sqrt(d00_sqrt0,(1.0+((2.0*t8)/t1)))
    6678                 :            : #if defined(_DERIVATE)
    6679                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,(1.0+((2.0*t8)/t1)))
    6680                 :            : #endif
    6681                 :            : #if defined(_DERIVATE)
    6682                 :          0 : t4_Vgatep_sourcep=(((2.0*t8_Vgatep_sourcep)*t1-(2.0*t8)*t1_Vgatep_sourcep)/t1/t1)*d10_sqrt0;
    6683                 :          0 : t4_Vdrainp_sourcep=(((2.0*t8_Vdrainp_sourcep)*t1-(2.0*t8)*t1_Vdrainp_sourcep)/t1/t1)*d10_sqrt0;
    6684                 :          0 : t4_Vdrainb_sourcep=(((2.0*t8_Vdrainb_sourcep)*t1-(2.0*t8)*t1_Vdrainb_sourcep)/t1/t1)*d10_sqrt0;
    6685                 :          0 : t4_Vbulkp_sourcep=(((2.0*t8_Vbulkp_sourcep)*t1-(2.0*t8)*t1_Vbulkp_sourcep)/t1/t1)*d10_sqrt0;
    6686                 :          0 : t4_Vsourceb_sourcep=(((2.0*t8_Vsourceb_sourcep)*t1-(2.0*t8)*t1_Vsourceb_sourcep)/t1/t1)*d10_sqrt0;
    6687                 :            : #endif
    6688                 :          0 : t4=d00_sqrt0;
    6689                 :            : }
    6690                 :            : #if defined(_DERIVATE)
    6691                 :          0 : t2_Vgatep_sourcep=(((2.0*t8_Vgatep_sourcep)*(t4+1.0)-(2.0*t8)*t4_Vgatep_sourcep)/(t4+1.0)/(t4+1.0));
    6692                 :          0 : t2_Vdrainp_sourcep=(((2.0*t8_Vdrainp_sourcep)*(t4+1.0)-(2.0*t8)*t4_Vdrainp_sourcep)/(t4+1.0)/(t4+1.0));
    6693                 :          0 : t2_Vdrainb_sourcep=(((2.0*t8_Vdrainb_sourcep)*(t4+1.0)-(2.0*t8)*t4_Vdrainb_sourcep)/(t4+1.0)/(t4+1.0));
    6694                 :          0 : t2_Vbulkp_sourcep=(((2.0*t8_Vbulkp_sourcep)*(t4+1.0)-(2.0*t8)*t4_Vbulkp_sourcep)/(t4+1.0)/(t4+1.0));
    6695                 :          0 : t2_Vsourceb_sourcep=(((2.0*t8_Vsourceb_sourcep)*(t4+1.0)-(2.0*t8)*t4_Vsourceb_sourcep)/(t4+1.0)/(t4+1.0));
    6696                 :            : #endif
    6697                 :          0 : t2=((2.0*t8)/(t4+1.0));
    6698                 :            : #if defined(_DERIVATE)
    6699                 :          0 : t3_Vgatep_sourcep=(((((0.5*t2_Vgatep_sourcep)*t2)+((0.5*t2)*t2_Vgatep_sourcep))*t1-((0.5*t2)*t2)*t1_Vgatep_sourcep)/t1/t1);
    6700                 :          0 : t3_Vdrainp_sourcep=(((((0.5*t2_Vdrainp_sourcep)*t2)+((0.5*t2)*t2_Vdrainp_sourcep))*t1-((0.5*t2)*t2)*t1_Vdrainp_sourcep)/t1/t1);
    6701                 :          0 : t3_Vdrainb_sourcep=(((((0.5*t2_Vdrainb_sourcep)*t2)+((0.5*t2)*t2_Vdrainb_sourcep))*t1-((0.5*t2)*t2)*t1_Vdrainb_sourcep)/t1/t1);
    6702                 :          0 : t3_Vbulkp_sourcep=(((((0.5*t2_Vbulkp_sourcep)*t2)+((0.5*t2)*t2_Vbulkp_sourcep))*t1-((0.5*t2)*t2)*t1_Vbulkp_sourcep)/t1/t1);
    6703                 :          0 : t3_Vsourceb_sourcep=(((((0.5*t2_Vsourceb_sourcep)*t2)+((0.5*t2)*t2_Vsourceb_sourcep))*t1-((0.5*t2)*t2)*t1_Vsourceb_sourcep)/t1/t1);
    6704                 :            : #endif
    6705                 :          0 : t3=(((0.5*t2)*t2)/t1);
    6706                 :            : #if defined(_DERIVATE)
    6707                 :          0 : t7_Vgatep_sourcep=(-t3_Vgatep_sourcep);
    6708                 :          0 : t7_Vdrainp_sourcep=(-t3_Vdrainp_sourcep);
    6709                 :          0 : t7_Vdrainb_sourcep=(-t3_Vdrainb_sourcep);
    6710                 :          0 : t7_Vbulkp_sourcep=(-t3_Vbulkp_sourcep);
    6711                 :          0 : t7_Vsourceb_sourcep=(-t3_Vsourceb_sourcep);
    6712                 :            : #endif
    6713                 :          0 : t7=((1.12-t3)-0.05);
    6714                 :            : {
    6715                 :          0 : double m00_sqrt(d00_sqrt0,((t7*t7)+0.224))
    6716                 :            : #if defined(_DERIVATE)
    6717                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t7*t7)+0.224))
    6718                 :            : #endif
    6719                 :            : #if defined(_DERIVATE)
    6720                 :          0 : t6_Vgatep_sourcep=((t7_Vgatep_sourcep*t7)+(t7*t7_Vgatep_sourcep))*d10_sqrt0;
    6721                 :          0 : t6_Vdrainp_sourcep=((t7_Vdrainp_sourcep*t7)+(t7*t7_Vdrainp_sourcep))*d10_sqrt0;
    6722                 :          0 : t6_Vdrainb_sourcep=((t7_Vdrainb_sourcep*t7)+(t7*t7_Vdrainb_sourcep))*d10_sqrt0;
    6723                 :          0 : t6_Vbulkp_sourcep=((t7_Vbulkp_sourcep*t7)+(t7*t7_Vbulkp_sourcep))*d10_sqrt0;
    6724                 :          0 : t6_Vsourceb_sourcep=((t7_Vsourceb_sourcep*t7)+(t7*t7_Vsourceb_sourcep))*d10_sqrt0;
    6725                 :            : #endif
    6726                 :          0 : t6=d00_sqrt0;
    6727                 :            : }
    6728                 :            : #if defined(_DERIVATE)
    6729                 :          0 : t5_Vgatep_sourcep=(-(0.5*(t7_Vgatep_sourcep+t6_Vgatep_sourcep)));
    6730                 :          0 : t5_Vdrainp_sourcep=(-(0.5*(t7_Vdrainp_sourcep+t6_Vdrainp_sourcep)));
    6731                 :          0 : t5_Vdrainb_sourcep=(-(0.5*(t7_Vdrainb_sourcep+t6_Vdrainb_sourcep)));
    6732                 :          0 : t5_Vbulkp_sourcep=(-(0.5*(t7_Vbulkp_sourcep+t6_Vbulkp_sourcep)));
    6733                 :          0 : t5_Vsourceb_sourcep=(-(0.5*(t7_Vsourceb_sourcep+t6_Vsourceb_sourcep)));
    6734                 :            : #endif
    6735                 :          0 : t5=(1.12-(0.5*(t7+t6)));
    6736                 :            : #if defined(_DERIVATE)
    6737                 :          0 : vgs_eff_Vgatep_sourcep=(vgs_Vgatep_sourcep-t5_Vgatep_sourcep);
    6738                 :          0 : vgs_eff_Vdrainp_sourcep=(-t5_Vdrainp_sourcep);
    6739                 :          0 : vgs_eff_Vdrainb_sourcep=(-t5_Vdrainb_sourcep);
    6740                 :          0 : vgs_eff_Vbulkp_sourcep=(-t5_Vbulkp_sourcep);
    6741                 :          0 : vgs_eff_Vsourceb_sourcep=(-t5_Vsourceb_sourcep);
    6742                 :            : #endif
    6743                 :          0 : vgs_eff=(vgs-t5);
    6744                 :            : }
    6745                 :            : else
    6746                 :            : {
    6747                 :            : #if defined(_DERIVATE)
    6748                 :       7356 : vgs_eff_Vgatep_sourcep=vgs_Vgatep_sourcep;
    6749                 :       7356 : vgs_eff_Vdrainp_sourcep=0.0;
    6750                 :       7356 : vgs_eff_Vdrainb_sourcep=0.0;
    6751                 :       7356 : vgs_eff_Vbulkp_sourcep=0.0;
    6752                 :       7356 : vgs_eff_Vsourceb_sourcep=0.0;
    6753                 :            : #endif
    6754                 :       7356 : vgs_eff=vgs;
    6755                 :            : }
    6756 [ -  + ][ #  # ]:       7356 : if
                 [ #  # ]
    6757                 :            : (((ngate>1.0e18)&&(ngate<1.0e25))&&(vgd>t0))
    6758                 :            : {
    6759                 :            : #if defined(_DERIVATE)
    6760                 :          0 : t1_Vgatep_sourcep=0.0;
    6761                 :          0 : t1_Vdrainp_sourcep=0.0;
    6762                 :          0 : t1_Vdrainb_sourcep=0.0;
    6763                 :          0 : t1_Vbulkp_sourcep=0.0;
    6764                 :          0 : t1_Vsourceb_sourcep=0.0;
    6765                 :            : #endif
    6766                 :          0 : t1=((((1.0e6*1.6021918e-19)*1.03594e-10)*ngate)/(coxe*coxe));
    6767                 :            : #if defined(_DERIVATE)
    6768                 :          0 : t8_Vgatep_sourcep=(vgd_Vgatep_sourcep-t0_Vgatep_sourcep);
    6769                 :          0 : t8_Vdrainp_sourcep=(vgd_Vdrainp_sourcep-t0_Vdrainp_sourcep);
    6770                 :          0 : t8_Vdrainb_sourcep=(-t0_Vdrainb_sourcep);
    6771                 :          0 : t8_Vbulkp_sourcep=(-t0_Vbulkp_sourcep);
    6772                 :          0 : t8_Vsourceb_sourcep=(-t0_Vsourceb_sourcep);
    6773                 :            : #endif
    6774                 :          0 : t8=(vgd-t0);
    6775                 :            : {
    6776                 :          0 : double m00_sqrt(d00_sqrt0,(1.0+((2.0*t8)/t1)))
    6777                 :            : #if defined(_DERIVATE)
    6778                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,(1.0+((2.0*t8)/t1)))
    6779                 :            : #endif
    6780                 :            : #if defined(_DERIVATE)
    6781                 :          0 : t4_Vgatep_sourcep=(((2.0*t8_Vgatep_sourcep)*t1-(2.0*t8)*t1_Vgatep_sourcep)/t1/t1)*d10_sqrt0;
    6782                 :          0 : t4_Vdrainp_sourcep=(((2.0*t8_Vdrainp_sourcep)*t1-(2.0*t8)*t1_Vdrainp_sourcep)/t1/t1)*d10_sqrt0;
    6783                 :          0 : t4_Vdrainb_sourcep=(((2.0*t8_Vdrainb_sourcep)*t1-(2.0*t8)*t1_Vdrainb_sourcep)/t1/t1)*d10_sqrt0;
    6784                 :          0 : t4_Vbulkp_sourcep=(((2.0*t8_Vbulkp_sourcep)*t1-(2.0*t8)*t1_Vbulkp_sourcep)/t1/t1)*d10_sqrt0;
    6785                 :          0 : t4_Vsourceb_sourcep=(((2.0*t8_Vsourceb_sourcep)*t1-(2.0*t8)*t1_Vsourceb_sourcep)/t1/t1)*d10_sqrt0;
    6786                 :            : #endif
    6787                 :          0 : t4=d00_sqrt0;
    6788                 :            : }
    6789                 :            : #if defined(_DERIVATE)
    6790                 :          0 : t2_Vgatep_sourcep=(((2.0*t8_Vgatep_sourcep)*(t4+1.0)-(2.0*t8)*t4_Vgatep_sourcep)/(t4+1.0)/(t4+1.0));
    6791                 :          0 : t2_Vdrainp_sourcep=(((2.0*t8_Vdrainp_sourcep)*(t4+1.0)-(2.0*t8)*t4_Vdrainp_sourcep)/(t4+1.0)/(t4+1.0));
    6792                 :          0 : t2_Vdrainb_sourcep=(((2.0*t8_Vdrainb_sourcep)*(t4+1.0)-(2.0*t8)*t4_Vdrainb_sourcep)/(t4+1.0)/(t4+1.0));
    6793                 :          0 : t2_Vbulkp_sourcep=(((2.0*t8_Vbulkp_sourcep)*(t4+1.0)-(2.0*t8)*t4_Vbulkp_sourcep)/(t4+1.0)/(t4+1.0));
    6794                 :          0 : t2_Vsourceb_sourcep=(((2.0*t8_Vsourceb_sourcep)*(t4+1.0)-(2.0*t8)*t4_Vsourceb_sourcep)/(t4+1.0)/(t4+1.0));
    6795                 :            : #endif
    6796                 :          0 : t2=((2.0*t8)/(t4+1.0));
    6797                 :            : #if defined(_DERIVATE)
    6798                 :          0 : t3_Vgatep_sourcep=(((((0.5*t2_Vgatep_sourcep)*t2)+((0.5*t2)*t2_Vgatep_sourcep))*t1-((0.5*t2)*t2)*t1_Vgatep_sourcep)/t1/t1);
    6799                 :          0 : t3_Vdrainp_sourcep=(((((0.5*t2_Vdrainp_sourcep)*t2)+((0.5*t2)*t2_Vdrainp_sourcep))*t1-((0.5*t2)*t2)*t1_Vdrainp_sourcep)/t1/t1);
    6800                 :          0 : t3_Vdrainb_sourcep=(((((0.5*t2_Vdrainb_sourcep)*t2)+((0.5*t2)*t2_Vdrainb_sourcep))*t1-((0.5*t2)*t2)*t1_Vdrainb_sourcep)/t1/t1);
    6801                 :          0 : t3_Vbulkp_sourcep=(((((0.5*t2_Vbulkp_sourcep)*t2)+((0.5*t2)*t2_Vbulkp_sourcep))*t1-((0.5*t2)*t2)*t1_Vbulkp_sourcep)/t1/t1);
    6802                 :          0 : t3_Vsourceb_sourcep=(((((0.5*t2_Vsourceb_sourcep)*t2)+((0.5*t2)*t2_Vsourceb_sourcep))*t1-((0.5*t2)*t2)*t1_Vsourceb_sourcep)/t1/t1);
    6803                 :            : #endif
    6804                 :          0 : t3=(((0.5*t2)*t2)/t1);
    6805                 :            : #if defined(_DERIVATE)
    6806                 :          0 : t7_Vgatep_sourcep=(-t3_Vgatep_sourcep);
    6807                 :          0 : t7_Vdrainp_sourcep=(-t3_Vdrainp_sourcep);
    6808                 :          0 : t7_Vdrainb_sourcep=(-t3_Vdrainb_sourcep);
    6809                 :          0 : t7_Vbulkp_sourcep=(-t3_Vbulkp_sourcep);
    6810                 :          0 : t7_Vsourceb_sourcep=(-t3_Vsourceb_sourcep);
    6811                 :            : #endif
    6812                 :          0 : t7=((1.12-t3)-0.05);
    6813                 :            : {
    6814                 :          0 : double m00_sqrt(d00_sqrt0,((t7*t7)+0.224))
    6815                 :            : #if defined(_DERIVATE)
    6816                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t7*t7)+0.224))
    6817                 :            : #endif
    6818                 :            : #if defined(_DERIVATE)
    6819                 :          0 : t6_Vgatep_sourcep=((t7_Vgatep_sourcep*t7)+(t7*t7_Vgatep_sourcep))*d10_sqrt0;
    6820                 :          0 : t6_Vdrainp_sourcep=((t7_Vdrainp_sourcep*t7)+(t7*t7_Vdrainp_sourcep))*d10_sqrt0;
    6821                 :          0 : t6_Vdrainb_sourcep=((t7_Vdrainb_sourcep*t7)+(t7*t7_Vdrainb_sourcep))*d10_sqrt0;
    6822                 :          0 : t6_Vbulkp_sourcep=((t7_Vbulkp_sourcep*t7)+(t7*t7_Vbulkp_sourcep))*d10_sqrt0;
    6823                 :          0 : t6_Vsourceb_sourcep=((t7_Vsourceb_sourcep*t7)+(t7*t7_Vsourceb_sourcep))*d10_sqrt0;
    6824                 :            : #endif
    6825                 :          0 : t6=d00_sqrt0;
    6826                 :            : }
    6827                 :            : #if defined(_DERIVATE)
    6828                 :          0 : t5_Vgatep_sourcep=(-(0.5*(t7_Vgatep_sourcep+t6_Vgatep_sourcep)));
    6829                 :          0 : t5_Vdrainp_sourcep=(-(0.5*(t7_Vdrainp_sourcep+t6_Vdrainp_sourcep)));
    6830                 :          0 : t5_Vdrainb_sourcep=(-(0.5*(t7_Vdrainb_sourcep+t6_Vdrainb_sourcep)));
    6831                 :          0 : t5_Vbulkp_sourcep=(-(0.5*(t7_Vbulkp_sourcep+t6_Vbulkp_sourcep)));
    6832                 :          0 : t5_Vsourceb_sourcep=(-(0.5*(t7_Vsourceb_sourcep+t6_Vsourceb_sourcep)));
    6833                 :            : #endif
    6834                 :          0 : t5=(1.12-(0.5*(t7+t6)));
    6835                 :            : #if defined(_DERIVATE)
    6836                 :          0 : vgd_eff_Vgatep_sourcep=(vgd_Vgatep_sourcep-t5_Vgatep_sourcep);
    6837                 :          0 : vgd_eff_Vdrainp_sourcep=(vgd_Vdrainp_sourcep-t5_Vdrainp_sourcep);
    6838                 :          0 : vgd_eff_Vdrainb_sourcep=(-t5_Vdrainb_sourcep);
    6839                 :          0 : vgd_eff_Vbulkp_sourcep=(-t5_Vbulkp_sourcep);
    6840                 :          0 : vgd_eff_Vsourceb_sourcep=(-t5_Vsourceb_sourcep);
    6841                 :            : #endif
    6842                 :          0 : vgd_eff=(vgd-t5);
    6843                 :            : }
    6844                 :            : else
    6845                 :            : {
    6846                 :            : #if defined(_DERIVATE)
    6847                 :       7356 : vgd_eff_Vgatep_sourcep=vgd_Vgatep_sourcep;
    6848                 :       7356 : vgd_eff_Vdrainp_sourcep=vgd_Vdrainp_sourcep;
    6849                 :       7356 : vgd_eff_Vdrainb_sourcep=0.0;
    6850                 :       7356 : vgd_eff_Vbulkp_sourcep=0.0;
    6851                 :       7356 : vgd_eff_Vsourceb_sourcep=0.0;
    6852                 :            : #endif
    6853                 :       7356 : vgd_eff=vgd;
    6854                 :            : }
    6855         [ +  - ]:       7356 : if
    6856                 :            : (mode>0)
    6857                 :            : {
    6858                 :            : #if defined(_DERIVATE)
    6859                 :       7356 : Vgs_eff_Vgatep_sourcep=vgs_eff_Vgatep_sourcep;
    6860                 :       7356 : Vgs_eff_Vdrainp_sourcep=vgs_eff_Vdrainp_sourcep;
    6861                 :       7356 : Vgs_eff_Vdrainb_sourcep=vgs_eff_Vdrainb_sourcep;
    6862                 :       7356 : Vgs_eff_Vbulkp_sourcep=vgs_eff_Vbulkp_sourcep;
    6863                 :       7356 : Vgs_eff_Vsourceb_sourcep=vgs_eff_Vsourceb_sourcep;
    6864                 :            : #endif
    6865                 :       7356 : Vgs_eff=vgs_eff;
    6866                 :            : }
    6867                 :            : else
    6868                 :            : {
    6869                 :            : #if defined(_DERIVATE)
    6870                 :          0 : Vgs_eff_Vgatep_sourcep=vgd_eff_Vgatep_sourcep;
    6871                 :          0 : Vgs_eff_Vdrainp_sourcep=vgd_eff_Vdrainp_sourcep;
    6872                 :          0 : Vgs_eff_Vdrainb_sourcep=vgd_eff_Vdrainb_sourcep;
    6873                 :          0 : Vgs_eff_Vbulkp_sourcep=vgd_eff_Vbulkp_sourcep;
    6874                 :          0 : Vgs_eff_Vsourceb_sourcep=vgd_eff_Vsourceb_sourcep;
    6875                 :            : #endif
    6876                 :          0 : Vgs_eff=vgd_eff;
    6877                 :            : }
    6878                 :            : #if defined(_DERIVATE)
    6879                 :       7356 : vgst_Vgatep_sourcep=Vgs_eff_Vgatep_sourcep;
    6880                 :       7356 : vgst_Vdrainp_sourcep=(Vgs_eff_Vdrainp_sourcep-vth_Vdrainp_sourcep);
    6881                 :       7356 : vgst_Vdrainb_sourcep=(Vgs_eff_Vdrainb_sourcep-vth_Vdrainb_sourcep);
    6882                 :       7356 : vgst_Vbulkp_sourcep=(Vgs_eff_Vbulkp_sourcep-vth_Vbulkp_sourcep);
    6883                 :       7356 : vgst_Vsourceb_sourcep=(Vgs_eff_Vsourceb_sourcep-vth_Vsourceb_sourcep);
    6884                 :            : #endif
    6885                 :       7356 : vgst=(Vgs_eff-vth);
    6886                 :            : #if defined(_DERIVATE)
    6887                 :       7356 : t0_Vgatep_sourcep=0.0;
    6888                 :       7356 : t0_Vdrainp_sourcep=n_Vdrainp_sourcep*vtm;
    6889                 :       7356 : t0_Vdrainb_sourcep=n_Vdrainb_sourcep*vtm;
    6890                 :       7356 : t0_Vbulkp_sourcep=n_Vbulkp_sourcep*vtm;
    6891                 :       7356 : t0_Vsourceb_sourcep=n_Vsourceb_sourcep*vtm;
    6892                 :            : #endif
    6893                 :       7356 : t0=(n*vtm);
    6894                 :            : #if defined(_DERIVATE)
    6895                 :       7356 : t1_Vgatep_sourcep=(mstar*vgst_Vgatep_sourcep);
    6896                 :       7356 : t1_Vdrainp_sourcep=(mstar*vgst_Vdrainp_sourcep);
    6897                 :       7356 : t1_Vdrainb_sourcep=(mstar*vgst_Vdrainb_sourcep);
    6898                 :       7356 : t1_Vbulkp_sourcep=(mstar*vgst_Vbulkp_sourcep);
    6899                 :       7356 : t1_Vsourceb_sourcep=(mstar*vgst_Vsourceb_sourcep);
    6900                 :            : #endif
    6901                 :       7356 : t1=(mstar*vgst);
    6902                 :            : #if defined(_DERIVATE)
    6903                 :       7356 : t2_Vgatep_sourcep=((t1_Vgatep_sourcep*t0-t1*t0_Vgatep_sourcep)/t0/t0);
    6904                 :       7356 : t2_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t0-t1*t0_Vdrainp_sourcep)/t0/t0);
    6905                 :       7356 : t2_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t0-t1*t0_Vdrainb_sourcep)/t0/t0);
    6906                 :       7356 : t2_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t0-t1*t0_Vbulkp_sourcep)/t0/t0);
    6907                 :       7356 : t2_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t0-t1*t0_Vsourceb_sourcep)/t0/t0);
    6908                 :            : #endif
    6909                 :       7356 : t2=(t1/t0);
    6910         [ +  + ]:       7356 : if
    6911                 :            : (t2>34.0)
    6912                 :            : {
    6913                 :            : #if defined(_DERIVATE)
    6914                 :       1800 : t10_Vgatep_sourcep=t1_Vgatep_sourcep;
    6915                 :       1800 : t10_Vdrainp_sourcep=t1_Vdrainp_sourcep;
    6916                 :       1800 : t10_Vdrainb_sourcep=t1_Vdrainb_sourcep;
    6917                 :       1800 : t10_Vbulkp_sourcep=t1_Vbulkp_sourcep;
    6918                 :       1800 : t10_Vsourceb_sourcep=t1_Vsourceb_sourcep;
    6919                 :            : #endif
    6920                 :       1800 : t10=t1;
    6921                 :            : }
    6922                 :            : else
    6923                 :            : {
    6924         [ -  + ]:       5556 : if
    6925                 :            : (t2<(-34.0))
    6926                 :            : {
    6927                 :            : {
    6928                 :          0 : double m00_logE(d00_logE0,(1.0+1.713908431e-15))
    6929                 :            : #if defined(_DERIVATE)
    6930                 :          0 : t10_Vgatep_sourcep=0.0;
    6931                 :          0 : t10_Vdrainp_sourcep=0.0;
    6932                 :          0 : t10_Vdrainb_sourcep=0.0;
    6933                 :          0 : t10_Vbulkp_sourcep=0.0;
    6934                 :          0 : t10_Vsourceb_sourcep=0.0;
    6935                 :            : #endif
    6936                 :          0 : t10=(vtm*d00_logE0);
    6937                 :            : }
    6938                 :            : #if defined(_DERIVATE)
    6939                 :          0 : t10_Vgatep_sourcep=t10_Vgatep_sourcep*n;
    6940                 :          0 : t10_Vdrainp_sourcep=((t10_Vdrainp_sourcep*n)+(t10*n_Vdrainp_sourcep));
    6941                 :          0 : t10_Vdrainb_sourcep=((t10_Vdrainb_sourcep*n)+(t10*n_Vdrainb_sourcep));
    6942                 :          0 : t10_Vbulkp_sourcep=((t10_Vbulkp_sourcep*n)+(t10*n_Vbulkp_sourcep));
    6943                 :          0 : t10_Vsourceb_sourcep=((t10_Vsourceb_sourcep*n)+(t10*n_Vsourceb_sourcep));
    6944                 :            : #endif
    6945                 :          0 : t10=(t10*n);
    6946                 :            : }
    6947                 :            : else
    6948                 :            : {
    6949                 :            : {
    6950                 :       5556 : double m00_exp(d00_exp0,t2)
    6951                 :            : #if defined(_DERIVATE)
    6952                 :            : #define d10_exp0 d00_exp0
    6953                 :            : #endif
    6954                 :            : #if defined(_DERIVATE)
    6955                 :       5556 : expvgst_Vgatep_sourcep=t2_Vgatep_sourcep*d10_exp0;
    6956                 :       5556 : expvgst_Vdrainp_sourcep=t2_Vdrainp_sourcep*d10_exp0;
    6957                 :       5556 : expvgst_Vdrainb_sourcep=t2_Vdrainb_sourcep*d10_exp0;
    6958                 :       5556 : expvgst_Vbulkp_sourcep=t2_Vbulkp_sourcep*d10_exp0;
    6959                 :       5556 : expvgst_Vsourceb_sourcep=t2_Vsourceb_sourcep*d10_exp0;
    6960                 :            : #endif
    6961                 :       5556 : expvgst=d00_exp0;
    6962                 :            : }
    6963                 :            : {
    6964                 :       5556 : double m00_logE(d00_logE0,(1.0+expvgst))
    6965                 :            : #if defined(_DERIVATE)
    6966                 :       5556 : double m10_logE(d10_logE0,d00_logE0,(1.0+expvgst))
    6967                 :            : #endif
    6968                 :            : #if defined(_DERIVATE)
    6969                 :       5556 : t3_Vgatep_sourcep=(vtm*expvgst_Vgatep_sourcep*d10_logE0);
    6970                 :       5556 : t3_Vdrainp_sourcep=(vtm*expvgst_Vdrainp_sourcep*d10_logE0);
    6971                 :       5556 : t3_Vdrainb_sourcep=(vtm*expvgst_Vdrainb_sourcep*d10_logE0);
    6972                 :       5556 : t3_Vbulkp_sourcep=(vtm*expvgst_Vbulkp_sourcep*d10_logE0);
    6973                 :       5556 : t3_Vsourceb_sourcep=(vtm*expvgst_Vsourceb_sourcep*d10_logE0);
    6974                 :            : #endif
    6975                 :       5556 : t3=(vtm*d00_logE0);
    6976                 :            : }
    6977                 :            : #if defined(_DERIVATE)
    6978                 :       5556 : t10_Vgatep_sourcep=(n*t3_Vgatep_sourcep);
    6979                 :       5556 : t10_Vdrainp_sourcep=((n_Vdrainp_sourcep*t3)+(n*t3_Vdrainp_sourcep));
    6980                 :       5556 : t10_Vdrainb_sourcep=((n_Vdrainb_sourcep*t3)+(n*t3_Vdrainb_sourcep));
    6981                 :       5556 : t10_Vbulkp_sourcep=((n_Vbulkp_sourcep*t3)+(n*t3_Vbulkp_sourcep));
    6982                 :       5556 : t10_Vsourceb_sourcep=((n_Vsourceb_sourcep*t3)+(n*t3_Vsourceb_sourcep));
    6983                 :            : #endif
    6984                 :       5556 : t10=(n*t3);
    6985                 :            : }
    6986                 :            : }
    6987                 :            : #if defined(_DERIVATE)
    6988                 :       7356 : t1_Vgatep_sourcep=(-((1.0-mstar)*vgst_Vgatep_sourcep));
    6989                 :       7356 : t1_Vdrainp_sourcep=(-((1.0-mstar)*vgst_Vdrainp_sourcep));
    6990                 :       7356 : t1_Vdrainb_sourcep=(-((1.0-mstar)*vgst_Vdrainb_sourcep));
    6991                 :       7356 : t1_Vbulkp_sourcep=(-((1.0-mstar)*vgst_Vbulkp_sourcep));
    6992                 :       7356 : t1_Vsourceb_sourcep=(-((1.0-mstar)*vgst_Vsourceb_sourcep));
    6993                 :            : #endif
    6994                 :       7356 : t1=(voffcbn-((1.0-mstar)*vgst));
    6995                 :            : #if defined(_DERIVATE)
    6996                 :       7356 : t2_Vgatep_sourcep=((t1_Vgatep_sourcep*t0-t1*t0_Vgatep_sourcep)/t0/t0);
    6997                 :       7356 : t2_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t0-t1*t0_Vdrainp_sourcep)/t0/t0);
    6998                 :       7356 : t2_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t0-t1*t0_Vdrainb_sourcep)/t0/t0);
    6999                 :       7356 : t2_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t0-t1*t0_Vbulkp_sourcep)/t0/t0);
    7000                 :       7356 : t2_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t0-t1*t0_Vsourceb_sourcep)/t0/t0);
    7001                 :            : #endif
    7002                 :       7356 : t2=(t1/t0);
    7003         [ +  + ]:       7356 : if
    7004                 :            : (t2<(-34.0))
    7005                 :            : {
    7006                 :            : #if defined(_DERIVATE)
    7007                 :       2400 : t3_Vgatep_sourcep=0.0;
    7008                 :       2400 : t3_Vdrainp_sourcep=0.0;
    7009                 :       2400 : t3_Vdrainb_sourcep=0.0;
    7010                 :       2400 : t3_Vbulkp_sourcep=0.0;
    7011                 :       2400 : t3_Vsourceb_sourcep=0.0;
    7012                 :            : #endif
    7013                 :       2400 : t3=((coxe*1.713908431e-15)/cdep0);
    7014                 :            : #if defined(_DERIVATE)
    7015                 :       2400 : t9_Vgatep_sourcep=t3_Vgatep_sourcep*n;
    7016                 :       2400 : t9_Vdrainp_sourcep=((t3_Vdrainp_sourcep*n)+(t3*n_Vdrainp_sourcep));
    7017                 :       2400 : t9_Vdrainb_sourcep=((t3_Vdrainb_sourcep*n)+(t3*n_Vdrainb_sourcep));
    7018                 :       2400 : t9_Vbulkp_sourcep=((t3_Vbulkp_sourcep*n)+(t3*n_Vbulkp_sourcep));
    7019                 :       2400 : t9_Vsourceb_sourcep=((t3_Vsourceb_sourcep*n)+(t3*n_Vsourceb_sourcep));
    7020                 :            : #endif
    7021                 :       2400 : t9=(mstar+(t3*n));
    7022                 :            : }
    7023                 :            : else
    7024                 :            : {
    7025         [ -  + ]:       4956 : if
    7026                 :            : (t2>34.0)
    7027                 :            : {
    7028                 :            : #if defined(_DERIVATE)
    7029                 :          0 : t3_Vgatep_sourcep=0.0;
    7030                 :          0 : t3_Vdrainp_sourcep=0.0;
    7031                 :          0 : t3_Vdrainb_sourcep=0.0;
    7032                 :          0 : t3_Vbulkp_sourcep=0.0;
    7033                 :          0 : t3_Vsourceb_sourcep=0.0;
    7034                 :            : #endif
    7035                 :          0 : t3=((coxe*5.834617425e14)/cdep0);
    7036                 :            : #if defined(_DERIVATE)
    7037                 :          0 : t9_Vgatep_sourcep=t3_Vgatep_sourcep*n;
    7038                 :          0 : t9_Vdrainp_sourcep=((t3_Vdrainp_sourcep*n)+(t3*n_Vdrainp_sourcep));
    7039                 :          0 : t9_Vdrainb_sourcep=((t3_Vdrainb_sourcep*n)+(t3*n_Vdrainb_sourcep));
    7040                 :          0 : t9_Vbulkp_sourcep=((t3_Vbulkp_sourcep*n)+(t3*n_Vbulkp_sourcep));
    7041                 :          0 : t9_Vsourceb_sourcep=((t3_Vsourceb_sourcep*n)+(t3*n_Vsourceb_sourcep));
    7042                 :            : #endif
    7043                 :          0 : t9=(mstar+(t3*n));
    7044                 :            : }
    7045                 :            : else
    7046                 :            : {
    7047                 :            : {
    7048                 :       4956 : double m00_exp(d00_exp0,t2)
    7049                 :            : #if defined(_DERIVATE)
    7050                 :            : #define d10_exp0 d00_exp0
    7051                 :            : #endif
    7052                 :            : #if defined(_DERIVATE)
    7053                 :       4956 : expvgst_Vgatep_sourcep=t2_Vgatep_sourcep*d10_exp0;
    7054                 :       4956 : expvgst_Vdrainp_sourcep=t2_Vdrainp_sourcep*d10_exp0;
    7055                 :       4956 : expvgst_Vdrainb_sourcep=t2_Vdrainb_sourcep*d10_exp0;
    7056                 :       4956 : expvgst_Vbulkp_sourcep=t2_Vbulkp_sourcep*d10_exp0;
    7057                 :       4956 : expvgst_Vsourceb_sourcep=t2_Vsourceb_sourcep*d10_exp0;
    7058                 :            : #endif
    7059                 :       4956 : expvgst=d00_exp0;
    7060                 :            : }
    7061                 :            : #if defined(_DERIVATE)
    7062                 :       4956 : t3_Vgatep_sourcep=0.0;
    7063                 :       4956 : t3_Vdrainp_sourcep=0.0;
    7064                 :       4956 : t3_Vdrainb_sourcep=0.0;
    7065                 :       4956 : t3_Vbulkp_sourcep=0.0;
    7066                 :       4956 : t3_Vsourceb_sourcep=0.0;
    7067                 :            : #endif
    7068                 :       4956 : t3=(coxe/cdep0);
    7069                 :            : #if defined(_DERIVATE)
    7070                 :       4956 : t4_Vgatep_sourcep=((t3_Vgatep_sourcep*expvgst)+(t3*expvgst_Vgatep_sourcep));
    7071                 :       4956 : t4_Vdrainp_sourcep=((t3_Vdrainp_sourcep*expvgst)+(t3*expvgst_Vdrainp_sourcep));
    7072                 :       4956 : t4_Vdrainb_sourcep=((t3_Vdrainb_sourcep*expvgst)+(t3*expvgst_Vdrainb_sourcep));
    7073                 :       4956 : t4_Vbulkp_sourcep=((t3_Vbulkp_sourcep*expvgst)+(t3*expvgst_Vbulkp_sourcep));
    7074                 :       4956 : t4_Vsourceb_sourcep=((t3_Vsourceb_sourcep*expvgst)+(t3*expvgst_Vsourceb_sourcep));
    7075                 :            : #endif
    7076                 :       4956 : t4=(t3*expvgst);
    7077                 :            : #if defined(_DERIVATE)
    7078                 :       4956 : t5_Vgatep_sourcep=((((t1_Vgatep_sourcep*t4)+(t1*t4_Vgatep_sourcep))*t0-(t1*t4)*t0_Vgatep_sourcep)/t0/t0);
    7079                 :       4956 : t5_Vdrainp_sourcep=((((t1_Vdrainp_sourcep*t4)+(t1*t4_Vdrainp_sourcep))*t0-(t1*t4)*t0_Vdrainp_sourcep)/t0/t0);
    7080                 :       4956 : t5_Vdrainb_sourcep=((((t1_Vdrainb_sourcep*t4)+(t1*t4_Vdrainb_sourcep))*t0-(t1*t4)*t0_Vdrainb_sourcep)/t0/t0);
    7081                 :       4956 : t5_Vbulkp_sourcep=((((t1_Vbulkp_sourcep*t4)+(t1*t4_Vbulkp_sourcep))*t0-(t1*t4)*t0_Vbulkp_sourcep)/t0/t0);
    7082                 :       4956 : t5_Vsourceb_sourcep=((((t1_Vsourceb_sourcep*t4)+(t1*t4_Vsourceb_sourcep))*t0-(t1*t4)*t0_Vsourceb_sourcep)/t0/t0);
    7083                 :            : #endif
    7084                 :       4956 : t5=((t1*t4)/t0);
    7085                 :            : #if defined(_DERIVATE)
    7086                 :       4956 : t9_Vgatep_sourcep=(n*t4_Vgatep_sourcep);
    7087                 :       4956 : t9_Vdrainp_sourcep=((n_Vdrainp_sourcep*t4)+(n*t4_Vdrainp_sourcep));
    7088                 :       4956 : t9_Vdrainb_sourcep=((n_Vdrainb_sourcep*t4)+(n*t4_Vdrainb_sourcep));
    7089                 :       4956 : t9_Vbulkp_sourcep=((n_Vbulkp_sourcep*t4)+(n*t4_Vbulkp_sourcep));
    7090                 :       4956 : t9_Vsourceb_sourcep=((n_Vsourceb_sourcep*t4)+(n*t4_Vsourceb_sourcep));
    7091                 :            : #endif
    7092                 :       4956 : t9=(mstar+(n*t4));
    7093                 :            : }
    7094                 :            : }
    7095                 :            : #if defined(_DERIVATE)
    7096                 :       7356 : vgsteff_Vgatep_sourcep=((t10_Vgatep_sourcep*t9-t10*t9_Vgatep_sourcep)/t9/t9);
    7097                 :       7356 : vgsteff_Vdrainp_sourcep=((t10_Vdrainp_sourcep*t9-t10*t9_Vdrainp_sourcep)/t9/t9);
    7098                 :       7356 : vgsteff_Vdrainb_sourcep=((t10_Vdrainb_sourcep*t9-t10*t9_Vdrainb_sourcep)/t9/t9);
    7099                 :       7356 : vgsteff_Vbulkp_sourcep=((t10_Vbulkp_sourcep*t9-t10*t9_Vbulkp_sourcep)/t9/t9);
    7100                 :       7356 : vgsteff_Vsourceb_sourcep=((t10_Vsourceb_sourcep*t9-t10*t9_Vsourceb_sourcep)/t9/t9);
    7101                 :            : #endif
    7102                 :       7356 : vgsteff=(t10/t9);
    7103                 :            : {
    7104                 :       7356 : double m00_sqrt(d00_sqrt0,phi)
    7105                 :            : #if defined(_DERIVATE)
    7106                 :       7356 : t9_Vgatep_sourcep=0.0;
    7107                 :       7356 : t9_Vdrainp_sourcep=sqrtphis_Vdrainp_sourcep;
    7108                 :       7356 : t9_Vdrainb_sourcep=sqrtphis_Vdrainb_sourcep;
    7109                 :       7356 : t9_Vbulkp_sourcep=sqrtphis_Vbulkp_sourcep;
    7110                 :       7356 : t9_Vsourceb_sourcep=sqrtphis_Vsourceb_sourcep;
    7111                 :            : #endif
    7112                 :       7356 : t9=(sqrtphis-d00_sqrt0);
    7113                 :            : }
    7114                 :            : #if defined(_DERIVATE)
    7115                 :       7356 : Weff_Vgatep_sourcep=(-(2.0*((dwg*vgsteff_Vgatep_sourcep)+(dwb*t9_Vgatep_sourcep))));
    7116                 :       7356 : Weff_Vdrainp_sourcep=(-(2.0*((dwg*vgsteff_Vdrainp_sourcep)+(dwb*t9_Vdrainp_sourcep))));
    7117                 :       7356 : Weff_Vdrainb_sourcep=(-(2.0*((dwg*vgsteff_Vdrainb_sourcep)+(dwb*t9_Vdrainb_sourcep))));
    7118                 :       7356 : Weff_Vbulkp_sourcep=(-(2.0*((dwg*vgsteff_Vbulkp_sourcep)+(dwb*t9_Vbulkp_sourcep))));
    7119                 :       7356 : Weff_Vsourceb_sourcep=(-(2.0*((dwg*vgsteff_Vsourceb_sourcep)+(dwb*t9_Vsourceb_sourcep))));
    7120                 :            : #endif
    7121                 :       7356 : Weff=(weff-(2.0*((dwg*vgsteff)+(dwb*t9))));
    7122         [ -  + ]:       7356 : if
    7123                 :            : (Weff<2.0e-8)
    7124                 :            : {
    7125                 :            : #if defined(_DERIVATE)
    7126                 :          0 : t0_Vgatep_sourcep=(-(-(2.0*Weff_Vgatep_sourcep))/(6.0e-8-(2.0*Weff))/(6.0e-8-(2.0*Weff)));
    7127                 :          0 : t0_Vdrainp_sourcep=(-(-(2.0*Weff_Vdrainp_sourcep))/(6.0e-8-(2.0*Weff))/(6.0e-8-(2.0*Weff)));
    7128                 :          0 : t0_Vdrainb_sourcep=(-(-(2.0*Weff_Vdrainb_sourcep))/(6.0e-8-(2.0*Weff))/(6.0e-8-(2.0*Weff)));
    7129                 :          0 : t0_Vbulkp_sourcep=(-(-(2.0*Weff_Vbulkp_sourcep))/(6.0e-8-(2.0*Weff))/(6.0e-8-(2.0*Weff)));
    7130                 :          0 : t0_Vsourceb_sourcep=(-(-(2.0*Weff_Vsourceb_sourcep))/(6.0e-8-(2.0*Weff))/(6.0e-8-(2.0*Weff)));
    7131                 :            : #endif
    7132                 :          0 : t0=(1.0/(6.0e-8-(2.0*Weff)));
    7133                 :            : #if defined(_DERIVATE)
    7134                 :          0 : Weff_Vgatep_sourcep=(((2.0e-8*(-Weff_Vgatep_sourcep))*t0)+((2.0e-8*(4.0e-8-Weff))*t0_Vgatep_sourcep));
    7135                 :          0 : Weff_Vdrainp_sourcep=(((2.0e-8*(-Weff_Vdrainp_sourcep))*t0)+((2.0e-8*(4.0e-8-Weff))*t0_Vdrainp_sourcep));
    7136                 :          0 : Weff_Vdrainb_sourcep=(((2.0e-8*(-Weff_Vdrainb_sourcep))*t0)+((2.0e-8*(4.0e-8-Weff))*t0_Vdrainb_sourcep));
    7137                 :          0 : Weff_Vbulkp_sourcep=(((2.0e-8*(-Weff_Vbulkp_sourcep))*t0)+((2.0e-8*(4.0e-8-Weff))*t0_Vbulkp_sourcep));
    7138                 :          0 : Weff_Vsourceb_sourcep=(((2.0e-8*(-Weff_Vsourceb_sourcep))*t0)+((2.0e-8*(4.0e-8-Weff))*t0_Vsourceb_sourcep));
    7139                 :            : #endif
    7140                 :          0 : Weff=((2.0e-8*(4.0e-8-Weff))*t0);
    7141                 :            : }
    7142         [ -  + ]:       7356 : if
    7143                 :            : (rdsmod==1)
    7144                 :            : {
    7145                 :            : #if defined(_DERIVATE)
    7146                 :          0 : rds_Vgatep_sourcep=0.0;
    7147                 :          0 : rds_Vdrainp_sourcep=0.0;
    7148                 :          0 : rds_Vdrainb_sourcep=0.0;
    7149                 :          0 : rds_Vbulkp_sourcep=0.0;
    7150                 :          0 : rds_Vsourceb_sourcep=0.0;
    7151                 :            : #endif
    7152                 :          0 : rds=0.0;
    7153                 :            : }
    7154                 :            : else
    7155                 :            : {
    7156                 :            : #if defined(_DERIVATE)
    7157                 :       7356 : t0_Vgatep_sourcep=(prwg*vgsteff_Vgatep_sourcep);
    7158                 :       7356 : t0_Vdrainp_sourcep=(prwg*vgsteff_Vdrainp_sourcep);
    7159                 :       7356 : t0_Vdrainb_sourcep=(prwg*vgsteff_Vdrainb_sourcep);
    7160                 :       7356 : t0_Vbulkp_sourcep=(prwg*vgsteff_Vbulkp_sourcep);
    7161                 :       7356 : t0_Vsourceb_sourcep=(prwg*vgsteff_Vsourceb_sourcep);
    7162                 :            : #endif
    7163                 :       7356 : t0=(1.0+(prwg*vgsteff));
    7164                 :            : #if defined(_DERIVATE)
    7165                 :       7356 : t1_Vgatep_sourcep=(prwb*t9_Vgatep_sourcep);
    7166                 :       7356 : t1_Vdrainp_sourcep=(prwb*t9_Vdrainp_sourcep);
    7167                 :       7356 : t1_Vdrainb_sourcep=(prwb*t9_Vdrainb_sourcep);
    7168                 :       7356 : t1_Vbulkp_sourcep=(prwb*t9_Vbulkp_sourcep);
    7169                 :       7356 : t1_Vsourceb_sourcep=(prwb*t9_Vsourceb_sourcep);
    7170                 :            : #endif
    7171                 :       7356 : t1=(prwb*t9);
    7172                 :            : #if defined(_DERIVATE)
    7173                 :       7356 : t2_Vgatep_sourcep=((-t0_Vgatep_sourcep/t0/t0)+t1_Vgatep_sourcep);
    7174                 :       7356 : t2_Vdrainp_sourcep=((-t0_Vdrainp_sourcep/t0/t0)+t1_Vdrainp_sourcep);
    7175                 :       7356 : t2_Vdrainb_sourcep=((-t0_Vdrainb_sourcep/t0/t0)+t1_Vdrainb_sourcep);
    7176                 :       7356 : t2_Vbulkp_sourcep=((-t0_Vbulkp_sourcep/t0/t0)+t1_Vbulkp_sourcep);
    7177                 :       7356 : t2_Vsourceb_sourcep=((-t0_Vsourceb_sourcep/t0/t0)+t1_Vsourceb_sourcep);
    7178                 :            : #endif
    7179                 :       7356 : t2=((1.0/t0)+t1);
    7180                 :            : {
    7181                 :       7356 : double m00_sqrt(d00_sqrt0,((t2*t2)+0.01))
    7182                 :            : #if defined(_DERIVATE)
    7183                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t2*t2)+0.01))
    7184                 :            : #endif
    7185                 :            : #if defined(_DERIVATE)
    7186                 :       7356 : t3_Vgatep_sourcep=(t2_Vgatep_sourcep+((t2_Vgatep_sourcep*t2)+(t2*t2_Vgatep_sourcep))*d10_sqrt0);
    7187                 :       7356 : t3_Vdrainp_sourcep=(t2_Vdrainp_sourcep+((t2_Vdrainp_sourcep*t2)+(t2*t2_Vdrainp_sourcep))*d10_sqrt0);
    7188                 :       7356 : t3_Vdrainb_sourcep=(t2_Vdrainb_sourcep+((t2_Vdrainb_sourcep*t2)+(t2*t2_Vdrainb_sourcep))*d10_sqrt0);
    7189                 :       7356 : t3_Vbulkp_sourcep=(t2_Vbulkp_sourcep+((t2_Vbulkp_sourcep*t2)+(t2*t2_Vbulkp_sourcep))*d10_sqrt0);
    7190                 :       7356 : t3_Vsourceb_sourcep=(t2_Vsourceb_sourcep+((t2_Vsourceb_sourcep*t2)+(t2*t2_Vsourceb_sourcep))*d10_sqrt0);
    7191                 :            : #endif
    7192                 :       7356 : t3=(t2+d00_sqrt0);
    7193                 :            : }
    7194                 :            : #if defined(_DERIVATE)
    7195                 :       7356 : t4_Vgatep_sourcep=0.0;
    7196                 :       7356 : t4_Vdrainp_sourcep=0.0;
    7197                 :       7356 : t4_Vdrainb_sourcep=0.0;
    7198                 :       7356 : t4_Vbulkp_sourcep=0.0;
    7199                 :       7356 : t4_Vsourceb_sourcep=0.0;
    7200                 :            : #endif
    7201                 :       7356 : t4=(rds0*0.5);
    7202                 :            : #if defined(_DERIVATE)
    7203                 :       7356 : rds_Vgatep_sourcep=((t3_Vgatep_sourcep*t4)+(t3*t4_Vgatep_sourcep));
    7204                 :       7356 : rds_Vdrainp_sourcep=((t3_Vdrainp_sourcep*t4)+(t3*t4_Vdrainp_sourcep));
    7205                 :       7356 : rds_Vdrainb_sourcep=((t3_Vdrainb_sourcep*t4)+(t3*t4_Vdrainb_sourcep));
    7206                 :       7356 : rds_Vbulkp_sourcep=((t3_Vbulkp_sourcep*t4)+(t3*t4_Vbulkp_sourcep));
    7207                 :       7356 : rds_Vsourceb_sourcep=((t3_Vsourceb_sourcep*t4)+(t3*t4_Vsourceb_sourcep));
    7208                 :            : #endif
    7209                 :       7356 : rds=(rdswmin+(t3*t4));
    7210                 :            : }
    7211                 :            : #if defined(_DERIVATE)
    7212                 :       7356 : t9_Vgatep_sourcep=0.0;
    7213                 :       7356 : t9_Vdrainp_sourcep=(-((0.5*k1ox)*lpe_vb)*sqrtphis_Vdrainp_sourcep/sqrtphis/sqrtphis);
    7214                 :       7356 : t9_Vdrainb_sourcep=(-((0.5*k1ox)*lpe_vb)*sqrtphis_Vdrainb_sourcep/sqrtphis/sqrtphis);
    7215                 :       7356 : t9_Vbulkp_sourcep=(-((0.5*k1ox)*lpe_vb)*sqrtphis_Vbulkp_sourcep/sqrtphis/sqrtphis);
    7216                 :       7356 : t9_Vsourceb_sourcep=(-((0.5*k1ox)*lpe_vb)*sqrtphis_Vsourceb_sourcep/sqrtphis/sqrtphis);
    7217                 :            : #endif
    7218                 :       7356 : t9=(((0.5*k1ox)*lpe_vb)/sqrtphis);
    7219                 :            : #if defined(_DERIVATE)
    7220                 :       7356 : t1_Vgatep_sourcep=t9_Vgatep_sourcep;
    7221                 :       7356 : t1_Vdrainp_sourcep=t9_Vdrainp_sourcep;
    7222                 :       7356 : t1_Vdrainb_sourcep=t9_Vdrainb_sourcep;
    7223                 :       7356 : t1_Vbulkp_sourcep=t9_Vbulkp_sourcep;
    7224                 :       7356 : t1_Vsourceb_sourcep=t9_Vsourceb_sourcep;
    7225                 :            : #endif
    7226                 :       7356 : t1=((t9+k2ox)-(k3b*vth_narroww));
    7227                 :            : {
    7228                 :       7356 : double m00_sqrt(d00_sqrt0,(xj*xdep))
    7229                 :            : #if defined(_DERIVATE)
    7230                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,(xj*xdep))
    7231                 :            : #endif
    7232                 :            : #if defined(_DERIVATE)
    7233                 :       7356 : t9_Vgatep_sourcep=0.0;
    7234                 :       7356 : t9_Vdrainp_sourcep=(xj*xdep_Vdrainp_sourcep)*d10_sqrt0;
    7235                 :       7356 : t9_Vdrainb_sourcep=(xj*xdep_Vdrainb_sourcep)*d10_sqrt0;
    7236                 :       7356 : t9_Vbulkp_sourcep=(xj*xdep_Vbulkp_sourcep)*d10_sqrt0;
    7237                 :       7356 : t9_Vsourceb_sourcep=(xj*xdep_Vsourceb_sourcep)*d10_sqrt0;
    7238                 :            : #endif
    7239                 :       7356 : t9=d00_sqrt0;
    7240                 :            : }
    7241                 :            : #if defined(_DERIVATE)
    7242                 :       7356 : tmp1_Vgatep_sourcep=(2.0*t9_Vgatep_sourcep);
    7243                 :       7356 : tmp1_Vdrainp_sourcep=(2.0*t9_Vdrainp_sourcep);
    7244                 :       7356 : tmp1_Vdrainb_sourcep=(2.0*t9_Vdrainb_sourcep);
    7245                 :       7356 : tmp1_Vbulkp_sourcep=(2.0*t9_Vbulkp_sourcep);
    7246                 :       7356 : tmp1_Vsourceb_sourcep=(2.0*t9_Vsourceb_sourcep);
    7247                 :            : #endif
    7248                 :       7356 : tmp1=(leff+(2.0*t9));
    7249                 :            : #if defined(_DERIVATE)
    7250                 :       7356 : t5_Vgatep_sourcep=(-leff*tmp1_Vgatep_sourcep/tmp1/tmp1);
    7251                 :       7356 : t5_Vdrainp_sourcep=(-leff*tmp1_Vdrainp_sourcep/tmp1/tmp1);
    7252                 :       7356 : t5_Vdrainb_sourcep=(-leff*tmp1_Vdrainb_sourcep/tmp1/tmp1);
    7253                 :       7356 : t5_Vbulkp_sourcep=(-leff*tmp1_Vbulkp_sourcep/tmp1/tmp1);
    7254                 :       7356 : t5_Vsourceb_sourcep=(-leff*tmp1_Vsourceb_sourcep/tmp1/tmp1);
    7255                 :            : #endif
    7256                 :       7356 : t5=(leff/tmp1);
    7257                 :            : #if defined(_DERIVATE)
    7258                 :       7356 : tmp2_Vgatep_sourcep=(a0*t5_Vgatep_sourcep);
    7259                 :       7356 : tmp2_Vdrainp_sourcep=(a0*t5_Vdrainp_sourcep);
    7260                 :       7356 : tmp2_Vdrainb_sourcep=(a0*t5_Vdrainb_sourcep);
    7261                 :       7356 : tmp2_Vbulkp_sourcep=(a0*t5_Vbulkp_sourcep);
    7262                 :       7356 : tmp2_Vsourceb_sourcep=(a0*t5_Vsourceb_sourcep);
    7263                 :            : #endif
    7264                 :       7356 : tmp2=(a0*t5);
    7265                 :            : #if defined(_DERIVATE)
    7266                 :       7356 : tmp3_Vgatep_sourcep=0.0;
    7267                 :       7356 : tmp3_Vdrainp_sourcep=0.0;
    7268                 :       7356 : tmp3_Vdrainb_sourcep=0.0;
    7269                 :       7356 : tmp3_Vbulkp_sourcep=0.0;
    7270                 :       7356 : tmp3_Vsourceb_sourcep=0.0;
    7271                 :            : #endif
    7272                 :       7356 : tmp3=(weff+b1);
    7273                 :            : #if defined(_DERIVATE)
    7274                 :       7356 : tmp4_Vgatep_sourcep=0.0;
    7275                 :       7356 : tmp4_Vdrainp_sourcep=(-b0*tmp3_Vdrainp_sourcep/tmp3/tmp3);
    7276                 :       7356 : tmp4_Vdrainb_sourcep=(-b0*tmp3_Vdrainb_sourcep/tmp3/tmp3);
    7277                 :       7356 : tmp4_Vbulkp_sourcep=(-b0*tmp3_Vbulkp_sourcep/tmp3/tmp3);
    7278                 :       7356 : tmp4_Vsourceb_sourcep=(-b0*tmp3_Vsourceb_sourcep/tmp3/tmp3);
    7279                 :            : #endif
    7280                 :       7356 : tmp4=(b0/tmp3);
    7281                 :            : #if defined(_DERIVATE)
    7282                 :       7356 : t2_Vgatep_sourcep=(tmp2_Vgatep_sourcep+tmp4_Vgatep_sourcep);
    7283                 :       7356 : t2_Vdrainp_sourcep=(tmp2_Vdrainp_sourcep+tmp4_Vdrainp_sourcep);
    7284                 :       7356 : t2_Vdrainb_sourcep=(tmp2_Vdrainb_sourcep+tmp4_Vdrainb_sourcep);
    7285                 :       7356 : t2_Vbulkp_sourcep=(tmp2_Vbulkp_sourcep+tmp4_Vbulkp_sourcep);
    7286                 :       7356 : t2_Vsourceb_sourcep=(tmp2_Vsourceb_sourcep+tmp4_Vsourceb_sourcep);
    7287                 :            : #endif
    7288                 :       7356 : t2=(tmp2+tmp4);
    7289                 :            : #if defined(_DERIVATE)
    7290                 :       7356 : t6_Vgatep_sourcep=((t5_Vgatep_sourcep*t5)+(t5*t5_Vgatep_sourcep));
    7291                 :       7356 : t6_Vdrainp_sourcep=((t5_Vdrainp_sourcep*t5)+(t5*t5_Vdrainp_sourcep));
    7292                 :       7356 : t6_Vdrainb_sourcep=((t5_Vdrainb_sourcep*t5)+(t5*t5_Vdrainb_sourcep));
    7293                 :       7356 : t6_Vbulkp_sourcep=((t5_Vbulkp_sourcep*t5)+(t5*t5_Vbulkp_sourcep));
    7294                 :       7356 : t6_Vsourceb_sourcep=((t5_Vsourceb_sourcep*t5)+(t5*t5_Vsourceb_sourcep));
    7295                 :            : #endif
    7296                 :       7356 : t6=(t5*t5);
    7297                 :            : #if defined(_DERIVATE)
    7298                 :       7356 : t7_Vgatep_sourcep=((t5_Vgatep_sourcep*t6)+(t5*t6_Vgatep_sourcep));
    7299                 :       7356 : t7_Vdrainp_sourcep=((t5_Vdrainp_sourcep*t6)+(t5*t6_Vdrainp_sourcep));
    7300                 :       7356 : t7_Vdrainb_sourcep=((t5_Vdrainb_sourcep*t6)+(t5*t6_Vdrainb_sourcep));
    7301                 :       7356 : t7_Vbulkp_sourcep=((t5_Vbulkp_sourcep*t6)+(t5*t6_Vbulkp_sourcep));
    7302                 :       7356 : t7_Vsourceb_sourcep=((t5_Vsourceb_sourcep*t6)+(t5*t6_Vsourceb_sourcep));
    7303                 :            : #endif
    7304                 :       7356 : t7=(t5*t6);
    7305                 :            : #if defined(_DERIVATE)
    7306                 :       7356 : abulk0_Vgatep_sourcep=((t1_Vgatep_sourcep*t2)+(t1*t2_Vgatep_sourcep));
    7307                 :       7356 : abulk0_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t2)+(t1*t2_Vdrainp_sourcep));
    7308                 :       7356 : abulk0_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t2)+(t1*t2_Vdrainb_sourcep));
    7309                 :       7356 : abulk0_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t2)+(t1*t2_Vbulkp_sourcep));
    7310                 :       7356 : abulk0_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t2)+(t1*t2_Vsourceb_sourcep));
    7311                 :            : #endif
    7312                 :       7356 : abulk0=(1.0+(t1*t2));
    7313                 :            : #if defined(_DERIVATE)
    7314                 :       7356 : t8_Vgatep_sourcep=((ags*a0)*t7_Vgatep_sourcep);
    7315                 :       7356 : t8_Vdrainp_sourcep=((ags*a0)*t7_Vdrainp_sourcep);
    7316                 :       7356 : t8_Vdrainb_sourcep=((ags*a0)*t7_Vdrainb_sourcep);
    7317                 :       7356 : t8_Vbulkp_sourcep=((ags*a0)*t7_Vbulkp_sourcep);
    7318                 :       7356 : t8_Vsourceb_sourcep=((ags*a0)*t7_Vsourceb_sourcep);
    7319                 :            : #endif
    7320                 :       7356 : t8=((ags*a0)*t7);
    7321                 :            : #if defined(_DERIVATE)
    7322                 :       7356 : dabulk_dvg_Vgatep_sourcep=(((-t1_Vgatep_sourcep)*t8)+((-t1)*t8_Vgatep_sourcep));
    7323                 :       7356 : dabulk_dvg_Vdrainp_sourcep=(((-t1_Vdrainp_sourcep)*t8)+((-t1)*t8_Vdrainp_sourcep));
    7324                 :       7356 : dabulk_dvg_Vdrainb_sourcep=(((-t1_Vdrainb_sourcep)*t8)+((-t1)*t8_Vdrainb_sourcep));
    7325                 :       7356 : dabulk_dvg_Vbulkp_sourcep=(((-t1_Vbulkp_sourcep)*t8)+((-t1)*t8_Vbulkp_sourcep));
    7326                 :       7356 : dabulk_dvg_Vsourceb_sourcep=(((-t1_Vsourceb_sourcep)*t8)+((-t1)*t8_Vsourceb_sourcep));
    7327                 :            : #endif
    7328                 :       7356 : dabulk_dvg=((-t1)*t8);
    7329                 :            : #if defined(_DERIVATE)
    7330                 :       7356 : abulk_Vgatep_sourcep=(abulk0_Vgatep_sourcep+((dabulk_dvg_Vgatep_sourcep*vgsteff)+(dabulk_dvg*vgsteff_Vgatep_sourcep)));
    7331                 :       7356 : abulk_Vdrainp_sourcep=(abulk0_Vdrainp_sourcep+((dabulk_dvg_Vdrainp_sourcep*vgsteff)+(dabulk_dvg*vgsteff_Vdrainp_sourcep)));
    7332                 :       7356 : abulk_Vdrainb_sourcep=(abulk0_Vdrainb_sourcep+((dabulk_dvg_Vdrainb_sourcep*vgsteff)+(dabulk_dvg*vgsteff_Vdrainb_sourcep)));
    7333                 :       7356 : abulk_Vbulkp_sourcep=(abulk0_Vbulkp_sourcep+((dabulk_dvg_Vbulkp_sourcep*vgsteff)+(dabulk_dvg*vgsteff_Vbulkp_sourcep)));
    7334                 :       7356 : abulk_Vsourceb_sourcep=(abulk0_Vsourceb_sourcep+((dabulk_dvg_Vsourceb_sourcep*vgsteff)+(dabulk_dvg*vgsteff_Vsourceb_sourcep)));
    7335                 :            : #endif
    7336                 :       7356 : abulk=(abulk0+(dabulk_dvg*vgsteff));
    7337         [ -  + ]:       7356 : if
    7338                 :            : (abulk0<0.1)
    7339                 :            : {
    7340                 :            : #if defined(_DERIVATE)
    7341                 :          0 : t9_Vgatep_sourcep=(-(-(20.0*abulk0_Vgatep_sourcep))/(3.0-(20.0*abulk0))/(3.0-(20.0*abulk0)));
    7342                 :          0 : t9_Vdrainp_sourcep=(-(-(20.0*abulk0_Vdrainp_sourcep))/(3.0-(20.0*abulk0))/(3.0-(20.0*abulk0)));
    7343                 :          0 : t9_Vdrainb_sourcep=(-(-(20.0*abulk0_Vdrainb_sourcep))/(3.0-(20.0*abulk0))/(3.0-(20.0*abulk0)));
    7344                 :          0 : t9_Vbulkp_sourcep=(-(-(20.0*abulk0_Vbulkp_sourcep))/(3.0-(20.0*abulk0))/(3.0-(20.0*abulk0)));
    7345                 :          0 : t9_Vsourceb_sourcep=(-(-(20.0*abulk0_Vsourceb_sourcep))/(3.0-(20.0*abulk0))/(3.0-(20.0*abulk0)));
    7346                 :            : #endif
    7347                 :          0 : t9=(1.0/(3.0-(20.0*abulk0)));
    7348                 :            : #if defined(_DERIVATE)
    7349                 :          0 : abulk0_Vgatep_sourcep=(((-abulk0_Vgatep_sourcep)*t9)+((0.2-abulk0)*t9_Vgatep_sourcep));
    7350                 :          0 : abulk0_Vdrainp_sourcep=(((-abulk0_Vdrainp_sourcep)*t9)+((0.2-abulk0)*t9_Vdrainp_sourcep));
    7351                 :          0 : abulk0_Vdrainb_sourcep=(((-abulk0_Vdrainb_sourcep)*t9)+((0.2-abulk0)*t9_Vdrainb_sourcep));
    7352                 :          0 : abulk0_Vbulkp_sourcep=(((-abulk0_Vbulkp_sourcep)*t9)+((0.2-abulk0)*t9_Vbulkp_sourcep));
    7353                 :          0 : abulk0_Vsourceb_sourcep=(((-abulk0_Vsourceb_sourcep)*t9)+((0.2-abulk0)*t9_Vsourceb_sourcep));
    7354                 :            : #endif
    7355                 :          0 : abulk0=((0.2-abulk0)*t9);
    7356                 :            : }
    7357         [ -  + ]:       7356 : if
    7358                 :            : (abulk<0.1)
    7359                 :            : {
    7360                 :            : #if defined(_DERIVATE)
    7361                 :          0 : t9_Vgatep_sourcep=(-(-(20.0*abulk_Vgatep_sourcep))/(3.0-(20.0*abulk))/(3.0-(20.0*abulk)));
    7362                 :          0 : t9_Vdrainp_sourcep=(-(-(20.0*abulk_Vdrainp_sourcep))/(3.0-(20.0*abulk))/(3.0-(20.0*abulk)));
    7363                 :          0 : t9_Vdrainb_sourcep=(-(-(20.0*abulk_Vdrainb_sourcep))/(3.0-(20.0*abulk))/(3.0-(20.0*abulk)));
    7364                 :          0 : t9_Vbulkp_sourcep=(-(-(20.0*abulk_Vbulkp_sourcep))/(3.0-(20.0*abulk))/(3.0-(20.0*abulk)));
    7365                 :          0 : t9_Vsourceb_sourcep=(-(-(20.0*abulk_Vsourceb_sourcep))/(3.0-(20.0*abulk))/(3.0-(20.0*abulk)));
    7366                 :            : #endif
    7367                 :          0 : t9=(1.0/(3.0-(20.0*abulk)));
    7368                 :            : #if defined(_DERIVATE)
    7369                 :          0 : abulk_Vgatep_sourcep=(((-abulk_Vgatep_sourcep)*t9)+((0.2-abulk)*t9_Vgatep_sourcep));
    7370                 :          0 : abulk_Vdrainp_sourcep=(((-abulk_Vdrainp_sourcep)*t9)+((0.2-abulk)*t9_Vdrainp_sourcep));
    7371                 :          0 : abulk_Vdrainb_sourcep=(((-abulk_Vdrainb_sourcep)*t9)+((0.2-abulk)*t9_Vdrainb_sourcep));
    7372                 :          0 : abulk_Vbulkp_sourcep=(((-abulk_Vbulkp_sourcep)*t9)+((0.2-abulk)*t9_Vbulkp_sourcep));
    7373                 :          0 : abulk_Vsourceb_sourcep=(((-abulk_Vsourceb_sourcep)*t9)+((0.2-abulk)*t9_Vsourceb_sourcep));
    7374                 :            : #endif
    7375                 :          0 : abulk=((0.2-abulk)*t9);
    7376                 :            : }
    7377                 :            : #if defined(_DERIVATE)
    7378                 :       7356 : t2_Vgatep_sourcep=0.0;
    7379                 :       7356 : t2_Vdrainp_sourcep=(keta*vbseff_Vdrainp_sourcep);
    7380                 :       7356 : t2_Vdrainb_sourcep=(keta*vbseff_Vdrainb_sourcep);
    7381                 :       7356 : t2_Vbulkp_sourcep=(keta*vbseff_Vbulkp_sourcep);
    7382                 :       7356 : t2_Vsourceb_sourcep=(keta*vbseff_Vsourceb_sourcep);
    7383                 :            : #endif
    7384                 :       7356 : t2=(keta*vbseff);
    7385         [ +  - ]:       7356 : if
    7386                 :            : (t2>=(-0.9))
    7387                 :            : {
    7388                 :            : #if defined(_DERIVATE)
    7389                 :       7356 : t0_Vgatep_sourcep=(-t2_Vgatep_sourcep/(1.0+t2)/(1.0+t2));
    7390                 :       7356 : t0_Vdrainp_sourcep=(-t2_Vdrainp_sourcep/(1.0+t2)/(1.0+t2));
    7391                 :       7356 : t0_Vdrainb_sourcep=(-t2_Vdrainb_sourcep/(1.0+t2)/(1.0+t2));
    7392                 :       7356 : t0_Vbulkp_sourcep=(-t2_Vbulkp_sourcep/(1.0+t2)/(1.0+t2));
    7393                 :       7356 : t0_Vsourceb_sourcep=(-t2_Vsourceb_sourcep/(1.0+t2)/(1.0+t2));
    7394                 :            : #endif
    7395                 :       7356 : t0=(1.0/(1.0+t2));
    7396                 :            : }
    7397                 :            : else
    7398                 :            : {
    7399                 :            : #if defined(_DERIVATE)
    7400                 :          0 : t1_Vgatep_sourcep=(-t2_Vgatep_sourcep/(0.8+t2)/(0.8+t2));
    7401                 :          0 : t1_Vdrainp_sourcep=(-t2_Vdrainp_sourcep/(0.8+t2)/(0.8+t2));
    7402                 :          0 : t1_Vdrainb_sourcep=(-t2_Vdrainb_sourcep/(0.8+t2)/(0.8+t2));
    7403                 :          0 : t1_Vbulkp_sourcep=(-t2_Vbulkp_sourcep/(0.8+t2)/(0.8+t2));
    7404                 :          0 : t1_Vsourceb_sourcep=(-t2_Vsourceb_sourcep/(0.8+t2)/(0.8+t2));
    7405                 :            : #endif
    7406                 :          0 : t1=(1.0/(0.8+t2));
    7407                 :            : #if defined(_DERIVATE)
    7408                 :          0 : t0_Vgatep_sourcep=(((20.0*t2_Vgatep_sourcep)*t1)+((17.0+(20.0*t2))*t1_Vgatep_sourcep));
    7409                 :          0 : t0_Vdrainp_sourcep=(((20.0*t2_Vdrainp_sourcep)*t1)+((17.0+(20.0*t2))*t1_Vdrainp_sourcep));
    7410                 :          0 : t0_Vdrainb_sourcep=(((20.0*t2_Vdrainb_sourcep)*t1)+((17.0+(20.0*t2))*t1_Vdrainb_sourcep));
    7411                 :          0 : t0_Vbulkp_sourcep=(((20.0*t2_Vbulkp_sourcep)*t1)+((17.0+(20.0*t2))*t1_Vbulkp_sourcep));
    7412                 :          0 : t0_Vsourceb_sourcep=(((20.0*t2_Vsourceb_sourcep)*t1)+((17.0+(20.0*t2))*t1_Vsourceb_sourcep));
    7413                 :            : #endif
    7414                 :          0 : t0=((17.0+(20.0*t2))*t1);
    7415                 :            : }
    7416                 :            : #if defined(_DERIVATE)
    7417                 :       7356 : abulk_Vgatep_sourcep=((abulk_Vgatep_sourcep*t0)+(abulk*t0_Vgatep_sourcep));
    7418                 :       7356 : abulk_Vdrainp_sourcep=((abulk_Vdrainp_sourcep*t0)+(abulk*t0_Vdrainp_sourcep));
    7419                 :       7356 : abulk_Vdrainb_sourcep=((abulk_Vdrainb_sourcep*t0)+(abulk*t0_Vdrainb_sourcep));
    7420                 :       7356 : abulk_Vbulkp_sourcep=((abulk_Vbulkp_sourcep*t0)+(abulk*t0_Vbulkp_sourcep));
    7421                 :       7356 : abulk_Vsourceb_sourcep=((abulk_Vsourceb_sourcep*t0)+(abulk*t0_Vsourceb_sourcep));
    7422                 :            : #endif
    7423                 :       7356 : abulk=(abulk*t0);
    7424                 :            : #if defined(_DERIVATE)
    7425                 :       7356 : abulk0_Vgatep_sourcep=((abulk0_Vgatep_sourcep*t0)+(abulk0*t0_Vgatep_sourcep));
    7426                 :       7356 : abulk0_Vdrainp_sourcep=((abulk0_Vdrainp_sourcep*t0)+(abulk0*t0_Vdrainp_sourcep));
    7427                 :       7356 : abulk0_Vdrainb_sourcep=((abulk0_Vdrainb_sourcep*t0)+(abulk0*t0_Vdrainb_sourcep));
    7428                 :       7356 : abulk0_Vbulkp_sourcep=((abulk0_Vbulkp_sourcep*t0)+(abulk0*t0_Vbulkp_sourcep));
    7429                 :       7356 : abulk0_Vsourceb_sourcep=((abulk0_Vsourceb_sourcep*t0)+(abulk0*t0_Vsourceb_sourcep));
    7430                 :            : #endif
    7431                 :       7356 : abulk0=(abulk0*t0);
    7432         [ +  - ]:       7356 : if
    7433                 :            : (mobmod==0)
    7434                 :            : {
    7435                 :            : #if defined(_DERIVATE)
    7436                 :       7356 : t0_Vgatep_sourcep=vgsteff_Vgatep_sourcep;
    7437                 :       7356 : t0_Vdrainp_sourcep=((vgsteff_Vdrainp_sourcep+vth_Vdrainp_sourcep)+vth_Vdrainp_sourcep);
    7438                 :       7356 : t0_Vdrainb_sourcep=((vgsteff_Vdrainb_sourcep+vth_Vdrainb_sourcep)+vth_Vdrainb_sourcep);
    7439                 :       7356 : t0_Vbulkp_sourcep=((vgsteff_Vbulkp_sourcep+vth_Vbulkp_sourcep)+vth_Vbulkp_sourcep);
    7440                 :       7356 : t0_Vsourceb_sourcep=((vgsteff_Vsourceb_sourcep+vth_Vsourceb_sourcep)+vth_Vsourceb_sourcep);
    7441                 :            : #endif
    7442                 :       7356 : t0=((vgsteff+vth)+vth);
    7443                 :            : #if defined(_DERIVATE)
    7444                 :       7356 : t2_Vgatep_sourcep=0.0;
    7445                 :       7356 : t2_Vdrainp_sourcep=(uc*vbseff_Vdrainp_sourcep);
    7446                 :       7356 : t2_Vdrainb_sourcep=(uc*vbseff_Vdrainb_sourcep);
    7447                 :       7356 : t2_Vbulkp_sourcep=(uc*vbseff_Vbulkp_sourcep);
    7448                 :       7356 : t2_Vsourceb_sourcep=(uc*vbseff_Vsourceb_sourcep);
    7449                 :            : #endif
    7450                 :       7356 : t2=(ua+(uc*vbseff));
    7451                 :            : #if defined(_DERIVATE)
    7452                 :       7356 : t3_Vgatep_sourcep=(t0_Vgatep_sourcep/toxe);
    7453                 :       7356 : t3_Vdrainp_sourcep=(t0_Vdrainp_sourcep/toxe);
    7454                 :       7356 : t3_Vdrainb_sourcep=(t0_Vdrainb_sourcep/toxe);
    7455                 :       7356 : t3_Vbulkp_sourcep=(t0_Vbulkp_sourcep/toxe);
    7456                 :       7356 : t3_Vsourceb_sourcep=(t0_Vsourceb_sourcep/toxe);
    7457                 :            : #endif
    7458                 :       7356 : t3=(t0/toxe);
    7459                 :            : #if defined(_DERIVATE)
    7460                 :       7356 : t5_Vgatep_sourcep=((t3_Vgatep_sourcep*(t2+(ub*t3)))+(t3*(t2_Vgatep_sourcep+(ub*t3_Vgatep_sourcep))));
    7461                 :       7356 : t5_Vdrainp_sourcep=((t3_Vdrainp_sourcep*(t2+(ub*t3)))+(t3*(t2_Vdrainp_sourcep+(ub*t3_Vdrainp_sourcep))));
    7462                 :       7356 : t5_Vdrainb_sourcep=((t3_Vdrainb_sourcep*(t2+(ub*t3)))+(t3*(t2_Vdrainb_sourcep+(ub*t3_Vdrainb_sourcep))));
    7463                 :       7356 : t5_Vbulkp_sourcep=((t3_Vbulkp_sourcep*(t2+(ub*t3)))+(t3*(t2_Vbulkp_sourcep+(ub*t3_Vbulkp_sourcep))));
    7464                 :       7356 : t5_Vsourceb_sourcep=((t3_Vsourceb_sourcep*(t2+(ub*t3)))+(t3*(t2_Vsourceb_sourcep+(ub*t3_Vsourceb_sourcep))));
    7465                 :            : #endif
    7466                 :       7356 : t5=(t3*(t2+(ub*t3)));
    7467                 :            : }
    7468                 :            : else
    7469                 :            : {
    7470         [ #  # ]:          0 : if
    7471                 :            : (mobmod==1)
    7472                 :            : {
    7473                 :            : #if defined(_DERIVATE)
    7474                 :          0 : t0_Vgatep_sourcep=vgsteff_Vgatep_sourcep;
    7475                 :          0 : t0_Vdrainp_sourcep=((vgsteff_Vdrainp_sourcep+vth_Vdrainp_sourcep)+vth_Vdrainp_sourcep);
    7476                 :          0 : t0_Vdrainb_sourcep=((vgsteff_Vdrainb_sourcep+vth_Vdrainb_sourcep)+vth_Vdrainb_sourcep);
    7477                 :          0 : t0_Vbulkp_sourcep=((vgsteff_Vbulkp_sourcep+vth_Vbulkp_sourcep)+vth_Vbulkp_sourcep);
    7478                 :          0 : t0_Vsourceb_sourcep=((vgsteff_Vsourceb_sourcep+vth_Vsourceb_sourcep)+vth_Vsourceb_sourcep);
    7479                 :            : #endif
    7480                 :          0 : t0=((vgsteff+vth)+vth);
    7481                 :            : #if defined(_DERIVATE)
    7482                 :          0 : t2_Vgatep_sourcep=0.0;
    7483                 :          0 : t2_Vdrainp_sourcep=(uc*vbseff_Vdrainp_sourcep);
    7484                 :          0 : t2_Vdrainb_sourcep=(uc*vbseff_Vdrainb_sourcep);
    7485                 :          0 : t2_Vbulkp_sourcep=(uc*vbseff_Vbulkp_sourcep);
    7486                 :          0 : t2_Vsourceb_sourcep=(uc*vbseff_Vsourceb_sourcep);
    7487                 :            : #endif
    7488                 :          0 : t2=(1.0+(uc*vbseff));
    7489                 :            : #if defined(_DERIVATE)
    7490                 :          0 : t3_Vgatep_sourcep=(t0_Vgatep_sourcep/toxe);
    7491                 :          0 : t3_Vdrainp_sourcep=(t0_Vdrainp_sourcep/toxe);
    7492                 :          0 : t3_Vdrainb_sourcep=(t0_Vdrainb_sourcep/toxe);
    7493                 :          0 : t3_Vbulkp_sourcep=(t0_Vbulkp_sourcep/toxe);
    7494                 :          0 : t3_Vsourceb_sourcep=(t0_Vsourceb_sourcep/toxe);
    7495                 :            : #endif
    7496                 :          0 : t3=(t0/toxe);
    7497                 :            : #if defined(_DERIVATE)
    7498                 :          0 : t4_Vgatep_sourcep=((t3_Vgatep_sourcep*(ua+(ub*t3)))+(t3*(ub*t3_Vgatep_sourcep)));
    7499                 :          0 : t4_Vdrainp_sourcep=((t3_Vdrainp_sourcep*(ua+(ub*t3)))+(t3*(ub*t3_Vdrainp_sourcep)));
    7500                 :          0 : t4_Vdrainb_sourcep=((t3_Vdrainb_sourcep*(ua+(ub*t3)))+(t3*(ub*t3_Vdrainb_sourcep)));
    7501                 :          0 : t4_Vbulkp_sourcep=((t3_Vbulkp_sourcep*(ua+(ub*t3)))+(t3*(ub*t3_Vbulkp_sourcep)));
    7502                 :          0 : t4_Vsourceb_sourcep=((t3_Vsourceb_sourcep*(ua+(ub*t3)))+(t3*(ub*t3_Vsourceb_sourcep)));
    7503                 :            : #endif
    7504                 :          0 : t4=(t3*(ua+(ub*t3)));
    7505                 :            : #if defined(_DERIVATE)
    7506                 :          0 : t5_Vgatep_sourcep=((t4_Vgatep_sourcep*t2)+(t4*t2_Vgatep_sourcep));
    7507                 :          0 : t5_Vdrainp_sourcep=((t4_Vdrainp_sourcep*t2)+(t4*t2_Vdrainp_sourcep));
    7508                 :          0 : t5_Vdrainb_sourcep=((t4_Vdrainb_sourcep*t2)+(t4*t2_Vdrainb_sourcep));
    7509                 :          0 : t5_Vbulkp_sourcep=((t4_Vbulkp_sourcep*t2)+(t4*t2_Vbulkp_sourcep));
    7510                 :          0 : t5_Vsourceb_sourcep=((t4_Vsourceb_sourcep*t2)+(t4*t2_Vsourceb_sourcep));
    7511                 :            : #endif
    7512                 :          0 : t5=(t4*t2);
    7513                 :            : }
    7514                 :            : else
    7515                 :            : {
    7516                 :            : #if defined(_DERIVATE)
    7517                 :          0 : t0_Vgatep_sourcep=(vgsteff_Vgatep_sourcep/toxe);
    7518                 :          0 : t0_Vdrainp_sourcep=(vgsteff_Vdrainp_sourcep/toxe);
    7519                 :          0 : t0_Vdrainb_sourcep=(vgsteff_Vdrainb_sourcep/toxe);
    7520                 :          0 : t0_Vbulkp_sourcep=(vgsteff_Vbulkp_sourcep/toxe);
    7521                 :          0 : t0_Vsourceb_sourcep=(vgsteff_Vsourceb_sourcep/toxe);
    7522                 :            : #endif
    7523                 :          0 : t0=((vgsteff+vtfbphi1)/toxe);
    7524                 :            : {
    7525                 :          0 : double m00_logE(d00_logE0,t0)
    7526                 :          0 : double m00_exp(d00_exp1,(eu*d00_logE0))
    7527                 :            : #if defined(_DERIVATE)
    7528                 :          0 : double m10_logE(d10_logE0,d00_logE0,t0)
    7529                 :            : #define d10_exp1 d00_exp1
    7530                 :            : #endif
    7531                 :            : #if defined(_DERIVATE)
    7532                 :          0 : t1_Vgatep_sourcep=(eu*t0_Vgatep_sourcep*d10_logE0)*d10_exp1;
    7533                 :          0 : t1_Vdrainp_sourcep=(eu*t0_Vdrainp_sourcep*d10_logE0)*d10_exp1;
    7534                 :          0 : t1_Vdrainb_sourcep=(eu*t0_Vdrainb_sourcep*d10_logE0)*d10_exp1;
    7535                 :          0 : t1_Vbulkp_sourcep=(eu*t0_Vbulkp_sourcep*d10_logE0)*d10_exp1;
    7536                 :          0 : t1_Vsourceb_sourcep=(eu*t0_Vsourceb_sourcep*d10_logE0)*d10_exp1;
    7537                 :            : #endif
    7538                 :          0 : t1=d00_exp1;
    7539                 :            : }
    7540                 :            : #if defined(_DERIVATE)
    7541                 :          0 : t2_Vgatep_sourcep=0.0;
    7542                 :          0 : t2_Vdrainp_sourcep=(uc*vbseff_Vdrainp_sourcep);
    7543                 :          0 : t2_Vdrainb_sourcep=(uc*vbseff_Vdrainb_sourcep);
    7544                 :          0 : t2_Vbulkp_sourcep=(uc*vbseff_Vbulkp_sourcep);
    7545                 :          0 : t2_Vsourceb_sourcep=(uc*vbseff_Vsourceb_sourcep);
    7546                 :            : #endif
    7547                 :          0 : t2=(ua+(uc*vbseff));
    7548                 :            : #if defined(_DERIVATE)
    7549                 :          0 : t5_Vgatep_sourcep=((t1_Vgatep_sourcep*t2)+(t1*t2_Vgatep_sourcep));
    7550                 :          0 : t5_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t2)+(t1*t2_Vdrainp_sourcep));
    7551                 :          0 : t5_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t2)+(t1*t2_Vdrainb_sourcep));
    7552                 :          0 : t5_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t2)+(t1*t2_Vbulkp_sourcep));
    7553                 :          0 : t5_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t2)+(t1*t2_Vsourceb_sourcep));
    7554                 :            : #endif
    7555                 :          0 : t5=(t1*t2);
    7556                 :            : }
    7557                 :            : }
    7558         [ +  - ]:       7356 : if
    7559                 :            : (t5>=(-0.8))
    7560                 :            : {
    7561                 :            : #if defined(_DERIVATE)
    7562                 :       7356 : denomi_Vgatep_sourcep=t5_Vgatep_sourcep;
    7563                 :       7356 : denomi_Vdrainp_sourcep=t5_Vdrainp_sourcep;
    7564                 :       7356 : denomi_Vdrainb_sourcep=t5_Vdrainb_sourcep;
    7565                 :       7356 : denomi_Vbulkp_sourcep=t5_Vbulkp_sourcep;
    7566                 :       7356 : denomi_Vsourceb_sourcep=t5_Vsourceb_sourcep;
    7567                 :            : #endif
    7568                 :       7356 : denomi=(1.0+t5);
    7569                 :            : }
    7570                 :            : else
    7571                 :            : {
    7572                 :            : #if defined(_DERIVATE)
    7573                 :          0 : t9_Vgatep_sourcep=(-(10.0*t5_Vgatep_sourcep)/(7.0+(10.0*t5))/(7.0+(10.0*t5)));
    7574                 :          0 : t9_Vdrainp_sourcep=(-(10.0*t5_Vdrainp_sourcep)/(7.0+(10.0*t5))/(7.0+(10.0*t5)));
    7575                 :          0 : t9_Vdrainb_sourcep=(-(10.0*t5_Vdrainb_sourcep)/(7.0+(10.0*t5))/(7.0+(10.0*t5)));
    7576                 :          0 : t9_Vbulkp_sourcep=(-(10.0*t5_Vbulkp_sourcep)/(7.0+(10.0*t5))/(7.0+(10.0*t5)));
    7577                 :          0 : t9_Vsourceb_sourcep=(-(10.0*t5_Vsourceb_sourcep)/(7.0+(10.0*t5))/(7.0+(10.0*t5)));
    7578                 :            : #endif
    7579                 :          0 : t9=(1.0/(7.0+(10.0*t5)));
    7580                 :            : #if defined(_DERIVATE)
    7581                 :          0 : denomi_Vgatep_sourcep=((t5_Vgatep_sourcep*t9)+((0.6+t5)*t9_Vgatep_sourcep));
    7582                 :          0 : denomi_Vdrainp_sourcep=((t5_Vdrainp_sourcep*t9)+((0.6+t5)*t9_Vdrainp_sourcep));
    7583                 :          0 : denomi_Vdrainb_sourcep=((t5_Vdrainb_sourcep*t9)+((0.6+t5)*t9_Vdrainb_sourcep));
    7584                 :          0 : denomi_Vbulkp_sourcep=((t5_Vbulkp_sourcep*t9)+((0.6+t5)*t9_Vbulkp_sourcep));
    7585                 :          0 : denomi_Vsourceb_sourcep=((t5_Vsourceb_sourcep*t9)+((0.6+t5)*t9_Vsourceb_sourcep));
    7586                 :            : #endif
    7587                 :          0 : denomi=((0.6+t5)*t9);
    7588                 :            : }
    7589                 :            : #if defined(_DERIVATE)
    7590                 :       7356 : ueff_Vgatep_sourcep=(-u0temp*denomi_Vgatep_sourcep/denomi/denomi);
    7591                 :       7356 : ueff_Vdrainp_sourcep=(-u0temp*denomi_Vdrainp_sourcep/denomi/denomi);
    7592                 :       7356 : ueff_Vdrainb_sourcep=(-u0temp*denomi_Vdrainb_sourcep/denomi/denomi);
    7593                 :       7356 : ueff_Vbulkp_sourcep=(-u0temp*denomi_Vbulkp_sourcep/denomi/denomi);
    7594                 :       7356 : ueff_Vsourceb_sourcep=(-u0temp*denomi_Vsourceb_sourcep/denomi/denomi);
    7595                 :            : #endif
    7596                 :       7356 : ueff=(u0temp/denomi);
    7597                 :            : #if defined(_DERIVATE)
    7598                 :       7356 : wvcox_Vgatep_sourcep=Weff_Vgatep_sourcep*vsattemp*coxe;
    7599                 :       7356 : wvcox_Vdrainp_sourcep=Weff_Vdrainp_sourcep*vsattemp*coxe;
    7600                 :       7356 : wvcox_Vdrainb_sourcep=Weff_Vdrainb_sourcep*vsattemp*coxe;
    7601                 :       7356 : wvcox_Vbulkp_sourcep=Weff_Vbulkp_sourcep*vsattemp*coxe;
    7602                 :       7356 : wvcox_Vsourceb_sourcep=Weff_Vsourceb_sourcep*vsattemp*coxe;
    7603                 :            : #endif
    7604                 :       7356 : wvcox=((Weff*vsattemp)*coxe);
    7605                 :            : #if defined(_DERIVATE)
    7606                 :       7356 : wvcoxrds_Vgatep_sourcep=((wvcox_Vgatep_sourcep*rds)+(wvcox*rds_Vgatep_sourcep));
    7607                 :       7356 : wvcoxrds_Vdrainp_sourcep=((wvcox_Vdrainp_sourcep*rds)+(wvcox*rds_Vdrainp_sourcep));
    7608                 :       7356 : wvcoxrds_Vdrainb_sourcep=((wvcox_Vdrainb_sourcep*rds)+(wvcox*rds_Vdrainb_sourcep));
    7609                 :       7356 : wvcoxrds_Vbulkp_sourcep=((wvcox_Vbulkp_sourcep*rds)+(wvcox*rds_Vbulkp_sourcep));
    7610                 :       7356 : wvcoxrds_Vsourceb_sourcep=((wvcox_Vsourceb_sourcep*rds)+(wvcox*rds_Vsourceb_sourcep));
    7611                 :            : #endif
    7612                 :       7356 : wvcoxrds=(wvcox*rds);
    7613                 :            : #if defined(_DERIVATE)
    7614                 :       7356 : esat_Vgatep_sourcep=(-(2.0*vsattemp)*ueff_Vgatep_sourcep/ueff/ueff);
    7615                 :       7356 : esat_Vdrainp_sourcep=(-(2.0*vsattemp)*ueff_Vdrainp_sourcep/ueff/ueff);
    7616                 :       7356 : esat_Vdrainb_sourcep=(-(2.0*vsattemp)*ueff_Vdrainb_sourcep/ueff/ueff);
    7617                 :       7356 : esat_Vbulkp_sourcep=(-(2.0*vsattemp)*ueff_Vbulkp_sourcep/ueff/ueff);
    7618                 :       7356 : esat_Vsourceb_sourcep=(-(2.0*vsattemp)*ueff_Vsourceb_sourcep/ueff/ueff);
    7619                 :            : #endif
    7620                 :       7356 : esat=((2.0*vsattemp)/ueff);
    7621                 :            : #if defined(_DERIVATE)
    7622                 :       7356 : esatl_Vgatep_sourcep=esat_Vgatep_sourcep*leff;
    7623                 :       7356 : esatl_Vdrainp_sourcep=esat_Vdrainp_sourcep*leff;
    7624                 :       7356 : esatl_Vdrainb_sourcep=esat_Vdrainb_sourcep*leff;
    7625                 :       7356 : esatl_Vbulkp_sourcep=esat_Vbulkp_sourcep*leff;
    7626                 :       7356 : esatl_Vsourceb_sourcep=esat_Vsourceb_sourcep*leff;
    7627                 :            : #endif
    7628                 :       7356 : esatl=(esat*leff);
    7629                 :            : #if defined(_DERIVATE)
    7630                 :       7356 : t0_Vgatep_sourcep=(((-esatl_Vgatep_sourcep)*ueff-(-esatl)*ueff_Vgatep_sourcep)/ueff/ueff);
    7631                 :       7356 : t0_Vdrainp_sourcep=(((-esatl_Vdrainp_sourcep)*ueff-(-esatl)*ueff_Vdrainp_sourcep)/ueff/ueff);
    7632                 :       7356 : t0_Vdrainb_sourcep=(((-esatl_Vdrainb_sourcep)*ueff-(-esatl)*ueff_Vdrainb_sourcep)/ueff/ueff);
    7633                 :       7356 : t0_Vbulkp_sourcep=(((-esatl_Vbulkp_sourcep)*ueff-(-esatl)*ueff_Vbulkp_sourcep)/ueff/ueff);
    7634                 :       7356 : t0_Vsourceb_sourcep=(((-esatl_Vsourceb_sourcep)*ueff-(-esatl)*ueff_Vsourceb_sourcep)/ueff/ueff);
    7635                 :            : #endif
    7636                 :       7356 : t0=((-esatl)/ueff);
    7637         [ +  - ]:       7356 : if
    7638                 :            : (a1==0.0)
    7639                 :            : {
    7640                 :            : #if defined(_DERIVATE)
    7641                 :       7356 : Lambda_Vgatep_sourcep=0.0;
    7642                 :       7356 : Lambda_Vdrainp_sourcep=0.0;
    7643                 :       7356 : Lambda_Vdrainb_sourcep=0.0;
    7644                 :       7356 : Lambda_Vbulkp_sourcep=0.0;
    7645                 :       7356 : Lambda_Vsourceb_sourcep=0.0;
    7646                 :            : #endif
    7647                 :       7356 : Lambda=a2;
    7648                 :            : }
    7649                 :            : else
    7650                 :            : {
    7651         [ #  # ]:          0 : if
    7652                 :            : (a1>0.0)
    7653                 :            : {
    7654                 :            : #if defined(_DERIVATE)
    7655                 :          0 : t0_Vgatep_sourcep=0.0;
    7656                 :          0 : t0_Vdrainp_sourcep=0.0;
    7657                 :          0 : t0_Vdrainb_sourcep=0.0;
    7658                 :          0 : t0_Vbulkp_sourcep=0.0;
    7659                 :          0 : t0_Vsourceb_sourcep=0.0;
    7660                 :            : #endif
    7661                 :          0 : t0=(1.0-a2);
    7662                 :            : #if defined(_DERIVATE)
    7663                 :          0 : t1_Vgatep_sourcep=(t0_Vgatep_sourcep-(a1*vgsteff_Vgatep_sourcep));
    7664                 :          0 : t1_Vdrainp_sourcep=(t0_Vdrainp_sourcep-(a1*vgsteff_Vdrainp_sourcep));
    7665                 :          0 : t1_Vdrainb_sourcep=(t0_Vdrainb_sourcep-(a1*vgsteff_Vdrainb_sourcep));
    7666                 :          0 : t1_Vbulkp_sourcep=(t0_Vbulkp_sourcep-(a1*vgsteff_Vbulkp_sourcep));
    7667                 :          0 : t1_Vsourceb_sourcep=(t0_Vsourceb_sourcep-(a1*vgsteff_Vsourceb_sourcep));
    7668                 :            : #endif
    7669                 :          0 : t1=((t0-(a1*vgsteff))-0.0001);
    7670                 :            : {
    7671                 :          0 : double m00_sqrt(d00_sqrt0,((t1*t1)+(0.0004*t0)))
    7672                 :            : #if defined(_DERIVATE)
    7673                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t1*t1)+(0.0004*t0)))
    7674                 :            : #endif
    7675                 :            : #if defined(_DERIVATE)
    7676                 :          0 : t2_Vgatep_sourcep=(((t1_Vgatep_sourcep*t1)+(t1*t1_Vgatep_sourcep))+(0.0004*t0_Vgatep_sourcep))*d10_sqrt0;
    7677                 :          0 : t2_Vdrainp_sourcep=(((t1_Vdrainp_sourcep*t1)+(t1*t1_Vdrainp_sourcep))+(0.0004*t0_Vdrainp_sourcep))*d10_sqrt0;
    7678                 :          0 : t2_Vdrainb_sourcep=(((t1_Vdrainb_sourcep*t1)+(t1*t1_Vdrainb_sourcep))+(0.0004*t0_Vdrainb_sourcep))*d10_sqrt0;
    7679                 :          0 : t2_Vbulkp_sourcep=(((t1_Vbulkp_sourcep*t1)+(t1*t1_Vbulkp_sourcep))+(0.0004*t0_Vbulkp_sourcep))*d10_sqrt0;
    7680                 :          0 : t2_Vsourceb_sourcep=(((t1_Vsourceb_sourcep*t1)+(t1*t1_Vsourceb_sourcep))+(0.0004*t0_Vsourceb_sourcep))*d10_sqrt0;
    7681                 :            : #endif
    7682                 :          0 : t2=d00_sqrt0;
    7683                 :            : }
    7684                 :            : #if defined(_DERIVATE)
    7685                 :          0 : Lambda_Vgatep_sourcep=(t0_Vgatep_sourcep-(0.5*(t1_Vgatep_sourcep+t2_Vgatep_sourcep)));
    7686                 :          0 : Lambda_Vdrainp_sourcep=(t0_Vdrainp_sourcep-(0.5*(t1_Vdrainp_sourcep+t2_Vdrainp_sourcep)));
    7687                 :          0 : Lambda_Vdrainb_sourcep=(t0_Vdrainb_sourcep-(0.5*(t1_Vdrainb_sourcep+t2_Vdrainb_sourcep)));
    7688                 :          0 : Lambda_Vbulkp_sourcep=(t0_Vbulkp_sourcep-(0.5*(t1_Vbulkp_sourcep+t2_Vbulkp_sourcep)));
    7689                 :          0 : Lambda_Vsourceb_sourcep=(t0_Vsourceb_sourcep-(0.5*(t1_Vsourceb_sourcep+t2_Vsourceb_sourcep)));
    7690                 :            : #endif
    7691                 :          0 : Lambda=((a2+t0)-(0.5*(t1+t2)));
    7692                 :            : }
    7693                 :            : else
    7694                 :            : {
    7695                 :            : #if defined(_DERIVATE)
    7696                 :          0 : t1_Vgatep_sourcep=(a1*vgsteff_Vgatep_sourcep);
    7697                 :          0 : t1_Vdrainp_sourcep=(a1*vgsteff_Vdrainp_sourcep);
    7698                 :          0 : t1_Vdrainb_sourcep=(a1*vgsteff_Vdrainb_sourcep);
    7699                 :          0 : t1_Vbulkp_sourcep=(a1*vgsteff_Vbulkp_sourcep);
    7700                 :          0 : t1_Vsourceb_sourcep=(a1*vgsteff_Vsourceb_sourcep);
    7701                 :            : #endif
    7702                 :          0 : t1=((a2+(a1*vgsteff))-0.0001);
    7703                 :            : {
    7704                 :          0 : double m00_sqrt(d00_sqrt0,((t1*t1)+(0.0004*a2)))
    7705                 :            : #if defined(_DERIVATE)
    7706                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t1*t1)+(0.0004*a2)))
    7707                 :            : #endif
    7708                 :            : #if defined(_DERIVATE)
    7709                 :          0 : t2_Vgatep_sourcep=((t1_Vgatep_sourcep*t1)+(t1*t1_Vgatep_sourcep))*d10_sqrt0;
    7710                 :          0 : t2_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t1)+(t1*t1_Vdrainp_sourcep))*d10_sqrt0;
    7711                 :          0 : t2_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t1)+(t1*t1_Vdrainb_sourcep))*d10_sqrt0;
    7712                 :          0 : t2_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t1)+(t1*t1_Vbulkp_sourcep))*d10_sqrt0;
    7713                 :          0 : t2_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t1)+(t1*t1_Vsourceb_sourcep))*d10_sqrt0;
    7714                 :            : #endif
    7715                 :          0 : t2=d00_sqrt0;
    7716                 :            : }
    7717                 :            : #if defined(_DERIVATE)
    7718                 :          0 : Lambda_Vgatep_sourcep=(0.5*(t1_Vgatep_sourcep+t2_Vgatep_sourcep));
    7719                 :          0 : Lambda_Vdrainp_sourcep=(0.5*(t1_Vdrainp_sourcep+t2_Vdrainp_sourcep));
    7720                 :          0 : Lambda_Vdrainb_sourcep=(0.5*(t1_Vdrainb_sourcep+t2_Vdrainb_sourcep));
    7721                 :          0 : Lambda_Vbulkp_sourcep=(0.5*(t1_Vbulkp_sourcep+t2_Vbulkp_sourcep));
    7722                 :          0 : Lambda_Vsourceb_sourcep=(0.5*(t1_Vsourceb_sourcep+t2_Vsourceb_sourcep));
    7723                 :            : #endif
    7724                 :          0 : Lambda=(0.5*(t1+t2));
    7725                 :            : }
    7726                 :            : }
    7727                 :            : #if defined(_DERIVATE)
    7728                 :       7356 : vgst2vtm_Vgatep_sourcep=vgsteff_Vgatep_sourcep;
    7729                 :       7356 : vgst2vtm_Vdrainp_sourcep=vgsteff_Vdrainp_sourcep;
    7730                 :       7356 : vgst2vtm_Vdrainb_sourcep=vgsteff_Vdrainb_sourcep;
    7731                 :       7356 : vgst2vtm_Vbulkp_sourcep=vgsteff_Vbulkp_sourcep;
    7732                 :       7356 : vgst2vtm_Vsourceb_sourcep=vgsteff_Vsourceb_sourcep;
    7733                 :            : #endif
    7734                 :       7356 : vgst2vtm=(vgsteff+(2.0*vtm));
    7735 [ -  + ][ #  # ]:       7356 : if
    7736                 :            : ((rds==0.0)&&(Lambda==1.0))
    7737                 :            : {
    7738                 :            : #if defined(_DERIVATE)
    7739                 :          0 : t0_Vgatep_sourcep=(-(((abulk_Vgatep_sourcep*esatl)+(abulk*esatl_Vgatep_sourcep))+vgst2vtm_Vgatep_sourcep)/((abulk*esatl)+vgst2vtm)/((abulk*esatl)+vgst2vtm));
    7740                 :          0 : t0_Vdrainp_sourcep=(-(((abulk_Vdrainp_sourcep*esatl)+(abulk*esatl_Vdrainp_sourcep))+vgst2vtm_Vdrainp_sourcep)/((abulk*esatl)+vgst2vtm)/((abulk*esatl)+vgst2vtm));
    7741                 :          0 : t0_Vdrainb_sourcep=(-(((abulk_Vdrainb_sourcep*esatl)+(abulk*esatl_Vdrainb_sourcep))+vgst2vtm_Vdrainb_sourcep)/((abulk*esatl)+vgst2vtm)/((abulk*esatl)+vgst2vtm));
    7742                 :          0 : t0_Vbulkp_sourcep=(-(((abulk_Vbulkp_sourcep*esatl)+(abulk*esatl_Vbulkp_sourcep))+vgst2vtm_Vbulkp_sourcep)/((abulk*esatl)+vgst2vtm)/((abulk*esatl)+vgst2vtm));
    7743                 :          0 : t0_Vsourceb_sourcep=(-(((abulk_Vsourceb_sourcep*esatl)+(abulk*esatl_Vsourceb_sourcep))+vgst2vtm_Vsourceb_sourcep)/((abulk*esatl)+vgst2vtm)/((abulk*esatl)+vgst2vtm));
    7744                 :            : #endif
    7745                 :          0 : t0=(1.0/((abulk*esatl)+vgst2vtm));
    7746                 :            : #if defined(_DERIVATE)
    7747                 :          0 : t1_Vgatep_sourcep=((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep));
    7748                 :          0 : t1_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep));
    7749                 :          0 : t1_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep));
    7750                 :          0 : t1_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep));
    7751                 :          0 : t1_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep));
    7752                 :            : #endif
    7753                 :          0 : t1=(t0*t0);
    7754                 :            : #if defined(_DERIVATE)
    7755                 :          0 : t2_Vgatep_sourcep=((vgst2vtm_Vgatep_sourcep*t0)+(vgst2vtm*t0_Vgatep_sourcep));
    7756                 :          0 : t2_Vdrainp_sourcep=((vgst2vtm_Vdrainp_sourcep*t0)+(vgst2vtm*t0_Vdrainp_sourcep));
    7757                 :          0 : t2_Vdrainb_sourcep=((vgst2vtm_Vdrainb_sourcep*t0)+(vgst2vtm*t0_Vdrainb_sourcep));
    7758                 :          0 : t2_Vbulkp_sourcep=((vgst2vtm_Vbulkp_sourcep*t0)+(vgst2vtm*t0_Vbulkp_sourcep));
    7759                 :          0 : t2_Vsourceb_sourcep=((vgst2vtm_Vsourceb_sourcep*t0)+(vgst2vtm*t0_Vsourceb_sourcep));
    7760                 :            : #endif
    7761                 :          0 : t2=(vgst2vtm*t0);
    7762                 :            : #if defined(_DERIVATE)
    7763                 :          0 : t3_Vgatep_sourcep=((esatl_Vgatep_sourcep*vgst2vtm)+(esatl*vgst2vtm_Vgatep_sourcep));
    7764                 :          0 : t3_Vdrainp_sourcep=((esatl_Vdrainp_sourcep*vgst2vtm)+(esatl*vgst2vtm_Vdrainp_sourcep));
    7765                 :          0 : t3_Vdrainb_sourcep=((esatl_Vdrainb_sourcep*vgst2vtm)+(esatl*vgst2vtm_Vdrainb_sourcep));
    7766                 :          0 : t3_Vbulkp_sourcep=((esatl_Vbulkp_sourcep*vgst2vtm)+(esatl*vgst2vtm_Vbulkp_sourcep));
    7767                 :          0 : t3_Vsourceb_sourcep=((esatl_Vsourceb_sourcep*vgst2vtm)+(esatl*vgst2vtm_Vsourceb_sourcep));
    7768                 :            : #endif
    7769                 :          0 : t3=(esatl*vgst2vtm);
    7770                 :            : #if defined(_DERIVATE)
    7771                 :          0 : vdsat_Vgatep_sourcep=((t3_Vgatep_sourcep*t0)+(t3*t0_Vgatep_sourcep));
    7772                 :          0 : vdsat_Vdrainp_sourcep=((t3_Vdrainp_sourcep*t0)+(t3*t0_Vdrainp_sourcep));
    7773                 :          0 : vdsat_Vdrainb_sourcep=((t3_Vdrainb_sourcep*t0)+(t3*t0_Vdrainb_sourcep));
    7774                 :          0 : vdsat_Vbulkp_sourcep=((t3_Vbulkp_sourcep*t0)+(t3*t0_Vbulkp_sourcep));
    7775                 :          0 : vdsat_Vsourceb_sourcep=((t3_Vsourceb_sourcep*t0)+(t3*t0_Vsourceb_sourcep));
    7776                 :            : #endif
    7777                 :          0 : vdsat=(t3*t0);
    7778                 :            : }
    7779                 :            : else
    7780                 :            : {
    7781                 :            : #if defined(_DERIVATE)
    7782                 :       7356 : t9_Vgatep_sourcep=((abulk_Vgatep_sourcep*wvcoxrds)+(abulk*wvcoxrds_Vgatep_sourcep));
    7783                 :       7356 : t9_Vdrainp_sourcep=((abulk_Vdrainp_sourcep*wvcoxrds)+(abulk*wvcoxrds_Vdrainp_sourcep));
    7784                 :       7356 : t9_Vdrainb_sourcep=((abulk_Vdrainb_sourcep*wvcoxrds)+(abulk*wvcoxrds_Vdrainb_sourcep));
    7785                 :       7356 : t9_Vbulkp_sourcep=((abulk_Vbulkp_sourcep*wvcoxrds)+(abulk*wvcoxrds_Vbulkp_sourcep));
    7786                 :       7356 : t9_Vsourceb_sourcep=((abulk_Vsourceb_sourcep*wvcoxrds)+(abulk*wvcoxrds_Vsourceb_sourcep));
    7787                 :            : #endif
    7788                 :       7356 : t9=(abulk*wvcoxrds);
    7789                 :            : #if defined(_DERIVATE)
    7790                 :       7356 : t8_Vgatep_sourcep=((abulk_Vgatep_sourcep*t9)+(abulk*t9_Vgatep_sourcep));
    7791                 :       7356 : t8_Vdrainp_sourcep=((abulk_Vdrainp_sourcep*t9)+(abulk*t9_Vdrainp_sourcep));
    7792                 :       7356 : t8_Vdrainb_sourcep=((abulk_Vdrainb_sourcep*t9)+(abulk*t9_Vdrainb_sourcep));
    7793                 :       7356 : t8_Vbulkp_sourcep=((abulk_Vbulkp_sourcep*t9)+(abulk*t9_Vbulkp_sourcep));
    7794                 :       7356 : t8_Vsourceb_sourcep=((abulk_Vsourceb_sourcep*t9)+(abulk*t9_Vsourceb_sourcep));
    7795                 :            : #endif
    7796                 :       7356 : t8=(abulk*t9);
    7797                 :            : #if defined(_DERIVATE)
    7798                 :       7356 : t7_Vgatep_sourcep=((vgst2vtm_Vgatep_sourcep*t9)+(vgst2vtm*t9_Vgatep_sourcep));
    7799                 :       7356 : t7_Vdrainp_sourcep=((vgst2vtm_Vdrainp_sourcep*t9)+(vgst2vtm*t9_Vdrainp_sourcep));
    7800                 :       7356 : t7_Vdrainb_sourcep=((vgst2vtm_Vdrainb_sourcep*t9)+(vgst2vtm*t9_Vdrainb_sourcep));
    7801                 :       7356 : t7_Vbulkp_sourcep=((vgst2vtm_Vbulkp_sourcep*t9)+(vgst2vtm*t9_Vbulkp_sourcep));
    7802                 :       7356 : t7_Vsourceb_sourcep=((vgst2vtm_Vsourceb_sourcep*t9)+(vgst2vtm*t9_Vsourceb_sourcep));
    7803                 :            : #endif
    7804                 :       7356 : t7=(vgst2vtm*t9);
    7805                 :            : #if defined(_DERIVATE)
    7806                 :       7356 : t6_Vgatep_sourcep=((vgst2vtm_Vgatep_sourcep*wvcoxrds)+(vgst2vtm*wvcoxrds_Vgatep_sourcep));
    7807                 :       7356 : t6_Vdrainp_sourcep=((vgst2vtm_Vdrainp_sourcep*wvcoxrds)+(vgst2vtm*wvcoxrds_Vdrainp_sourcep));
    7808                 :       7356 : t6_Vdrainb_sourcep=((vgst2vtm_Vdrainb_sourcep*wvcoxrds)+(vgst2vtm*wvcoxrds_Vdrainb_sourcep));
    7809                 :       7356 : t6_Vbulkp_sourcep=((vgst2vtm_Vbulkp_sourcep*wvcoxrds)+(vgst2vtm*wvcoxrds_Vbulkp_sourcep));
    7810                 :       7356 : t6_Vsourceb_sourcep=((vgst2vtm_Vsourceb_sourcep*wvcoxrds)+(vgst2vtm*wvcoxrds_Vsourceb_sourcep));
    7811                 :            : #endif
    7812                 :       7356 : t6=(vgst2vtm*wvcoxrds);
    7813                 :            : #if defined(_DERIVATE)
    7814                 :       7356 : t0_Vgatep_sourcep=(((2.0*abulk_Vgatep_sourcep)*((t9-1.0)+(1.0/Lambda)))+((2.0*abulk)*(t9_Vgatep_sourcep+(-Lambda_Vgatep_sourcep/Lambda/Lambda))));
    7815                 :       7356 : t0_Vdrainp_sourcep=(((2.0*abulk_Vdrainp_sourcep)*((t9-1.0)+(1.0/Lambda)))+((2.0*abulk)*(t9_Vdrainp_sourcep+(-Lambda_Vdrainp_sourcep/Lambda/Lambda))));
    7816                 :       7356 : t0_Vdrainb_sourcep=(((2.0*abulk_Vdrainb_sourcep)*((t9-1.0)+(1.0/Lambda)))+((2.0*abulk)*(t9_Vdrainb_sourcep+(-Lambda_Vdrainb_sourcep/Lambda/Lambda))));
    7817                 :       7356 : t0_Vbulkp_sourcep=(((2.0*abulk_Vbulkp_sourcep)*((t9-1.0)+(1.0/Lambda)))+((2.0*abulk)*(t9_Vbulkp_sourcep+(-Lambda_Vbulkp_sourcep/Lambda/Lambda))));
    7818                 :       7356 : t0_Vsourceb_sourcep=(((2.0*abulk_Vsourceb_sourcep)*((t9-1.0)+(1.0/Lambda)))+((2.0*abulk)*(t9_Vsourceb_sourcep+(-Lambda_Vsourceb_sourcep/Lambda/Lambda))));
    7819                 :            : #endif
    7820                 :       7356 : t0=((2.0*abulk)*((t9-1.0)+(1.0/Lambda)));
    7821                 :            : #if defined(_DERIVATE)
    7822                 :       7356 : t1_Vgatep_sourcep=((((vgst2vtm_Vgatep_sourcep*((2.0/Lambda)-1.0))+(vgst2vtm*(-2.0*Lambda_Vgatep_sourcep/Lambda/Lambda)))+((abulk_Vgatep_sourcep*esatl)+(abulk*esatl_Vgatep_sourcep)))+(3.0*t7_Vgatep_sourcep));
    7823                 :       7356 : t1_Vdrainp_sourcep=((((vgst2vtm_Vdrainp_sourcep*((2.0/Lambda)-1.0))+(vgst2vtm*(-2.0*Lambda_Vdrainp_sourcep/Lambda/Lambda)))+((abulk_Vdrainp_sourcep*esatl)+(abulk*esatl_Vdrainp_sourcep)))+(3.0*t7_Vdrainp_sourcep));
    7824                 :       7356 : t1_Vdrainb_sourcep=((((vgst2vtm_Vdrainb_sourcep*((2.0/Lambda)-1.0))+(vgst2vtm*(-2.0*Lambda_Vdrainb_sourcep/Lambda/Lambda)))+((abulk_Vdrainb_sourcep*esatl)+(abulk*esatl_Vdrainb_sourcep)))+(3.0*t7_Vdrainb_sourcep));
    7825                 :       7356 : t1_Vbulkp_sourcep=((((vgst2vtm_Vbulkp_sourcep*((2.0/Lambda)-1.0))+(vgst2vtm*(-2.0*Lambda_Vbulkp_sourcep/Lambda/Lambda)))+((abulk_Vbulkp_sourcep*esatl)+(abulk*esatl_Vbulkp_sourcep)))+(3.0*t7_Vbulkp_sourcep));
    7826                 :       7356 : t1_Vsourceb_sourcep=((((vgst2vtm_Vsourceb_sourcep*((2.0/Lambda)-1.0))+(vgst2vtm*(-2.0*Lambda_Vsourceb_sourcep/Lambda/Lambda)))+((abulk_Vsourceb_sourcep*esatl)+(abulk*esatl_Vsourceb_sourcep)))+(3.0*t7_Vsourceb_sourcep));
    7827                 :            : #endif
    7828                 :       7356 : t1=(((vgst2vtm*((2.0/Lambda)-1.0))+(abulk*esatl))+(3.0*t7));
    7829                 :            : #if defined(_DERIVATE)
    7830                 :       7356 : t2_Vgatep_sourcep=((vgst2vtm_Vgatep_sourcep*(esatl+(2.0*t6)))+(vgst2vtm*(esatl_Vgatep_sourcep+(2.0*t6_Vgatep_sourcep))));
    7831                 :       7356 : t2_Vdrainp_sourcep=((vgst2vtm_Vdrainp_sourcep*(esatl+(2.0*t6)))+(vgst2vtm*(esatl_Vdrainp_sourcep+(2.0*t6_Vdrainp_sourcep))));
    7832                 :       7356 : t2_Vdrainb_sourcep=((vgst2vtm_Vdrainb_sourcep*(esatl+(2.0*t6)))+(vgst2vtm*(esatl_Vdrainb_sourcep+(2.0*t6_Vdrainb_sourcep))));
    7833                 :       7356 : t2_Vbulkp_sourcep=((vgst2vtm_Vbulkp_sourcep*(esatl+(2.0*t6)))+(vgst2vtm*(esatl_Vbulkp_sourcep+(2.0*t6_Vbulkp_sourcep))));
    7834                 :       7356 : t2_Vsourceb_sourcep=((vgst2vtm_Vsourceb_sourcep*(esatl+(2.0*t6)))+(vgst2vtm*(esatl_Vsourceb_sourcep+(2.0*t6_Vsourceb_sourcep))));
    7835                 :            : #endif
    7836                 :       7356 : t2=(vgst2vtm*(esatl+(2.0*t6)));
    7837                 :            : {
    7838                 :       7356 : double m00_sqrt(d00_sqrt0,((t1*t1)-((2.0*t0)*t2)))
    7839                 :            : #if defined(_DERIVATE)
    7840                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t1*t1)-((2.0*t0)*t2)))
    7841                 :            : #endif
    7842                 :            : #if defined(_DERIVATE)
    7843                 :       7356 : t3_Vgatep_sourcep=(((t1_Vgatep_sourcep*t1)+(t1*t1_Vgatep_sourcep))-(((2.0*t0_Vgatep_sourcep)*t2)+((2.0*t0)*t2_Vgatep_sourcep)))*d10_sqrt0;
    7844                 :       7356 : t3_Vdrainp_sourcep=(((t1_Vdrainp_sourcep*t1)+(t1*t1_Vdrainp_sourcep))-(((2.0*t0_Vdrainp_sourcep)*t2)+((2.0*t0)*t2_Vdrainp_sourcep)))*d10_sqrt0;
    7845                 :       7356 : t3_Vdrainb_sourcep=(((t1_Vdrainb_sourcep*t1)+(t1*t1_Vdrainb_sourcep))-(((2.0*t0_Vdrainb_sourcep)*t2)+((2.0*t0)*t2_Vdrainb_sourcep)))*d10_sqrt0;
    7846                 :       7356 : t3_Vbulkp_sourcep=(((t1_Vbulkp_sourcep*t1)+(t1*t1_Vbulkp_sourcep))-(((2.0*t0_Vbulkp_sourcep)*t2)+((2.0*t0)*t2_Vbulkp_sourcep)))*d10_sqrt0;
    7847                 :       7356 : t3_Vsourceb_sourcep=(((t1_Vsourceb_sourcep*t1)+(t1*t1_Vsourceb_sourcep))-(((2.0*t0_Vsourceb_sourcep)*t2)+((2.0*t0)*t2_Vsourceb_sourcep)))*d10_sqrt0;
    7848                 :            : #endif
    7849                 :       7356 : t3=d00_sqrt0;
    7850                 :            : }
    7851                 :            : #if defined(_DERIVATE)
    7852                 :       7356 : vdsat_Vgatep_sourcep=(((t1_Vgatep_sourcep-t3_Vgatep_sourcep)*t0-(t1-t3)*t0_Vgatep_sourcep)/t0/t0);
    7853                 :       7356 : vdsat_Vdrainp_sourcep=(((t1_Vdrainp_sourcep-t3_Vdrainp_sourcep)*t0-(t1-t3)*t0_Vdrainp_sourcep)/t0/t0);
    7854                 :       7356 : vdsat_Vdrainb_sourcep=(((t1_Vdrainb_sourcep-t3_Vdrainb_sourcep)*t0-(t1-t3)*t0_Vdrainb_sourcep)/t0/t0);
    7855                 :       7356 : vdsat_Vbulkp_sourcep=(((t1_Vbulkp_sourcep-t3_Vbulkp_sourcep)*t0-(t1-t3)*t0_Vbulkp_sourcep)/t0/t0);
    7856                 :       7356 : vdsat_Vsourceb_sourcep=(((t1_Vsourceb_sourcep-t3_Vsourceb_sourcep)*t0-(t1-t3)*t0_Vsourceb_sourcep)/t0/t0);
    7857                 :            : #endif
    7858                 :       7356 : vdsat=((t1-t3)/t0);
    7859                 :            : }
    7860                 :            : #if defined(_DERIVATE)
    7861                 :       7356 : t1_Vgatep_sourcep=vdsat_Vgatep_sourcep;
    7862                 :       7356 : t1_Vdrainp_sourcep=(vdsat_Vdrainp_sourcep-Vds_Vdrainp_sourcep);
    7863                 :       7356 : t1_Vdrainb_sourcep=vdsat_Vdrainb_sourcep;
    7864                 :       7356 : t1_Vbulkp_sourcep=vdsat_Vbulkp_sourcep;
    7865                 :       7356 : t1_Vsourceb_sourcep=vdsat_Vsourceb_sourcep;
    7866                 :            : #endif
    7867                 :       7356 : t1=((vdsat-Vds)-delta);
    7868                 :            : {
    7869                 :       7356 : double m00_sqrt(d00_sqrt0,((t1*t1)+((4.0*delta)*vdsat)))
    7870                 :            : #if defined(_DERIVATE)
    7871                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t1*t1)+((4.0*delta)*vdsat)))
    7872                 :            : #endif
    7873                 :            : #if defined(_DERIVATE)
    7874                 :       7356 : t2_Vgatep_sourcep=(((t1_Vgatep_sourcep*t1)+(t1*t1_Vgatep_sourcep))+((4.0*delta)*vdsat_Vgatep_sourcep))*d10_sqrt0;
    7875                 :       7356 : t2_Vdrainp_sourcep=(((t1_Vdrainp_sourcep*t1)+(t1*t1_Vdrainp_sourcep))+((4.0*delta)*vdsat_Vdrainp_sourcep))*d10_sqrt0;
    7876                 :       7356 : t2_Vdrainb_sourcep=(((t1_Vdrainb_sourcep*t1)+(t1*t1_Vdrainb_sourcep))+((4.0*delta)*vdsat_Vdrainb_sourcep))*d10_sqrt0;
    7877                 :       7356 : t2_Vbulkp_sourcep=(((t1_Vbulkp_sourcep*t1)+(t1*t1_Vbulkp_sourcep))+((4.0*delta)*vdsat_Vbulkp_sourcep))*d10_sqrt0;
    7878                 :       7356 : t2_Vsourceb_sourcep=(((t1_Vsourceb_sourcep*t1)+(t1*t1_Vsourceb_sourcep))+((4.0*delta)*vdsat_Vsourceb_sourcep))*d10_sqrt0;
    7879                 :            : #endif
    7880                 :       7356 : t2=d00_sqrt0;
    7881                 :            : }
    7882                 :            : #if defined(_DERIVATE)
    7883                 :       7356 : t0_Vgatep_sourcep=((t1_Vgatep_sourcep*t2-t1*t2_Vgatep_sourcep)/t2/t2);
    7884                 :       7356 : t0_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t2-t1*t2_Vdrainp_sourcep)/t2/t2);
    7885                 :       7356 : t0_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t2-t1*t2_Vdrainb_sourcep)/t2/t2);
    7886                 :       7356 : t0_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t2-t1*t2_Vbulkp_sourcep)/t2/t2);
    7887                 :       7356 : t0_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t2-t1*t2_Vsourceb_sourcep)/t2/t2);
    7888                 :            : #endif
    7889                 :       7356 : t0=(t1/t2);
    7890                 :            : #if defined(_DERIVATE)
    7891                 :       7356 : t9_Vgatep_sourcep=0.0;
    7892                 :       7356 : t9_Vdrainp_sourcep=0.0;
    7893                 :       7356 : t9_Vdrainb_sourcep=0.0;
    7894                 :       7356 : t9_Vbulkp_sourcep=0.0;
    7895                 :       7356 : t9_Vsourceb_sourcep=0.0;
    7896                 :            : #endif
    7897                 :       7356 : t9=(2.0*delta);
    7898         [ +  + ]:       7356 : if
    7899                 :            : (t1>=0.0)
    7900                 :            : {
    7901                 :            : #if defined(_DERIVATE)
    7902                 :       4328 : vdseff_Vgatep_sourcep=(vdsat_Vgatep_sourcep-(0.5*(t1_Vgatep_sourcep+t2_Vgatep_sourcep)));
    7903                 :       4328 : vdseff_Vdrainp_sourcep=(vdsat_Vdrainp_sourcep-(0.5*(t1_Vdrainp_sourcep+t2_Vdrainp_sourcep)));
    7904                 :       4328 : vdseff_Vdrainb_sourcep=(vdsat_Vdrainb_sourcep-(0.5*(t1_Vdrainb_sourcep+t2_Vdrainb_sourcep)));
    7905                 :       4328 : vdseff_Vbulkp_sourcep=(vdsat_Vbulkp_sourcep-(0.5*(t1_Vbulkp_sourcep+t2_Vbulkp_sourcep)));
    7906                 :       4328 : vdseff_Vsourceb_sourcep=(vdsat_Vsourceb_sourcep-(0.5*(t1_Vsourceb_sourcep+t2_Vsourceb_sourcep)));
    7907                 :            : #endif
    7908                 :       4328 : vdseff=(vdsat-(0.5*(t1+t2)));
    7909                 :            : }
    7910                 :            : else
    7911                 :            : {
    7912                 :            : #if defined(_DERIVATE)
    7913                 :       3028 : t4_Vgatep_sourcep=((t9_Vgatep_sourcep*(t2-t1)-t9*(t2_Vgatep_sourcep-t1_Vgatep_sourcep))/(t2-t1)/(t2-t1));
    7914                 :       3028 : t4_Vdrainp_sourcep=((t9_Vdrainp_sourcep*(t2-t1)-t9*(t2_Vdrainp_sourcep-t1_Vdrainp_sourcep))/(t2-t1)/(t2-t1));
    7915                 :       3028 : t4_Vdrainb_sourcep=((t9_Vdrainb_sourcep*(t2-t1)-t9*(t2_Vdrainb_sourcep-t1_Vdrainb_sourcep))/(t2-t1)/(t2-t1));
    7916                 :       3028 : t4_Vbulkp_sourcep=((t9_Vbulkp_sourcep*(t2-t1)-t9*(t2_Vbulkp_sourcep-t1_Vbulkp_sourcep))/(t2-t1)/(t2-t1));
    7917                 :       3028 : t4_Vsourceb_sourcep=((t9_Vsourceb_sourcep*(t2-t1)-t9*(t2_Vsourceb_sourcep-t1_Vsourceb_sourcep))/(t2-t1)/(t2-t1));
    7918                 :            : #endif
    7919                 :       3028 : t4=(t9/(t2-t1));
    7920                 :            : #if defined(_DERIVATE)
    7921                 :       3028 : t5_Vgatep_sourcep=(-t4_Vgatep_sourcep);
    7922                 :       3028 : t5_Vdrainp_sourcep=(-t4_Vdrainp_sourcep);
    7923                 :       3028 : t5_Vdrainb_sourcep=(-t4_Vdrainb_sourcep);
    7924                 :       3028 : t5_Vbulkp_sourcep=(-t4_Vbulkp_sourcep);
    7925                 :       3028 : t5_Vsourceb_sourcep=(-t4_Vsourceb_sourcep);
    7926                 :            : #endif
    7927                 :       3028 : t5=(1.0-t4);
    7928                 :            : #if defined(_DERIVATE)
    7929                 :       3028 : vdseff_Vgatep_sourcep=((vdsat_Vgatep_sourcep*t5)+(vdsat*t5_Vgatep_sourcep));
    7930                 :       3028 : vdseff_Vdrainp_sourcep=((vdsat_Vdrainp_sourcep*t5)+(vdsat*t5_Vdrainp_sourcep));
    7931                 :       3028 : vdseff_Vdrainb_sourcep=((vdsat_Vdrainb_sourcep*t5)+(vdsat*t5_Vdrainb_sourcep));
    7932                 :       3028 : vdseff_Vbulkp_sourcep=((vdsat_Vbulkp_sourcep*t5)+(vdsat*t5_Vbulkp_sourcep));
    7933                 :       3028 : vdseff_Vsourceb_sourcep=((vdsat_Vsourceb_sourcep*t5)+(vdsat*t5_Vsourceb_sourcep));
    7934                 :            : #endif
    7935                 :       3028 : vdseff=(vdsat*t5);
    7936                 :            : }
    7937         [ +  + ]:       7356 : if
    7938                 :            : (Vds==0.0)
    7939                 :            : {
    7940                 :            : #if defined(_DERIVATE)
    7941                 :       2112 : vdseff_Vgatep_sourcep=0.0;
    7942                 :       2112 : vdseff_Vdrainp_sourcep=Vds_Vdrainp_sourcep;
    7943                 :       2112 : vdseff_Vdrainb_sourcep=0.0;
    7944                 :       2112 : vdseff_Vbulkp_sourcep=0.0;
    7945                 :       2112 : vdseff_Vsourceb_sourcep=0.0;
    7946                 :            : #endif
    7947                 :       2112 : vdseff=Vds;
    7948                 :            : }
    7949         [ -  + ]:       7356 : if
    7950                 :            : (vdseff>Vds)
    7951                 :            : {
    7952                 :            : #if defined(_DERIVATE)
    7953                 :          0 : vdseff_Vgatep_sourcep=0.0;
    7954                 :          0 : vdseff_Vdrainp_sourcep=Vds_Vdrainp_sourcep;
    7955                 :          0 : vdseff_Vdrainb_sourcep=0.0;
    7956                 :          0 : vdseff_Vbulkp_sourcep=0.0;
    7957                 :          0 : vdseff_Vsourceb_sourcep=0.0;
    7958                 :            : #endif
    7959                 :          0 : vdseff=Vds;
    7960                 :            : }
    7961                 :            : #if defined(_DERIVATE)
    7962                 :       7356 : diffvds_Vdrainp_sourcep=(Vds_Vdrainp_sourcep-vdseff_Vdrainp_sourcep);
    7963                 :       7356 : diffvds_Vgatep_sourcep=(-vdseff_Vgatep_sourcep);
    7964                 :       7356 : diffvds_Vdrainb_sourcep=(-vdseff_Vdrainb_sourcep);
    7965                 :       7356 : diffvds_Vbulkp_sourcep=(-vdseff_Vbulkp_sourcep);
    7966                 :       7356 : diffvds_Vsourceb_sourcep=(-vdseff_Vsourceb_sourcep);
    7967                 :            : #endif
    7968                 :       7356 : diffvds=(Vds-vdseff);
    7969 [ -  + ][ #  # ]:       7356 : if
    7970                 :            : ((lambda!=(-99.0))&&(lambda>0.0))
    7971                 :            : {
    7972                 :            : #if defined(_DERIVATE)
    7973                 :          0 : t1_Vgatep_sourcep=(leff*ueff_Vgatep_sourcep);
    7974                 :          0 : t1_Vdrainp_sourcep=(leff*ueff_Vdrainp_sourcep);
    7975                 :          0 : t1_Vdrainb_sourcep=(leff*ueff_Vdrainb_sourcep);
    7976                 :          0 : t1_Vbulkp_sourcep=(leff*ueff_Vbulkp_sourcep);
    7977                 :          0 : t1_Vsourceb_sourcep=(leff*ueff_Vsourceb_sourcep);
    7978                 :            : #endif
    7979                 :          0 : t1=(leff*ueff);
    7980                 :            : #if defined(_DERIVATE)
    7981                 :          0 : t2_Vgatep_sourcep=(-lambda*t1_Vgatep_sourcep/t1/t1);
    7982                 :          0 : t2_Vdrainp_sourcep=(-lambda*t1_Vdrainp_sourcep/t1/t1);
    7983                 :          0 : t2_Vdrainb_sourcep=(-lambda*t1_Vdrainb_sourcep/t1/t1);
    7984                 :          0 : t2_Vbulkp_sourcep=(-lambda*t1_Vbulkp_sourcep/t1/t1);
    7985                 :          0 : t2_Vsourceb_sourcep=(-lambda*t1_Vsourceb_sourcep/t1/t1);
    7986                 :            : #endif
    7987                 :          0 : t2=(lambda/t1);
    7988                 :            : #if defined(_DERIVATE)
    7989                 :          0 : t5_Vgatep_sourcep=(-esat_Vgatep_sourcep*litl/(esat*litl)/(esat*litl));
    7990                 :          0 : t5_Vdrainp_sourcep=(-esat_Vdrainp_sourcep*litl/(esat*litl)/(esat*litl));
    7991                 :          0 : t5_Vdrainb_sourcep=(-esat_Vdrainb_sourcep*litl/(esat*litl)/(esat*litl));
    7992                 :          0 : t5_Vbulkp_sourcep=(-esat_Vbulkp_sourcep*litl/(esat*litl)/(esat*litl));
    7993                 :          0 : t5_Vsourceb_sourcep=(-esat_Vsourceb_sourcep*litl/(esat*litl)/(esat*litl));
    7994                 :            : #endif
    7995                 :          0 : t5=(1.0/(esat*litl));
    7996                 :            : #if defined(_DERIVATE)
    7997                 :          0 : t6_Vgatep_sourcep=((diffvds_Vgatep_sourcep*t5)+(diffvds*t5_Vgatep_sourcep));
    7998                 :          0 : t6_Vdrainp_sourcep=((diffvds_Vdrainp_sourcep*t5)+(diffvds*t5_Vdrainp_sourcep));
    7999                 :          0 : t6_Vdrainb_sourcep=((diffvds_Vdrainb_sourcep*t5)+(diffvds*t5_Vdrainb_sourcep));
    8000                 :          0 : t6_Vbulkp_sourcep=((diffvds_Vbulkp_sourcep*t5)+(diffvds*t5_Vbulkp_sourcep));
    8001                 :          0 : t6_Vsourceb_sourcep=((diffvds_Vsourceb_sourcep*t5)+(diffvds*t5_Vsourceb_sourcep));
    8002                 :            : #endif
    8003                 :          0 : t6=(1.0+(diffvds*t5));
    8004                 :            : #if defined(_DERIVATE)
    8005                 :          0 : t7_Vgatep_sourcep=(-2.0*((t6_Vgatep_sourcep*t6)+(t6*t6_Vgatep_sourcep))/((t6*t6)+1.0)/((t6*t6)+1.0));
    8006                 :          0 : t7_Vdrainp_sourcep=(-2.0*((t6_Vdrainp_sourcep*t6)+(t6*t6_Vdrainp_sourcep))/((t6*t6)+1.0)/((t6*t6)+1.0));
    8007                 :          0 : t7_Vdrainb_sourcep=(-2.0*((t6_Vdrainb_sourcep*t6)+(t6*t6_Vdrainb_sourcep))/((t6*t6)+1.0)/((t6*t6)+1.0));
    8008                 :          0 : t7_Vbulkp_sourcep=(-2.0*((t6_Vbulkp_sourcep*t6)+(t6*t6_Vbulkp_sourcep))/((t6*t6)+1.0)/((t6*t6)+1.0));
    8009                 :          0 : t7_Vsourceb_sourcep=(-2.0*((t6_Vsourceb_sourcep*t6)+(t6*t6_Vsourceb_sourcep))/((t6*t6)+1.0)/((t6*t6)+1.0));
    8010                 :            : #endif
    8011                 :          0 : t7=(2.0/((t6*t6)+1.0));
    8012                 :            : #if defined(_DERIVATE)
    8013                 :          0 : t8_Vgatep_sourcep=(-t7_Vgatep_sourcep);
    8014                 :          0 : t8_Vdrainp_sourcep=(-t7_Vdrainp_sourcep);
    8015                 :          0 : t8_Vdrainb_sourcep=(-t7_Vdrainb_sourcep);
    8016                 :          0 : t8_Vbulkp_sourcep=(-t7_Vbulkp_sourcep);
    8017                 :          0 : t8_Vsourceb_sourcep=(-t7_Vsourceb_sourcep);
    8018                 :            : #endif
    8019                 :          0 : t8=(1.0-t7);
    8020                 :            : #if defined(_DERIVATE)
    8021                 :          0 : t10_Vgatep_sourcep=((t2_Vgatep_sourcep*t8)+(t2*t8_Vgatep_sourcep));
    8022                 :          0 : t10_Vdrainp_sourcep=((t2_Vdrainp_sourcep*t8)+(t2*t8_Vdrainp_sourcep));
    8023                 :          0 : t10_Vdrainb_sourcep=((t2_Vdrainb_sourcep*t8)+(t2*t8_Vdrainb_sourcep));
    8024                 :          0 : t10_Vbulkp_sourcep=((t2_Vbulkp_sourcep*t8)+(t2*t8_Vbulkp_sourcep));
    8025                 :          0 : t10_Vsourceb_sourcep=((t2_Vsourceb_sourcep*t8)+(t2*t8_Vsourceb_sourcep));
    8026                 :            : #endif
    8027                 :          0 : t10=(1.0+(t2*t8));
    8028                 :            : #if defined(_DERIVATE)
    8029                 :          0 : esatl_Vgatep_sourcep=((esatl_Vgatep_sourcep*t10)+(esatl*t10_Vgatep_sourcep));
    8030                 :          0 : esatl_Vdrainp_sourcep=((esatl_Vdrainp_sourcep*t10)+(esatl*t10_Vdrainp_sourcep));
    8031                 :          0 : esatl_Vdrainb_sourcep=((esatl_Vdrainb_sourcep*t10)+(esatl*t10_Vdrainb_sourcep));
    8032                 :          0 : esatl_Vbulkp_sourcep=((esatl_Vbulkp_sourcep*t10)+(esatl*t10_Vbulkp_sourcep));
    8033                 :          0 : esatl_Vsourceb_sourcep=((esatl_Vsourceb_sourcep*t10)+(esatl*t10_Vsourceb_sourcep));
    8034                 :            : #endif
    8035                 :          0 : esatl=(esatl*t10);
    8036                 :            : }
    8037                 :            : #if defined(_DERIVATE)
    8038                 :       7356 : tmp4_Vgatep_sourcep=(-(((((0.5*abulk_Vgatep_sourcep)*vdsat)+((0.5*abulk)*vdsat_Vgatep_sourcep))*vgst2vtm-((0.5*abulk)*vdsat)*vgst2vtm_Vgatep_sourcep)/vgst2vtm/vgst2vtm));
    8039                 :       7356 : tmp4_Vdrainp_sourcep=(-(((((0.5*abulk_Vdrainp_sourcep)*vdsat)+((0.5*abulk)*vdsat_Vdrainp_sourcep))*vgst2vtm-((0.5*abulk)*vdsat)*vgst2vtm_Vdrainp_sourcep)/vgst2vtm/vgst2vtm));
    8040                 :       7356 : tmp4_Vdrainb_sourcep=(-(((((0.5*abulk_Vdrainb_sourcep)*vdsat)+((0.5*abulk)*vdsat_Vdrainb_sourcep))*vgst2vtm-((0.5*abulk)*vdsat)*vgst2vtm_Vdrainb_sourcep)/vgst2vtm/vgst2vtm));
    8041                 :       7356 : tmp4_Vbulkp_sourcep=(-(((((0.5*abulk_Vbulkp_sourcep)*vdsat)+((0.5*abulk)*vdsat_Vbulkp_sourcep))*vgst2vtm-((0.5*abulk)*vdsat)*vgst2vtm_Vbulkp_sourcep)/vgst2vtm/vgst2vtm));
    8042                 :       7356 : tmp4_Vsourceb_sourcep=(-(((((0.5*abulk_Vsourceb_sourcep)*vdsat)+((0.5*abulk)*vdsat_Vsourceb_sourcep))*vgst2vtm-((0.5*abulk)*vdsat)*vgst2vtm_Vsourceb_sourcep)/vgst2vtm/vgst2vtm));
    8043                 :            : #endif
    8044                 :       7356 : tmp4=(1.0-(((0.5*abulk)*vdsat)/vgst2vtm));
    8045                 :            : #if defined(_DERIVATE)
    8046                 :       7356 : t9_Vgatep_sourcep=((wvcoxrds_Vgatep_sourcep*vgsteff)+(wvcoxrds*vgsteff_Vgatep_sourcep));
    8047                 :       7356 : t9_Vdrainp_sourcep=((wvcoxrds_Vdrainp_sourcep*vgsteff)+(wvcoxrds*vgsteff_Vdrainp_sourcep));
    8048                 :       7356 : t9_Vdrainb_sourcep=((wvcoxrds_Vdrainb_sourcep*vgsteff)+(wvcoxrds*vgsteff_Vdrainb_sourcep));
    8049                 :       7356 : t9_Vbulkp_sourcep=((wvcoxrds_Vbulkp_sourcep*vgsteff)+(wvcoxrds*vgsteff_Vbulkp_sourcep));
    8050                 :       7356 : t9_Vsourceb_sourcep=((wvcoxrds_Vsourceb_sourcep*vgsteff)+(wvcoxrds*vgsteff_Vsourceb_sourcep));
    8051                 :            : #endif
    8052                 :       7356 : t9=(wvcoxrds*vgsteff);
    8053                 :            : #if defined(_DERIVATE)
    8054                 :       7356 : t0_Vgatep_sourcep=((esatl_Vgatep_sourcep+vdsat_Vgatep_sourcep)+(((2.0*t9_Vgatep_sourcep)*tmp4)+((2.0*t9)*tmp4_Vgatep_sourcep)));
    8055                 :       7356 : t0_Vdrainp_sourcep=((esatl_Vdrainp_sourcep+vdsat_Vdrainp_sourcep)+(((2.0*t9_Vdrainp_sourcep)*tmp4)+((2.0*t9)*tmp4_Vdrainp_sourcep)));
    8056                 :       7356 : t0_Vdrainb_sourcep=((esatl_Vdrainb_sourcep+vdsat_Vdrainb_sourcep)+(((2.0*t9_Vdrainb_sourcep)*tmp4)+((2.0*t9)*tmp4_Vdrainb_sourcep)));
    8057                 :       7356 : t0_Vbulkp_sourcep=((esatl_Vbulkp_sourcep+vdsat_Vbulkp_sourcep)+(((2.0*t9_Vbulkp_sourcep)*tmp4)+((2.0*t9)*tmp4_Vbulkp_sourcep)));
    8058                 :       7356 : t0_Vsourceb_sourcep=((esatl_Vsourceb_sourcep+vdsat_Vsourceb_sourcep)+(((2.0*t9_Vsourceb_sourcep)*tmp4)+((2.0*t9)*tmp4_Vsourceb_sourcep)));
    8059                 :            : #endif
    8060                 :       7356 : t0=((esatl+vdsat)+((2.0*t9)*tmp4));
    8061                 :            : #if defined(_DERIVATE)
    8062                 :       7356 : t9_Vgatep_sourcep=((wvcoxrds_Vgatep_sourcep*abulk)+(wvcoxrds*abulk_Vgatep_sourcep));
    8063                 :       7356 : t9_Vdrainp_sourcep=((wvcoxrds_Vdrainp_sourcep*abulk)+(wvcoxrds*abulk_Vdrainp_sourcep));
    8064                 :       7356 : t9_Vdrainb_sourcep=((wvcoxrds_Vdrainb_sourcep*abulk)+(wvcoxrds*abulk_Vdrainb_sourcep));
    8065                 :       7356 : t9_Vbulkp_sourcep=((wvcoxrds_Vbulkp_sourcep*abulk)+(wvcoxrds*abulk_Vbulkp_sourcep));
    8066                 :       7356 : t9_Vsourceb_sourcep=((wvcoxrds_Vsourceb_sourcep*abulk)+(wvcoxrds*abulk_Vsourceb_sourcep));
    8067                 :            : #endif
    8068                 :       7356 : t9=(wvcoxrds*abulk);
    8069                 :            : #if defined(_DERIVATE)
    8070                 :       7356 : t1_Vgatep_sourcep=((-2.0*Lambda_Vgatep_sourcep/Lambda/Lambda)+t9_Vgatep_sourcep);
    8071                 :       7356 : t1_Vdrainp_sourcep=((-2.0*Lambda_Vdrainp_sourcep/Lambda/Lambda)+t9_Vdrainp_sourcep);
    8072                 :       7356 : t1_Vdrainb_sourcep=((-2.0*Lambda_Vdrainb_sourcep/Lambda/Lambda)+t9_Vdrainb_sourcep);
    8073                 :       7356 : t1_Vbulkp_sourcep=((-2.0*Lambda_Vbulkp_sourcep/Lambda/Lambda)+t9_Vbulkp_sourcep);
    8074                 :       7356 : t1_Vsourceb_sourcep=((-2.0*Lambda_Vsourceb_sourcep/Lambda/Lambda)+t9_Vsourceb_sourcep);
    8075                 :            : #endif
    8076                 :       7356 : t1=(((2.0/Lambda)-1.0)+t9);
    8077                 :            : #if defined(_DERIVATE)
    8078                 :       7356 : vasat_Vgatep_sourcep=((t0_Vgatep_sourcep*t1-t0*t1_Vgatep_sourcep)/t1/t1);
    8079                 :       7356 : vasat_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t1-t0*t1_Vdrainp_sourcep)/t1/t1);
    8080                 :       7356 : vasat_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t1-t0*t1_Vdrainb_sourcep)/t1/t1);
    8081                 :       7356 : vasat_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t1-t0*t1_Vbulkp_sourcep)/t1/t1);
    8082                 :       7356 : vasat_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t1-t0*t1_Vsourceb_sourcep)/t1/t1);
    8083                 :            : #endif
    8084                 :       7356 : vasat=(t0/t1);
    8085                 :            : #if defined(_DERIVATE)
    8086                 :       7356 : tmp1_Vgatep_sourcep=0.0;
    8087                 :       7356 : tmp1_Vdrainp_sourcep=0.0;
    8088                 :       7356 : tmp1_Vdrainb_sourcep=0.0;
    8089                 :       7356 : tmp1_Vbulkp_sourcep=0.0;
    8090                 :       7356 : tmp1_Vsourceb_sourcep=0.0;
    8091                 :            : #endif
    8092                 :       7356 : tmp1=vtfbphi2;
    8093                 :            : #if defined(_DERIVATE)
    8094                 :       7356 : tmp2_Vgatep_sourcep=0.0;
    8095                 :       7356 : tmp2_Vdrainp_sourcep=0.0;
    8096                 :       7356 : tmp2_Vdrainb_sourcep=0.0;
    8097                 :       7356 : tmp2_Vbulkp_sourcep=0.0;
    8098                 :       7356 : tmp2_Vsourceb_sourcep=0.0;
    8099                 :            : #endif
    8100                 :       7356 : tmp2=(2.0e8*toxp);
    8101                 :            : #if defined(_DERIVATE)
    8102                 :       7356 : dt0_dvg_Vgatep_sourcep=(-tmp2_Vgatep_sourcep/tmp2/tmp2);
    8103                 :       7356 : dt0_dvg_Vdrainp_sourcep=(-tmp2_Vdrainp_sourcep/tmp2/tmp2);
    8104                 :       7356 : dt0_dvg_Vdrainb_sourcep=(-tmp2_Vdrainb_sourcep/tmp2/tmp2);
    8105                 :       7356 : dt0_dvg_Vbulkp_sourcep=(-tmp2_Vbulkp_sourcep/tmp2/tmp2);
    8106                 :       7356 : dt0_dvg_Vsourceb_sourcep=(-tmp2_Vsourceb_sourcep/tmp2/tmp2);
    8107                 :            : #endif
    8108                 :       7356 : dt0_dvg=(1.0/tmp2);
    8109                 :            : #if defined(_DERIVATE)
    8110                 :       7356 : t0_Vgatep_sourcep=(((vgsteff_Vgatep_sourcep+tmp1_Vgatep_sourcep)*dt0_dvg)+((vgsteff+tmp1)*dt0_dvg_Vgatep_sourcep));
    8111                 :       7356 : t0_Vdrainp_sourcep=(((vgsteff_Vdrainp_sourcep+tmp1_Vdrainp_sourcep)*dt0_dvg)+((vgsteff+tmp1)*dt0_dvg_Vdrainp_sourcep));
    8112                 :       7356 : t0_Vdrainb_sourcep=(((vgsteff_Vdrainb_sourcep+tmp1_Vdrainb_sourcep)*dt0_dvg)+((vgsteff+tmp1)*dt0_dvg_Vdrainb_sourcep));
    8113                 :       7356 : t0_Vbulkp_sourcep=(((vgsteff_Vbulkp_sourcep+tmp1_Vbulkp_sourcep)*dt0_dvg)+((vgsteff+tmp1)*dt0_dvg_Vbulkp_sourcep));
    8114                 :       7356 : t0_Vsourceb_sourcep=(((vgsteff_Vsourceb_sourcep+tmp1_Vsourceb_sourcep)*dt0_dvg)+((vgsteff+tmp1)*dt0_dvg_Vsourceb_sourcep));
    8115                 :            : #endif
    8116                 :       7356 : t0=((vgsteff+tmp1)*dt0_dvg);
    8117                 :            : {
    8118                 :       7356 : double m00_logE(d00_logE0,t0)
    8119                 :       7356 : double m00_exp(d00_exp1,(0.7*d00_logE0))
    8120                 :            : #if defined(_DERIVATE)
    8121                 :       7356 : double m10_logE(d10_logE0,d00_logE0,t0)
    8122                 :            : #define d10_exp1 d00_exp1
    8123                 :            : #endif
    8124                 :            : #if defined(_DERIVATE)
    8125                 :       7356 : tmp3_Vgatep_sourcep=(0.7*t0_Vgatep_sourcep*d10_logE0)*d10_exp1;
    8126                 :       7356 : tmp3_Vdrainp_sourcep=(0.7*t0_Vdrainp_sourcep*d10_logE0)*d10_exp1;
    8127                 :       7356 : tmp3_Vdrainb_sourcep=(0.7*t0_Vdrainb_sourcep*d10_logE0)*d10_exp1;
    8128                 :       7356 : tmp3_Vbulkp_sourcep=(0.7*t0_Vbulkp_sourcep*d10_logE0)*d10_exp1;
    8129                 :       7356 : tmp3_Vsourceb_sourcep=(0.7*t0_Vsourceb_sourcep*d10_logE0)*d10_exp1;
    8130                 :            : #endif
    8131                 :       7356 : tmp3=d00_exp1;
    8132                 :            : }
    8133                 :            : #if defined(_DERIVATE)
    8134                 :       7356 : t1_Vgatep_sourcep=tmp3_Vgatep_sourcep;
    8135                 :       7356 : t1_Vdrainp_sourcep=tmp3_Vdrainp_sourcep;
    8136                 :       7356 : t1_Vdrainb_sourcep=tmp3_Vdrainb_sourcep;
    8137                 :       7356 : t1_Vbulkp_sourcep=tmp3_Vbulkp_sourcep;
    8138                 :       7356 : t1_Vsourceb_sourcep=tmp3_Vsourceb_sourcep;
    8139                 :            : #endif
    8140                 :       7356 : t1=(1.0+tmp3);
    8141                 :            : #if defined(_DERIVATE)
    8142                 :       7356 : tcen_Vgatep_sourcep=(-1.9e-9*t1_Vgatep_sourcep/t1/t1);
    8143                 :       7356 : tcen_Vdrainp_sourcep=(-1.9e-9*t1_Vdrainp_sourcep/t1/t1);
    8144                 :       7356 : tcen_Vdrainb_sourcep=(-1.9e-9*t1_Vdrainb_sourcep/t1/t1);
    8145                 :       7356 : tcen_Vbulkp_sourcep=(-1.9e-9*t1_Vbulkp_sourcep/t1/t1);
    8146                 :       7356 : tcen_Vsourceb_sourcep=(-1.9e-9*t1_Vsourceb_sourcep/t1/t1);
    8147                 :            : #endif
    8148                 :       7356 : tcen=(1.9e-9/t1);
    8149                 :            : #if defined(_DERIVATE)
    8150                 :       7356 : coxeff_Vgatep_sourcep=(-(1.03594e-10*coxp)*(coxp*tcen_Vgatep_sourcep)/(1.03594e-10+(coxp*tcen))/(1.03594e-10+(coxp*tcen)));
    8151                 :       7356 : coxeff_Vdrainp_sourcep=(-(1.03594e-10*coxp)*(coxp*tcen_Vdrainp_sourcep)/(1.03594e-10+(coxp*tcen))/(1.03594e-10+(coxp*tcen)));
    8152                 :       7356 : coxeff_Vdrainb_sourcep=(-(1.03594e-10*coxp)*(coxp*tcen_Vdrainb_sourcep)/(1.03594e-10+(coxp*tcen))/(1.03594e-10+(coxp*tcen)));
    8153                 :       7356 : coxeff_Vbulkp_sourcep=(-(1.03594e-10*coxp)*(coxp*tcen_Vbulkp_sourcep)/(1.03594e-10+(coxp*tcen))/(1.03594e-10+(coxp*tcen)));
    8154                 :       7356 : coxeff_Vsourceb_sourcep=(-(1.03594e-10*coxp)*(coxp*tcen_Vsourceb_sourcep)/(1.03594e-10+(coxp*tcen))/(1.03594e-10+(coxp*tcen)));
    8155                 :            : #endif
    8156                 :       7356 : coxeff=((1.03594e-10*coxp)/(1.03594e-10+(coxp*tcen)));
    8157                 :            : #if defined(_DERIVATE)
    8158                 :       7356 : coxeffwovl_Vgatep_sourcep=(((coxeff_Vgatep_sourcep*Weff)+(coxeff*Weff_Vgatep_sourcep))/leff);
    8159                 :       7356 : coxeffwovl_Vdrainp_sourcep=(((coxeff_Vdrainp_sourcep*Weff)+(coxeff*Weff_Vdrainp_sourcep))/leff);
    8160                 :       7356 : coxeffwovl_Vdrainb_sourcep=(((coxeff_Vdrainb_sourcep*Weff)+(coxeff*Weff_Vdrainb_sourcep))/leff);
    8161                 :       7356 : coxeffwovl_Vbulkp_sourcep=(((coxeff_Vbulkp_sourcep*Weff)+(coxeff*Weff_Vbulkp_sourcep))/leff);
    8162                 :       7356 : coxeffwovl_Vsourceb_sourcep=(((coxeff_Vsourceb_sourcep*Weff)+(coxeff*Weff_Vsourceb_sourcep))/leff);
    8163                 :            : #endif
    8164                 :       7356 : coxeffwovl=((coxeff*Weff)/leff);
    8165                 :            : #if defined(_DERIVATE)
    8166                 :       7356 : beta_Vgatep_sourcep=((ueff_Vgatep_sourcep*coxeffwovl)+(ueff*coxeffwovl_Vgatep_sourcep));
    8167                 :       7356 : beta_Vdrainp_sourcep=((ueff_Vdrainp_sourcep*coxeffwovl)+(ueff*coxeffwovl_Vdrainp_sourcep));
    8168                 :       7356 : beta_Vdrainb_sourcep=((ueff_Vdrainb_sourcep*coxeffwovl)+(ueff*coxeffwovl_Vdrainb_sourcep));
    8169                 :       7356 : beta_Vbulkp_sourcep=((ueff_Vbulkp_sourcep*coxeffwovl)+(ueff*coxeffwovl_Vbulkp_sourcep));
    8170                 :       7356 : beta_Vsourceb_sourcep=((ueff_Vsourceb_sourcep*coxeffwovl)+(ueff*coxeffwovl_Vsourceb_sourcep));
    8171                 :            : #endif
    8172                 :       7356 : beta=(ueff*coxeffwovl);
    8173                 :            : #if defined(_DERIVATE)
    8174                 :       7356 : abovvgst2vtm_Vgatep_sourcep=((abulk_Vgatep_sourcep*vgst2vtm-abulk*vgst2vtm_Vgatep_sourcep)/vgst2vtm/vgst2vtm);
    8175                 :       7356 : abovvgst2vtm_Vdrainp_sourcep=((abulk_Vdrainp_sourcep*vgst2vtm-abulk*vgst2vtm_Vdrainp_sourcep)/vgst2vtm/vgst2vtm);
    8176                 :       7356 : abovvgst2vtm_Vdrainb_sourcep=((abulk_Vdrainb_sourcep*vgst2vtm-abulk*vgst2vtm_Vdrainb_sourcep)/vgst2vtm/vgst2vtm);
    8177                 :       7356 : abovvgst2vtm_Vbulkp_sourcep=((abulk_Vbulkp_sourcep*vgst2vtm-abulk*vgst2vtm_Vbulkp_sourcep)/vgst2vtm/vgst2vtm);
    8178                 :       7356 : abovvgst2vtm_Vsourceb_sourcep=((abulk_Vsourceb_sourcep*vgst2vtm-abulk*vgst2vtm_Vsourceb_sourcep)/vgst2vtm/vgst2vtm);
    8179                 :            : #endif
    8180                 :       7356 : abovvgst2vtm=(abulk/vgst2vtm);
    8181                 :            : #if defined(_DERIVATE)
    8182                 :       7356 : t0_Vgatep_sourcep=(-(((0.5*vdseff_Vgatep_sourcep)*abovvgst2vtm)+((0.5*vdseff)*abovvgst2vtm_Vgatep_sourcep)));
    8183                 :       7356 : t0_Vdrainp_sourcep=(-(((0.5*vdseff_Vdrainp_sourcep)*abovvgst2vtm)+((0.5*vdseff)*abovvgst2vtm_Vdrainp_sourcep)));
    8184                 :       7356 : t0_Vdrainb_sourcep=(-(((0.5*vdseff_Vdrainb_sourcep)*abovvgst2vtm)+((0.5*vdseff)*abovvgst2vtm_Vdrainb_sourcep)));
    8185                 :       7356 : t0_Vbulkp_sourcep=(-(((0.5*vdseff_Vbulkp_sourcep)*abovvgst2vtm)+((0.5*vdseff)*abovvgst2vtm_Vbulkp_sourcep)));
    8186                 :       7356 : t0_Vsourceb_sourcep=(-(((0.5*vdseff_Vsourceb_sourcep)*abovvgst2vtm)+((0.5*vdseff)*abovvgst2vtm_Vsourceb_sourcep)));
    8187                 :            : #endif
    8188                 :       7356 : t0=(1.0-((0.5*vdseff)*abovvgst2vtm));
    8189                 :            : #if defined(_DERIVATE)
    8190                 :       7356 : fgche1_Vgatep_sourcep=((vgsteff_Vgatep_sourcep*t0)+(vgsteff*t0_Vgatep_sourcep));
    8191                 :       7356 : fgche1_Vdrainp_sourcep=((vgsteff_Vdrainp_sourcep*t0)+(vgsteff*t0_Vdrainp_sourcep));
    8192                 :       7356 : fgche1_Vdrainb_sourcep=((vgsteff_Vdrainb_sourcep*t0)+(vgsteff*t0_Vdrainb_sourcep));
    8193                 :       7356 : fgche1_Vbulkp_sourcep=((vgsteff_Vbulkp_sourcep*t0)+(vgsteff*t0_Vbulkp_sourcep));
    8194                 :       7356 : fgche1_Vsourceb_sourcep=((vgsteff_Vsourceb_sourcep*t0)+(vgsteff*t0_Vsourceb_sourcep));
    8195                 :            : #endif
    8196                 :       7356 : fgche1=(vgsteff*t0);
    8197                 :            : #if defined(_DERIVATE)
    8198                 :       7356 : t9_Vgatep_sourcep=((vdseff_Vgatep_sourcep*esatl-vdseff*esatl_Vgatep_sourcep)/esatl/esatl);
    8199                 :       7356 : t9_Vdrainp_sourcep=((vdseff_Vdrainp_sourcep*esatl-vdseff*esatl_Vdrainp_sourcep)/esatl/esatl);
    8200                 :       7356 : t9_Vdrainb_sourcep=((vdseff_Vdrainb_sourcep*esatl-vdseff*esatl_Vdrainb_sourcep)/esatl/esatl);
    8201                 :       7356 : t9_Vbulkp_sourcep=((vdseff_Vbulkp_sourcep*esatl-vdseff*esatl_Vbulkp_sourcep)/esatl/esatl);
    8202                 :       7356 : t9_Vsourceb_sourcep=((vdseff_Vsourceb_sourcep*esatl-vdseff*esatl_Vsourceb_sourcep)/esatl/esatl);
    8203                 :            : #endif
    8204                 :       7356 : t9=(vdseff/esatl);
    8205                 :            : #if defined(_DERIVATE)
    8206                 :       7356 : fgche2_Vgatep_sourcep=t9_Vgatep_sourcep;
    8207                 :       7356 : fgche2_Vdrainp_sourcep=t9_Vdrainp_sourcep;
    8208                 :       7356 : fgche2_Vdrainb_sourcep=t9_Vdrainb_sourcep;
    8209                 :       7356 : fgche2_Vbulkp_sourcep=t9_Vbulkp_sourcep;
    8210                 :       7356 : fgche2_Vsourceb_sourcep=t9_Vsourceb_sourcep;
    8211                 :            : #endif
    8212                 :       7356 : fgche2=(1.0+t9);
    8213                 :            : #if defined(_DERIVATE)
    8214                 :       7356 : gche_Vgatep_sourcep=((((beta_Vgatep_sourcep*fgche1)+(beta*fgche1_Vgatep_sourcep))*fgche2-(beta*fgche1)*fgche2_Vgatep_sourcep)/fgche2/fgche2);
    8215                 :       7356 : gche_Vdrainp_sourcep=((((beta_Vdrainp_sourcep*fgche1)+(beta*fgche1_Vdrainp_sourcep))*fgche2-(beta*fgche1)*fgche2_Vdrainp_sourcep)/fgche2/fgche2);
    8216                 :       7356 : gche_Vdrainb_sourcep=((((beta_Vdrainb_sourcep*fgche1)+(beta*fgche1_Vdrainb_sourcep))*fgche2-(beta*fgche1)*fgche2_Vdrainb_sourcep)/fgche2/fgche2);
    8217                 :       7356 : gche_Vbulkp_sourcep=((((beta_Vbulkp_sourcep*fgche1)+(beta*fgche1_Vbulkp_sourcep))*fgche2-(beta*fgche1)*fgche2_Vbulkp_sourcep)/fgche2/fgche2);
    8218                 :       7356 : gche_Vsourceb_sourcep=((((beta_Vsourceb_sourcep*fgche1)+(beta*fgche1_Vsourceb_sourcep))*fgche2-(beta*fgche1)*fgche2_Vsourceb_sourcep)/fgche2/fgche2);
    8219                 :            : #endif
    8220                 :       7356 : gche=((beta*fgche1)/fgche2);
    8221                 :            : #if defined(_DERIVATE)
    8222                 :       7356 : t0_Vgatep_sourcep=((gche_Vgatep_sourcep*rds)+(gche*rds_Vgatep_sourcep));
    8223                 :       7356 : t0_Vdrainp_sourcep=((gche_Vdrainp_sourcep*rds)+(gche*rds_Vdrainp_sourcep));
    8224                 :       7356 : t0_Vdrainb_sourcep=((gche_Vdrainb_sourcep*rds)+(gche*rds_Vdrainb_sourcep));
    8225                 :       7356 : t0_Vbulkp_sourcep=((gche_Vbulkp_sourcep*rds)+(gche*rds_Vbulkp_sourcep));
    8226                 :       7356 : t0_Vsourceb_sourcep=((gche_Vsourceb_sourcep*rds)+(gche*rds_Vsourceb_sourcep));
    8227                 :            : #endif
    8228                 :       7356 : t0=(1.0+(gche*rds));
    8229                 :            : #if defined(_DERIVATE)
    8230                 :       7356 : idl_Vgatep_sourcep=((gche_Vgatep_sourcep*t0-gche*t0_Vgatep_sourcep)/t0/t0);
    8231                 :       7356 : idl_Vdrainp_sourcep=((gche_Vdrainp_sourcep*t0-gche*t0_Vdrainp_sourcep)/t0/t0);
    8232                 :       7356 : idl_Vdrainb_sourcep=((gche_Vdrainb_sourcep*t0-gche*t0_Vdrainb_sourcep)/t0/t0);
    8233                 :       7356 : idl_Vbulkp_sourcep=((gche_Vbulkp_sourcep*t0-gche*t0_Vbulkp_sourcep)/t0/t0);
    8234                 :       7356 : idl_Vsourceb_sourcep=((gche_Vsourceb_sourcep*t0-gche*t0_Vsourceb_sourcep)/t0/t0);
    8235                 :            : #endif
    8236                 :       7356 : idl=(gche/t0);
    8237         [ +  - ]:       7356 : if
    8238                 :            : (fprout<=0.0)
    8239                 :            : {
    8240                 :            : #if defined(_DERIVATE)
    8241                 :       7356 : fp_Vgatep_sourcep=0.0;
    8242                 :       7356 : fp_Vdrainp_sourcep=0.0;
    8243                 :       7356 : fp_Vdrainb_sourcep=0.0;
    8244                 :       7356 : fp_Vbulkp_sourcep=0.0;
    8245                 :       7356 : fp_Vsourceb_sourcep=0.0;
    8246                 :            : #endif
    8247                 :       7356 : fp=1.0;
    8248                 :            : }
    8249                 :            : else
    8250                 :            : {
    8251                 :            : {
    8252                 :          0 : double m00_sqrt(d00_sqrt0,leff)
    8253                 :            : #if defined(_DERIVATE)
    8254                 :          0 : t9_Vgatep_sourcep=(-(fprout*d00_sqrt0)*vgst2vtm_Vgatep_sourcep/vgst2vtm/vgst2vtm);
    8255                 :          0 : t9_Vdrainp_sourcep=(-(fprout*d00_sqrt0)*vgst2vtm_Vdrainp_sourcep/vgst2vtm/vgst2vtm);
    8256                 :          0 : t9_Vdrainb_sourcep=(-(fprout*d00_sqrt0)*vgst2vtm_Vdrainb_sourcep/vgst2vtm/vgst2vtm);
    8257                 :          0 : t9_Vbulkp_sourcep=(-(fprout*d00_sqrt0)*vgst2vtm_Vbulkp_sourcep/vgst2vtm/vgst2vtm);
    8258                 :          0 : t9_Vsourceb_sourcep=(-(fprout*d00_sqrt0)*vgst2vtm_Vsourceb_sourcep/vgst2vtm/vgst2vtm);
    8259                 :            : #endif
    8260                 :          0 : t9=((fprout*d00_sqrt0)/vgst2vtm);
    8261                 :            : }
    8262                 :            : #if defined(_DERIVATE)
    8263                 :          0 : fp_Vgatep_sourcep=(-t9_Vgatep_sourcep/(1.0+t9)/(1.0+t9));
    8264                 :          0 : fp_Vdrainp_sourcep=(-t9_Vdrainp_sourcep/(1.0+t9)/(1.0+t9));
    8265                 :          0 : fp_Vdrainb_sourcep=(-t9_Vdrainb_sourcep/(1.0+t9)/(1.0+t9));
    8266                 :          0 : fp_Vbulkp_sourcep=(-t9_Vbulkp_sourcep/(1.0+t9)/(1.0+t9));
    8267                 :          0 : fp_Vsourceb_sourcep=(-t9_Vsourceb_sourcep/(1.0+t9)/(1.0+t9));
    8268                 :            : #endif
    8269                 :          0 : fp=(1.0/(1.0+t9));
    8270                 :            : }
    8271                 :            : #if defined(_DERIVATE)
    8272                 :       7356 : t8_Vgatep_sourcep=(-pvag*esatl_Vgatep_sourcep/esatl/esatl);
    8273                 :       7356 : t8_Vdrainp_sourcep=(-pvag*esatl_Vdrainp_sourcep/esatl/esatl);
    8274                 :       7356 : t8_Vdrainb_sourcep=(-pvag*esatl_Vdrainb_sourcep/esatl/esatl);
    8275                 :       7356 : t8_Vbulkp_sourcep=(-pvag*esatl_Vbulkp_sourcep/esatl/esatl);
    8276                 :       7356 : t8_Vsourceb_sourcep=(-pvag*esatl_Vsourceb_sourcep/esatl/esatl);
    8277                 :            : #endif
    8278                 :       7356 : t8=(pvag/esatl);
    8279                 :            : #if defined(_DERIVATE)
    8280                 :       7356 : t9_Vgatep_sourcep=((t8_Vgatep_sourcep*vgsteff)+(t8*vgsteff_Vgatep_sourcep));
    8281                 :       7356 : t9_Vdrainp_sourcep=((t8_Vdrainp_sourcep*vgsteff)+(t8*vgsteff_Vdrainp_sourcep));
    8282                 :       7356 : t9_Vdrainb_sourcep=((t8_Vdrainb_sourcep*vgsteff)+(t8*vgsteff_Vdrainb_sourcep));
    8283                 :       7356 : t9_Vbulkp_sourcep=((t8_Vbulkp_sourcep*vgsteff)+(t8*vgsteff_Vbulkp_sourcep));
    8284                 :       7356 : t9_Vsourceb_sourcep=((t8_Vsourceb_sourcep*vgsteff)+(t8*vgsteff_Vsourceb_sourcep));
    8285                 :            : #endif
    8286                 :       7356 : t9=(t8*vgsteff);
    8287         [ +  - ]:       7356 : if
    8288                 :            : (t9>(-0.9))
    8289                 :            : {
    8290                 :            : #if defined(_DERIVATE)
    8291                 :       7356 : pvagterm_Vgatep_sourcep=t9_Vgatep_sourcep;
    8292                 :       7356 : pvagterm_Vdrainp_sourcep=t9_Vdrainp_sourcep;
    8293                 :       7356 : pvagterm_Vdrainb_sourcep=t9_Vdrainb_sourcep;
    8294                 :       7356 : pvagterm_Vbulkp_sourcep=t9_Vbulkp_sourcep;
    8295                 :       7356 : pvagterm_Vsourceb_sourcep=t9_Vsourceb_sourcep;
    8296                 :            : #endif
    8297                 :       7356 : pvagterm=(1.0+t9);
    8298                 :            : }
    8299                 :            : else
    8300                 :            : {
    8301                 :            : #if defined(_DERIVATE)
    8302                 :          0 : t4_Vgatep_sourcep=(-(20.0*t9_Vgatep_sourcep)/(17.0+(20.0*t9))/(17.0+(20.0*t9)));
    8303                 :          0 : t4_Vdrainp_sourcep=(-(20.0*t9_Vdrainp_sourcep)/(17.0+(20.0*t9))/(17.0+(20.0*t9)));
    8304                 :          0 : t4_Vdrainb_sourcep=(-(20.0*t9_Vdrainb_sourcep)/(17.0+(20.0*t9))/(17.0+(20.0*t9)));
    8305                 :          0 : t4_Vbulkp_sourcep=(-(20.0*t9_Vbulkp_sourcep)/(17.0+(20.0*t9))/(17.0+(20.0*t9)));
    8306                 :          0 : t4_Vsourceb_sourcep=(-(20.0*t9_Vsourceb_sourcep)/(17.0+(20.0*t9))/(17.0+(20.0*t9)));
    8307                 :            : #endif
    8308                 :          0 : t4=(1.0/(17.0+(20.0*t9)));
    8309                 :            : #if defined(_DERIVATE)
    8310                 :          0 : pvagterm_Vgatep_sourcep=((t9_Vgatep_sourcep*t4)+((0.8+t9)*t4_Vgatep_sourcep));
    8311                 :          0 : pvagterm_Vdrainp_sourcep=((t9_Vdrainp_sourcep*t4)+((0.8+t9)*t4_Vdrainp_sourcep));
    8312                 :          0 : pvagterm_Vdrainb_sourcep=((t9_Vdrainb_sourcep*t4)+((0.8+t9)*t4_Vdrainb_sourcep));
    8313                 :          0 : pvagterm_Vbulkp_sourcep=((t9_Vbulkp_sourcep*t4)+((0.8+t9)*t4_Vbulkp_sourcep));
    8314                 :          0 : pvagterm_Vsourceb_sourcep=((t9_Vsourceb_sourcep*t4)+((0.8+t9)*t4_Vsourceb_sourcep));
    8315                 :            : #endif
    8316                 :          0 : pvagterm=((0.8+t9)*t4);
    8317                 :            : }
    8318 [ +  - ][ +  + ]:       7356 : if
    8319                 :            : ((pclm>0.0)&&(diffvds>1.0e-10))
    8320                 :            : {
    8321                 :            : #if defined(_DERIVATE)
    8322                 :       5244 : t0_Vgatep_sourcep=((rds_Vgatep_sourcep*idl)+(rds*idl_Vgatep_sourcep));
    8323                 :       5244 : t0_Vdrainp_sourcep=((rds_Vdrainp_sourcep*idl)+(rds*idl_Vdrainp_sourcep));
    8324                 :       5244 : t0_Vdrainb_sourcep=((rds_Vdrainb_sourcep*idl)+(rds*idl_Vdrainb_sourcep));
    8325                 :       5244 : t0_Vbulkp_sourcep=((rds_Vbulkp_sourcep*idl)+(rds*idl_Vbulkp_sourcep));
    8326                 :       5244 : t0_Vsourceb_sourcep=((rds_Vsourceb_sourcep*idl)+(rds*idl_Vsourceb_sourcep));
    8327                 :            : #endif
    8328                 :       5244 : t0=(1.0+(rds*idl));
    8329                 :            : #if defined(_DERIVATE)
    8330                 :       5244 : t2_Vgatep_sourcep=((vdsat_Vgatep_sourcep*esat-vdsat*esat_Vgatep_sourcep)/esat/esat);
    8331                 :       5244 : t2_Vdrainp_sourcep=((vdsat_Vdrainp_sourcep*esat-vdsat*esat_Vdrainp_sourcep)/esat/esat);
    8332                 :       5244 : t2_Vdrainb_sourcep=((vdsat_Vdrainb_sourcep*esat-vdsat*esat_Vdrainb_sourcep)/esat/esat);
    8333                 :       5244 : t2_Vbulkp_sourcep=((vdsat_Vbulkp_sourcep*esat-vdsat*esat_Vbulkp_sourcep)/esat/esat);
    8334                 :       5244 : t2_Vsourceb_sourcep=((vdsat_Vsourceb_sourcep*esat-vdsat*esat_Vsourceb_sourcep)/esat/esat);
    8335                 :            : #endif
    8336                 :       5244 : t2=(vdsat/esat);
    8337                 :            : #if defined(_DERIVATE)
    8338                 :       5244 : t1_Vgatep_sourcep=t2_Vgatep_sourcep;
    8339                 :       5244 : t1_Vdrainp_sourcep=t2_Vdrainp_sourcep;
    8340                 :       5244 : t1_Vdrainb_sourcep=t2_Vdrainb_sourcep;
    8341                 :       5244 : t1_Vbulkp_sourcep=t2_Vbulkp_sourcep;
    8342                 :       5244 : t1_Vsourceb_sourcep=t2_Vsourceb_sourcep;
    8343                 :            : #endif
    8344                 :       5244 : t1=(leff+t2);
    8345                 :            : #if defined(_DERIVATE)
    8346                 :       5244 : cclm_Vgatep_sourcep=(((((((fp_Vgatep_sourcep*pvagterm)+(fp*pvagterm_Vgatep_sourcep))*t0)+((fp*pvagterm)*t0_Vgatep_sourcep))*t1)+(((fp*pvagterm)*t0)*t1_Vgatep_sourcep))/(pclm*litl));
    8347                 :       5244 : cclm_Vdrainp_sourcep=(((((((fp_Vdrainp_sourcep*pvagterm)+(fp*pvagterm_Vdrainp_sourcep))*t0)+((fp*pvagterm)*t0_Vdrainp_sourcep))*t1)+(((fp*pvagterm)*t0)*t1_Vdrainp_sourcep))/(pclm*litl));
    8348                 :       5244 : cclm_Vdrainb_sourcep=(((((((fp_Vdrainb_sourcep*pvagterm)+(fp*pvagterm_Vdrainb_sourcep))*t0)+((fp*pvagterm)*t0_Vdrainb_sourcep))*t1)+(((fp*pvagterm)*t0)*t1_Vdrainb_sourcep))/(pclm*litl));
    8349                 :       5244 : cclm_Vbulkp_sourcep=(((((((fp_Vbulkp_sourcep*pvagterm)+(fp*pvagterm_Vbulkp_sourcep))*t0)+((fp*pvagterm)*t0_Vbulkp_sourcep))*t1)+(((fp*pvagterm)*t0)*t1_Vbulkp_sourcep))/(pclm*litl));
    8350                 :       5244 : cclm_Vsourceb_sourcep=(((((((fp_Vsourceb_sourcep*pvagterm)+(fp*pvagterm_Vsourceb_sourcep))*t0)+((fp*pvagterm)*t0_Vsourceb_sourcep))*t1)+(((fp*pvagterm)*t0)*t1_Vsourceb_sourcep))/(pclm*litl));
    8351                 :            : #endif
    8352                 :       5244 : cclm=((((fp*pvagterm)*t0)*t1)/(pclm*litl));
    8353                 :            : #if defined(_DERIVATE)
    8354                 :       5244 : vaclm_Vgatep_sourcep=((cclm_Vgatep_sourcep*diffvds)+(cclm*diffvds_Vgatep_sourcep));
    8355                 :       5244 : vaclm_Vdrainp_sourcep=((cclm_Vdrainp_sourcep*diffvds)+(cclm*diffvds_Vdrainp_sourcep));
    8356                 :       5244 : vaclm_Vdrainb_sourcep=((cclm_Vdrainb_sourcep*diffvds)+(cclm*diffvds_Vdrainb_sourcep));
    8357                 :       5244 : vaclm_Vbulkp_sourcep=((cclm_Vbulkp_sourcep*diffvds)+(cclm*diffvds_Vbulkp_sourcep));
    8358                 :       5244 : vaclm_Vsourceb_sourcep=((cclm_Vsourceb_sourcep*diffvds)+(cclm*diffvds_Vsourceb_sourcep));
    8359                 :            : #endif
    8360                 :       5244 : vaclm=(cclm*diffvds);
    8361                 :            : }
    8362                 :            : else
    8363                 :            : {
    8364                 :            : #if defined(_DERIVATE)
    8365                 :       2112 : vaclm_Vgatep_sourcep=0.0;
    8366                 :       2112 : vaclm_Vdrainp_sourcep=0.0;
    8367                 :       2112 : vaclm_Vdrainb_sourcep=0.0;
    8368                 :       2112 : vaclm_Vbulkp_sourcep=0.0;
    8369                 :       2112 : vaclm_Vsourceb_sourcep=0.0;
    8370                 :            : #endif
    8371                 :       2112 : vaclm=5.834617425e14;
    8372                 :            : #if defined(_DERIVATE)
    8373                 :       2112 : cclm_Vgatep_sourcep=0.0;
    8374                 :       2112 : cclm_Vdrainp_sourcep=0.0;
    8375                 :       2112 : cclm_Vdrainb_sourcep=0.0;
    8376                 :       2112 : cclm_Vbulkp_sourcep=0.0;
    8377                 :       2112 : cclm_Vsourceb_sourcep=0.0;
    8378                 :            : #endif
    8379                 :       2112 : cclm=5.834617425e14;
    8380                 :            : }
    8381         [ +  - ]:       7356 : if
    8382                 :            : (thetarout>0.0)
    8383                 :            : {
    8384                 :            : #if defined(_DERIVATE)
    8385                 :       7356 : t8_Vgatep_sourcep=((abulk_Vgatep_sourcep*vdsat)+(abulk*vdsat_Vgatep_sourcep));
    8386                 :       7356 : t8_Vdrainp_sourcep=((abulk_Vdrainp_sourcep*vdsat)+(abulk*vdsat_Vdrainp_sourcep));
    8387                 :       7356 : t8_Vdrainb_sourcep=((abulk_Vdrainb_sourcep*vdsat)+(abulk*vdsat_Vdrainb_sourcep));
    8388                 :       7356 : t8_Vbulkp_sourcep=((abulk_Vbulkp_sourcep*vdsat)+(abulk*vdsat_Vbulkp_sourcep));
    8389                 :       7356 : t8_Vsourceb_sourcep=((abulk_Vsourceb_sourcep*vdsat)+(abulk*vdsat_Vsourceb_sourcep));
    8390                 :            : #endif
    8391                 :       7356 : t8=(abulk*vdsat);
    8392                 :            : #if defined(_DERIVATE)
    8393                 :       7356 : t0_Vgatep_sourcep=((vgst2vtm_Vgatep_sourcep*t8)+(vgst2vtm*t8_Vgatep_sourcep));
    8394                 :       7356 : t0_Vdrainp_sourcep=((vgst2vtm_Vdrainp_sourcep*t8)+(vgst2vtm*t8_Vdrainp_sourcep));
    8395                 :       7356 : t0_Vdrainb_sourcep=((vgst2vtm_Vdrainb_sourcep*t8)+(vgst2vtm*t8_Vdrainb_sourcep));
    8396                 :       7356 : t0_Vbulkp_sourcep=((vgst2vtm_Vbulkp_sourcep*t8)+(vgst2vtm*t8_Vbulkp_sourcep));
    8397                 :       7356 : t0_Vsourceb_sourcep=((vgst2vtm_Vsourceb_sourcep*t8)+(vgst2vtm*t8_Vsourceb_sourcep));
    8398                 :            : #endif
    8399                 :       7356 : t0=(vgst2vtm*t8);
    8400                 :            : #if defined(_DERIVATE)
    8401                 :       7356 : t1_Vgatep_sourcep=(vgst2vtm_Vgatep_sourcep+t8_Vgatep_sourcep);
    8402                 :       7356 : t1_Vdrainp_sourcep=(vgst2vtm_Vdrainp_sourcep+t8_Vdrainp_sourcep);
    8403                 :       7356 : t1_Vdrainb_sourcep=(vgst2vtm_Vdrainb_sourcep+t8_Vdrainb_sourcep);
    8404                 :       7356 : t1_Vbulkp_sourcep=(vgst2vtm_Vbulkp_sourcep+t8_Vbulkp_sourcep);
    8405                 :       7356 : t1_Vsourceb_sourcep=(vgst2vtm_Vsourceb_sourcep+t8_Vsourceb_sourcep);
    8406                 :            : #endif
    8407                 :       7356 : t1=(vgst2vtm+t8);
    8408                 :            : #if defined(_DERIVATE)
    8409                 :       7356 : t2_Vgatep_sourcep=0.0;
    8410                 :       7356 : t2_Vdrainp_sourcep=0.0;
    8411                 :       7356 : t2_Vdrainb_sourcep=0.0;
    8412                 :       7356 : t2_Vbulkp_sourcep=0.0;
    8413                 :       7356 : t2_Vsourceb_sourcep=0.0;
    8414                 :            : #endif
    8415                 :       7356 : t2=thetarout;
    8416                 :            : #if defined(_DERIVATE)
    8417                 :       7356 : vadibl_Vgatep_sourcep=(((vgst2vtm_Vgatep_sourcep-((t0_Vgatep_sourcep*t1-t0*t1_Vgatep_sourcep)/t1/t1))*t2-(vgst2vtm-(t0/t1))*t2_Vgatep_sourcep)/t2/t2);
    8418                 :       7356 : vadibl_Vdrainp_sourcep=(((vgst2vtm_Vdrainp_sourcep-((t0_Vdrainp_sourcep*t1-t0*t1_Vdrainp_sourcep)/t1/t1))*t2-(vgst2vtm-(t0/t1))*t2_Vdrainp_sourcep)/t2/t2);
    8419                 :       7356 : vadibl_Vdrainb_sourcep=(((vgst2vtm_Vdrainb_sourcep-((t0_Vdrainb_sourcep*t1-t0*t1_Vdrainb_sourcep)/t1/t1))*t2-(vgst2vtm-(t0/t1))*t2_Vdrainb_sourcep)/t2/t2);
    8420                 :       7356 : vadibl_Vbulkp_sourcep=(((vgst2vtm_Vbulkp_sourcep-((t0_Vbulkp_sourcep*t1-t0*t1_Vbulkp_sourcep)/t1/t1))*t2-(vgst2vtm-(t0/t1))*t2_Vbulkp_sourcep)/t2/t2);
    8421                 :       7356 : vadibl_Vsourceb_sourcep=(((vgst2vtm_Vsourceb_sourcep-((t0_Vsourceb_sourcep*t1-t0*t1_Vsourceb_sourcep)/t1/t1))*t2-(vgst2vtm-(t0/t1))*t2_Vsourceb_sourcep)/t2/t2);
    8422                 :            : #endif
    8423                 :       7356 : vadibl=((vgst2vtm-(t0/t1))/t2);
    8424                 :            : #if defined(_DERIVATE)
    8425                 :       7356 : t7_Vgatep_sourcep=0.0;
    8426                 :       7356 : t7_Vdrainp_sourcep=(pdiblb*vbseff_Vdrainp_sourcep);
    8427                 :       7356 : t7_Vdrainb_sourcep=(pdiblb*vbseff_Vdrainb_sourcep);
    8428                 :       7356 : t7_Vbulkp_sourcep=(pdiblb*vbseff_Vbulkp_sourcep);
    8429                 :       7356 : t7_Vsourceb_sourcep=(pdiblb*vbseff_Vsourceb_sourcep);
    8430                 :            : #endif
    8431                 :       7356 : t7=(pdiblb*vbseff);
    8432         [ +  - ]:       7356 : if
    8433                 :            : (t7>=(-0.9))
    8434                 :            : {
    8435                 :            : #if defined(_DERIVATE)
    8436                 :       7356 : t3_Vgatep_sourcep=(-t7_Vgatep_sourcep/(1.0+t7)/(1.0+t7));
    8437                 :       7356 : t3_Vdrainp_sourcep=(-t7_Vdrainp_sourcep/(1.0+t7)/(1.0+t7));
    8438                 :       7356 : t3_Vdrainb_sourcep=(-t7_Vdrainb_sourcep/(1.0+t7)/(1.0+t7));
    8439                 :       7356 : t3_Vbulkp_sourcep=(-t7_Vbulkp_sourcep/(1.0+t7)/(1.0+t7));
    8440                 :       7356 : t3_Vsourceb_sourcep=(-t7_Vsourceb_sourcep/(1.0+t7)/(1.0+t7));
    8441                 :            : #endif
    8442                 :       7356 : t3=(1.0/(1.0+t7));
    8443                 :            : #if defined(_DERIVATE)
    8444                 :       7356 : vadibl_Vgatep_sourcep=((vadibl_Vgatep_sourcep*t3)+(vadibl*t3_Vgatep_sourcep));
    8445                 :       7356 : vadibl_Vdrainp_sourcep=((vadibl_Vdrainp_sourcep*t3)+(vadibl*t3_Vdrainp_sourcep));
    8446                 :       7356 : vadibl_Vdrainb_sourcep=((vadibl_Vdrainb_sourcep*t3)+(vadibl*t3_Vdrainb_sourcep));
    8447                 :       7356 : vadibl_Vbulkp_sourcep=((vadibl_Vbulkp_sourcep*t3)+(vadibl*t3_Vbulkp_sourcep));
    8448                 :       7356 : vadibl_Vsourceb_sourcep=((vadibl_Vsourceb_sourcep*t3)+(vadibl*t3_Vsourceb_sourcep));
    8449                 :            : #endif
    8450                 :       7356 : vadibl=(vadibl*t3);
    8451                 :            : }
    8452                 :            : else
    8453                 :            : {
    8454                 :            : #if defined(_DERIVATE)
    8455                 :          0 : t4_Vgatep_sourcep=(-t7_Vgatep_sourcep/(0.8+t7)/(0.8+t7));
    8456                 :          0 : t4_Vdrainp_sourcep=(-t7_Vdrainp_sourcep/(0.8+t7)/(0.8+t7));
    8457                 :          0 : t4_Vdrainb_sourcep=(-t7_Vdrainb_sourcep/(0.8+t7)/(0.8+t7));
    8458                 :          0 : t4_Vbulkp_sourcep=(-t7_Vbulkp_sourcep/(0.8+t7)/(0.8+t7));
    8459                 :          0 : t4_Vsourceb_sourcep=(-t7_Vsourceb_sourcep/(0.8+t7)/(0.8+t7));
    8460                 :            : #endif
    8461                 :          0 : t4=(1.0/(0.8+t7));
    8462                 :            : #if defined(_DERIVATE)
    8463                 :          0 : t3_Vgatep_sourcep=(((20.0*t7_Vgatep_sourcep)*t4)+((17.0+(20.0*t7))*t4_Vgatep_sourcep));
    8464                 :          0 : t3_Vdrainp_sourcep=(((20.0*t7_Vdrainp_sourcep)*t4)+((17.0+(20.0*t7))*t4_Vdrainp_sourcep));
    8465                 :          0 : t3_Vdrainb_sourcep=(((20.0*t7_Vdrainb_sourcep)*t4)+((17.0+(20.0*t7))*t4_Vdrainb_sourcep));
    8466                 :          0 : t3_Vbulkp_sourcep=(((20.0*t7_Vbulkp_sourcep)*t4)+((17.0+(20.0*t7))*t4_Vbulkp_sourcep));
    8467                 :          0 : t3_Vsourceb_sourcep=(((20.0*t7_Vsourceb_sourcep)*t4)+((17.0+(20.0*t7))*t4_Vsourceb_sourcep));
    8468                 :            : #endif
    8469                 :          0 : t3=((17.0+(20.0*t7))*t4);
    8470                 :            : #if defined(_DERIVATE)
    8471                 :          0 : vadibl_Vgatep_sourcep=((vadibl_Vgatep_sourcep*t3)+(vadibl*t3_Vgatep_sourcep));
    8472                 :          0 : vadibl_Vdrainp_sourcep=((vadibl_Vdrainp_sourcep*t3)+(vadibl*t3_Vdrainp_sourcep));
    8473                 :          0 : vadibl_Vdrainb_sourcep=((vadibl_Vdrainb_sourcep*t3)+(vadibl*t3_Vdrainb_sourcep));
    8474                 :          0 : vadibl_Vbulkp_sourcep=((vadibl_Vbulkp_sourcep*t3)+(vadibl*t3_Vbulkp_sourcep));
    8475                 :          0 : vadibl_Vsourceb_sourcep=((vadibl_Vsourceb_sourcep*t3)+(vadibl*t3_Vsourceb_sourcep));
    8476                 :            : #endif
    8477                 :          0 : vadibl=(vadibl*t3);
    8478                 :            : }
    8479                 :            : #if defined(_DERIVATE)
    8480                 :       7356 : vadibl_Vgatep_sourcep=((vadibl_Vgatep_sourcep*pvagterm)+(vadibl*pvagterm_Vgatep_sourcep));
    8481                 :       7356 : vadibl_Vdrainp_sourcep=((vadibl_Vdrainp_sourcep*pvagterm)+(vadibl*pvagterm_Vdrainp_sourcep));
    8482                 :       7356 : vadibl_Vdrainb_sourcep=((vadibl_Vdrainb_sourcep*pvagterm)+(vadibl*pvagterm_Vdrainb_sourcep));
    8483                 :       7356 : vadibl_Vbulkp_sourcep=((vadibl_Vbulkp_sourcep*pvagterm)+(vadibl*pvagterm_Vbulkp_sourcep));
    8484                 :       7356 : vadibl_Vsourceb_sourcep=((vadibl_Vsourceb_sourcep*pvagterm)+(vadibl*pvagterm_Vsourceb_sourcep));
    8485                 :            : #endif
    8486                 :       7356 : vadibl=(vadibl*pvagterm);
    8487                 :            : }
    8488                 :            : else
    8489                 :            : {
    8490                 :            : #if defined(_DERIVATE)
    8491                 :          0 : vadibl_Vgatep_sourcep=0.0;
    8492                 :          0 : vadibl_Vdrainp_sourcep=0.0;
    8493                 :          0 : vadibl_Vdrainb_sourcep=0.0;
    8494                 :          0 : vadibl_Vbulkp_sourcep=0.0;
    8495                 :          0 : vadibl_Vsourceb_sourcep=0.0;
    8496                 :            : #endif
    8497                 :          0 : vadibl=5.834617425e14;
    8498                 :            : }
    8499         [ -  + ]:       7356 : if
    8500                 :            : ((pditsd*Vds)>34.0)
    8501                 :            : {
    8502                 :            : #if defined(_DERIVATE)
    8503                 :          0 : t1_Vgatep_sourcep=0.0;
    8504                 :          0 : t1_Vdrainp_sourcep=0.0;
    8505                 :          0 : t1_Vdrainb_sourcep=0.0;
    8506                 :          0 : t1_Vbulkp_sourcep=0.0;
    8507                 :          0 : t1_Vsourceb_sourcep=0.0;
    8508                 :            : #endif
    8509                 :          0 : t1=5.834617425e14;
    8510                 :            : }
    8511                 :            : else
    8512                 :            : {
    8513                 :            : {
    8514                 :       7356 : double m00_exp(d00_exp0,(pditsd*Vds))
    8515                 :            : #if defined(_DERIVATE)
    8516                 :            : #define d10_exp0 d00_exp0
    8517                 :            : #endif
    8518                 :            : #if defined(_DERIVATE)
    8519                 :       7356 : t1_Vgatep_sourcep=0.0;
    8520                 :       7356 : t1_Vdrainp_sourcep=(pditsd*Vds_Vdrainp_sourcep)*d10_exp0;
    8521                 :       7356 : t1_Vdrainb_sourcep=0.0;
    8522                 :       7356 : t1_Vbulkp_sourcep=0.0;
    8523                 :       7356 : t1_Vsourceb_sourcep=0.0;
    8524                 :            : #endif
    8525                 :       7356 : t1=d00_exp0;
    8526                 :            : }
    8527                 :            : }
    8528         [ -  + ]:       7356 : if
    8529                 :            : (pdits>0.0)
    8530                 :            : {
    8531                 :            : #if defined(_DERIVATE)
    8532                 :          0 : vadits_Vgatep_sourcep=(((((1.0+(pditsl*leff))*t1_Vgatep_sourcep)/pdits)*fp)+(((1.0+((1.0+(pditsl*leff))*t1))/pdits)*fp_Vgatep_sourcep));
    8533                 :          0 : vadits_Vdrainp_sourcep=(((((1.0+(pditsl*leff))*t1_Vdrainp_sourcep)/pdits)*fp)+(((1.0+((1.0+(pditsl*leff))*t1))/pdits)*fp_Vdrainp_sourcep));
    8534                 :          0 : vadits_Vdrainb_sourcep=(((((1.0+(pditsl*leff))*t1_Vdrainb_sourcep)/pdits)*fp)+(((1.0+((1.0+(pditsl*leff))*t1))/pdits)*fp_Vdrainb_sourcep));
    8535                 :          0 : vadits_Vbulkp_sourcep=(((((1.0+(pditsl*leff))*t1_Vbulkp_sourcep)/pdits)*fp)+(((1.0+((1.0+(pditsl*leff))*t1))/pdits)*fp_Vbulkp_sourcep));
    8536                 :          0 : vadits_Vsourceb_sourcep=(((((1.0+(pditsl*leff))*t1_Vsourceb_sourcep)/pdits)*fp)+(((1.0+((1.0+(pditsl*leff))*t1))/pdits)*fp_Vsourceb_sourcep));
    8537                 :            : #endif
    8538                 :          0 : vadits=(((1.0+((1.0+(pditsl*leff))*t1))/pdits)*fp);
    8539                 :            : }
    8540                 :            : else
    8541                 :            : {
    8542                 :            : #if defined(_DERIVATE)
    8543                 :       7356 : vadits_Vgatep_sourcep=0.0;
    8544                 :       7356 : vadits_Vdrainp_sourcep=0.0;
    8545                 :       7356 : vadits_Vdrainb_sourcep=0.0;
    8546                 :       7356 : vadits_Vbulkp_sourcep=0.0;
    8547                 :       7356 : vadits_Vsourceb_sourcep=0.0;
    8548                 :            : #endif
    8549                 :       7356 : vadits=5.834617425e14;
    8550                 :            : }
    8551         [ +  - ]:       7356 : if
    8552                 :            : (pscbe2>0.0)
    8553                 :            : {
    8554         [ +  + ]:       7356 : if
    8555                 :            : (diffvds>((pscbe1*litl)/34.0))
    8556                 :            : {
    8557                 :            : #if defined(_DERIVATE)
    8558                 :       2272 : t0_Vgatep_sourcep=(-(pscbe1*litl)*diffvds_Vgatep_sourcep/diffvds/diffvds);
    8559                 :       2272 : t0_Vdrainp_sourcep=(-(pscbe1*litl)*diffvds_Vdrainp_sourcep/diffvds/diffvds);
    8560                 :       2272 : t0_Vdrainb_sourcep=(-(pscbe1*litl)*diffvds_Vdrainb_sourcep/diffvds/diffvds);
    8561                 :       2272 : t0_Vbulkp_sourcep=(-(pscbe1*litl)*diffvds_Vbulkp_sourcep/diffvds/diffvds);
    8562                 :       2272 : t0_Vsourceb_sourcep=(-(pscbe1*litl)*diffvds_Vsourceb_sourcep/diffvds/diffvds);
    8563                 :            : #endif
    8564                 :       2272 : t0=((pscbe1*litl)/diffvds);
    8565                 :            : {
    8566                 :       2272 : double m00_exp(d00_exp0,t0)
    8567                 :            : #if defined(_DERIVATE)
    8568                 :            : #define d10_exp0 d00_exp0
    8569                 :            : #endif
    8570                 :            : #if defined(_DERIVATE)
    8571                 :       2272 : vascbe_Vgatep_sourcep=((leff*t0_Vgatep_sourcep*d10_exp0)/pscbe2);
    8572                 :       2272 : vascbe_Vdrainp_sourcep=((leff*t0_Vdrainp_sourcep*d10_exp0)/pscbe2);
    8573                 :       2272 : vascbe_Vdrainb_sourcep=((leff*t0_Vdrainb_sourcep*d10_exp0)/pscbe2);
    8574                 :       2272 : vascbe_Vbulkp_sourcep=((leff*t0_Vbulkp_sourcep*d10_exp0)/pscbe2);
    8575                 :       2272 : vascbe_Vsourceb_sourcep=((leff*t0_Vsourceb_sourcep*d10_exp0)/pscbe2);
    8576                 :            : #endif
    8577                 :       2272 : vascbe=((leff*d00_exp0)/pscbe2);
    8578                 :            : }
    8579                 :            : }
    8580                 :            : else
    8581                 :            : {
    8582                 :            : #if defined(_DERIVATE)
    8583                 :       5084 : vascbe_Vgatep_sourcep=0.0;
    8584                 :       5084 : vascbe_Vdrainp_sourcep=0.0;
    8585                 :       5084 : vascbe_Vdrainb_sourcep=0.0;
    8586                 :       5084 : vascbe_Vbulkp_sourcep=0.0;
    8587                 :       5084 : vascbe_Vsourceb_sourcep=0.0;
    8588                 :            : #endif
    8589                 :       5084 : vascbe=((5.834617425e14*leff)/pscbe2);
    8590                 :            : }
    8591                 :            : }
    8592                 :            : else
    8593                 :            : {
    8594                 :            : #if defined(_DERIVATE)
    8595                 :          0 : vascbe_Vgatep_sourcep=0.0;
    8596                 :          0 : vascbe_Vdrainp_sourcep=0.0;
    8597                 :          0 : vascbe_Vdrainb_sourcep=0.0;
    8598                 :          0 : vascbe_Vbulkp_sourcep=0.0;
    8599                 :          0 : vascbe_Vsourceb_sourcep=0.0;
    8600                 :            : #endif
    8601                 :          0 : vascbe=5.834617425e14;
    8602                 :            : }
    8603                 :            : #if defined(_DERIVATE)
    8604                 :       7356 : t9_Vgatep_sourcep=((diffvds_Vgatep_sourcep*vadibl-diffvds*vadibl_Vgatep_sourcep)/vadibl/vadibl);
    8605                 :       7356 : t9_Vdrainp_sourcep=((diffvds_Vdrainp_sourcep*vadibl-diffvds*vadibl_Vdrainp_sourcep)/vadibl/vadibl);
    8606                 :       7356 : t9_Vdrainb_sourcep=((diffvds_Vdrainb_sourcep*vadibl-diffvds*vadibl_Vdrainb_sourcep)/vadibl/vadibl);
    8607                 :       7356 : t9_Vbulkp_sourcep=((diffvds_Vbulkp_sourcep*vadibl-diffvds*vadibl_Vbulkp_sourcep)/vadibl/vadibl);
    8608                 :       7356 : t9_Vsourceb_sourcep=((diffvds_Vsourceb_sourcep*vadibl-diffvds*vadibl_Vsourceb_sourcep)/vadibl/vadibl);
    8609                 :            : #endif
    8610                 :       7356 : t9=(diffvds/vadibl);
    8611                 :            : #if defined(_DERIVATE)
    8612                 :       7356 : t0_Vgatep_sourcep=t9_Vgatep_sourcep;
    8613                 :       7356 : t0_Vdrainp_sourcep=t9_Vdrainp_sourcep;
    8614                 :       7356 : t0_Vdrainb_sourcep=t9_Vdrainb_sourcep;
    8615                 :       7356 : t0_Vbulkp_sourcep=t9_Vbulkp_sourcep;
    8616                 :       7356 : t0_Vsourceb_sourcep=t9_Vsourceb_sourcep;
    8617                 :            : #endif
    8618                 :       7356 : t0=(1.0+t9);
    8619                 :            : #if defined(_DERIVATE)
    8620                 :       7356 : idsa_Vgatep_sourcep=((idl_Vgatep_sourcep*t0)+(idl*t0_Vgatep_sourcep));
    8621                 :       7356 : idsa_Vdrainp_sourcep=((idl_Vdrainp_sourcep*t0)+(idl*t0_Vdrainp_sourcep));
    8622                 :       7356 : idsa_Vdrainb_sourcep=((idl_Vdrainb_sourcep*t0)+(idl*t0_Vdrainb_sourcep));
    8623                 :       7356 : idsa_Vbulkp_sourcep=((idl_Vbulkp_sourcep*t0)+(idl*t0_Vbulkp_sourcep));
    8624                 :       7356 : idsa_Vsourceb_sourcep=((idl_Vsourceb_sourcep*t0)+(idl*t0_Vsourceb_sourcep));
    8625                 :            : #endif
    8626                 :       7356 : idsa=(idl*t0);
    8627                 :            : #if defined(_DERIVATE)
    8628                 :       7356 : t9_Vgatep_sourcep=((diffvds_Vgatep_sourcep*vadits-diffvds*vadits_Vgatep_sourcep)/vadits/vadits);
    8629                 :       7356 : t9_Vdrainp_sourcep=((diffvds_Vdrainp_sourcep*vadits-diffvds*vadits_Vdrainp_sourcep)/vadits/vadits);
    8630                 :       7356 : t9_Vdrainb_sourcep=((diffvds_Vdrainb_sourcep*vadits-diffvds*vadits_Vdrainb_sourcep)/vadits/vadits);
    8631                 :       7356 : t9_Vbulkp_sourcep=((diffvds_Vbulkp_sourcep*vadits-diffvds*vadits_Vbulkp_sourcep)/vadits/vadits);
    8632                 :       7356 : t9_Vsourceb_sourcep=((diffvds_Vsourceb_sourcep*vadits-diffvds*vadits_Vsourceb_sourcep)/vadits/vadits);
    8633                 :            : #endif
    8634                 :       7356 : t9=(diffvds/vadits);
    8635                 :            : #if defined(_DERIVATE)
    8636                 :       7356 : t0_Vgatep_sourcep=t9_Vgatep_sourcep;
    8637                 :       7356 : t0_Vdrainp_sourcep=t9_Vdrainp_sourcep;
    8638                 :       7356 : t0_Vdrainb_sourcep=t9_Vdrainb_sourcep;
    8639                 :       7356 : t0_Vbulkp_sourcep=t9_Vbulkp_sourcep;
    8640                 :       7356 : t0_Vsourceb_sourcep=t9_Vsourceb_sourcep;
    8641                 :            : #endif
    8642                 :       7356 : t0=(1.0+t9);
    8643                 :            : #if defined(_DERIVATE)
    8644                 :       7356 : idsa_Vgatep_sourcep=((idsa_Vgatep_sourcep*t0)+(idsa*t0_Vgatep_sourcep));
    8645                 :       7356 : idsa_Vdrainp_sourcep=((idsa_Vdrainp_sourcep*t0)+(idsa*t0_Vdrainp_sourcep));
    8646                 :       7356 : idsa_Vdrainb_sourcep=((idsa_Vdrainb_sourcep*t0)+(idsa*t0_Vdrainb_sourcep));
    8647                 :       7356 : idsa_Vbulkp_sourcep=((idsa_Vbulkp_sourcep*t0)+(idsa*t0_Vbulkp_sourcep));
    8648                 :       7356 : idsa_Vsourceb_sourcep=((idsa_Vsourceb_sourcep*t0)+(idsa*t0_Vsourceb_sourcep));
    8649                 :            : #endif
    8650                 :       7356 : idsa=(idsa*t0);
    8651                 :            : {
    8652                 :       7356 : double m00_logE(d00_logE0,((vasat+vaclm)/vasat))
    8653                 :            : #if defined(_DERIVATE)
    8654                 :       7356 : double m10_logE(d10_logE0,d00_logE0,((vasat+vaclm)/vasat))
    8655                 :            : #endif
    8656                 :            : #if defined(_DERIVATE)
    8657                 :       7356 : t0_Vgatep_sourcep=(((vasat_Vgatep_sourcep+vaclm_Vgatep_sourcep)*vasat-(vasat+vaclm)*vasat_Vgatep_sourcep)/vasat/vasat)*d10_logE0;
    8658                 :       7356 : t0_Vdrainp_sourcep=(((vasat_Vdrainp_sourcep+vaclm_Vdrainp_sourcep)*vasat-(vasat+vaclm)*vasat_Vdrainp_sourcep)/vasat/vasat)*d10_logE0;
    8659                 :       7356 : t0_Vdrainb_sourcep=(((vasat_Vdrainb_sourcep+vaclm_Vdrainb_sourcep)*vasat-(vasat+vaclm)*vasat_Vdrainb_sourcep)/vasat/vasat)*d10_logE0;
    8660                 :       7356 : t0_Vbulkp_sourcep=(((vasat_Vbulkp_sourcep+vaclm_Vbulkp_sourcep)*vasat-(vasat+vaclm)*vasat_Vbulkp_sourcep)/vasat/vasat)*d10_logE0;
    8661                 :       7356 : t0_Vsourceb_sourcep=(((vasat_Vsourceb_sourcep+vaclm_Vsourceb_sourcep)*vasat-(vasat+vaclm)*vasat_Vsourceb_sourcep)/vasat/vasat)*d10_logE0;
    8662                 :            : #endif
    8663                 :       7356 : t0=d00_logE0;
    8664                 :            : }
    8665                 :            : #if defined(_DERIVATE)
    8666                 :       7356 : t1_Vgatep_sourcep=((t0_Vgatep_sourcep*cclm-t0*cclm_Vgatep_sourcep)/cclm/cclm);
    8667                 :       7356 : t1_Vdrainp_sourcep=((t0_Vdrainp_sourcep*cclm-t0*cclm_Vdrainp_sourcep)/cclm/cclm);
    8668                 :       7356 : t1_Vdrainb_sourcep=((t0_Vdrainb_sourcep*cclm-t0*cclm_Vdrainb_sourcep)/cclm/cclm);
    8669                 :       7356 : t1_Vbulkp_sourcep=((t0_Vbulkp_sourcep*cclm-t0*cclm_Vbulkp_sourcep)/cclm/cclm);
    8670                 :       7356 : t1_Vsourceb_sourcep=((t0_Vsourceb_sourcep*cclm-t0*cclm_Vsourceb_sourcep)/cclm/cclm);
    8671                 :            : #endif
    8672                 :       7356 : t1=(t0/cclm);
    8673                 :            : #if defined(_DERIVATE)
    8674                 :       7356 : t9_Vgatep_sourcep=t1_Vgatep_sourcep;
    8675                 :       7356 : t9_Vdrainp_sourcep=t1_Vdrainp_sourcep;
    8676                 :       7356 : t9_Vdrainb_sourcep=t1_Vdrainb_sourcep;
    8677                 :       7356 : t9_Vbulkp_sourcep=t1_Vbulkp_sourcep;
    8678                 :       7356 : t9_Vsourceb_sourcep=t1_Vsourceb_sourcep;
    8679                 :            : #endif
    8680                 :       7356 : t9=(1.0+t1);
    8681                 :            : #if defined(_DERIVATE)
    8682                 :       7356 : idsa_Vgatep_sourcep=((idsa_Vgatep_sourcep*t9)+(idsa*t9_Vgatep_sourcep));
    8683                 :       7356 : idsa_Vdrainp_sourcep=((idsa_Vdrainp_sourcep*t9)+(idsa*t9_Vdrainp_sourcep));
    8684                 :       7356 : idsa_Vdrainb_sourcep=((idsa_Vdrainb_sourcep*t9)+(idsa*t9_Vdrainb_sourcep));
    8685                 :       7356 : idsa_Vbulkp_sourcep=((idsa_Vbulkp_sourcep*t9)+(idsa*t9_Vbulkp_sourcep));
    8686                 :       7356 : idsa_Vsourceb_sourcep=((idsa_Vsourceb_sourcep*t9)+(idsa*t9_Vsourceb_sourcep));
    8687                 :            : #endif
    8688                 :       7356 : idsa=(idsa*t9);
    8689                 :            : #if defined(_DERIVATE)
    8690                 :       7356 : tmp_Vgatep_sourcep=0.0;
    8691                 :       7356 : tmp_Vdrainp_sourcep=0.0;
    8692                 :       7356 : tmp_Vdrainb_sourcep=0.0;
    8693                 :       7356 : tmp_Vbulkp_sourcep=0.0;
    8694                 :       7356 : tmp_Vsourceb_sourcep=0.0;
    8695                 :            : #endif
    8696                 :       7356 : tmp=(alpha0+(alpha1*leff));
    8697 [ -  + ][ #  # ]:       7356 : if
    8698                 :            : ((tmp<=0.0)||(beta0<=0.0))
    8699                 :            : {
    8700                 :            : #if defined(_DERIVATE)
    8701                 :       7356 : isub_Vgatep_sourcep=0.0;
    8702                 :       7356 : isub_Vdrainp_sourcep=0.0;
    8703                 :       7356 : isub_Vdrainb_sourcep=0.0;
    8704                 :       7356 : isub_Vbulkp_sourcep=0.0;
    8705                 :       7356 : isub_Vsourceb_sourcep=0.0;
    8706                 :            : #endif
    8707                 :       7356 : isub=0.0;
    8708                 :            : }
    8709                 :            : else
    8710                 :            : {
    8711                 :            : #if defined(_DERIVATE)
    8712                 :          0 : t2_Vgatep_sourcep=0.0;
    8713                 :          0 : t2_Vdrainp_sourcep=0.0;
    8714                 :          0 : t2_Vdrainb_sourcep=0.0;
    8715                 :          0 : t2_Vbulkp_sourcep=0.0;
    8716                 :          0 : t2_Vsourceb_sourcep=0.0;
    8717                 :            : #endif
    8718                 :          0 : t2=(tmp/leff);
    8719         [ #  # ]:          0 : if
    8720                 :            : (diffvds>(beta0/34.0))
    8721                 :            : {
    8722                 :            : #if defined(_DERIVATE)
    8723                 :          0 : t0_Vgatep_sourcep=(-(-beta0)*diffvds_Vgatep_sourcep/diffvds/diffvds);
    8724                 :          0 : t0_Vdrainp_sourcep=(-(-beta0)*diffvds_Vdrainp_sourcep/diffvds/diffvds);
    8725                 :          0 : t0_Vdrainb_sourcep=(-(-beta0)*diffvds_Vdrainb_sourcep/diffvds/diffvds);
    8726                 :          0 : t0_Vbulkp_sourcep=(-(-beta0)*diffvds_Vbulkp_sourcep/diffvds/diffvds);
    8727                 :          0 : t0_Vsourceb_sourcep=(-(-beta0)*diffvds_Vsourceb_sourcep/diffvds/diffvds);
    8728                 :            : #endif
    8729                 :          0 : t0=((-beta0)/diffvds);
    8730                 :            : {
    8731                 :          0 : double m00_exp(d00_exp0,t0)
    8732                 :            : #if defined(_DERIVATE)
    8733                 :            : #define d10_exp0 d00_exp0
    8734                 :            : #endif
    8735                 :            : #if defined(_DERIVATE)
    8736                 :          0 : t1_Vgatep_sourcep=((((t2_Vgatep_sourcep*diffvds)+(t2*diffvds_Vgatep_sourcep))*d00_exp0)+((t2*diffvds)*t0_Vgatep_sourcep*d10_exp0));
    8737                 :          0 : t1_Vdrainp_sourcep=((((t2_Vdrainp_sourcep*diffvds)+(t2*diffvds_Vdrainp_sourcep))*d00_exp0)+((t2*diffvds)*t0_Vdrainp_sourcep*d10_exp0));
    8738                 :          0 : t1_Vdrainb_sourcep=((((t2_Vdrainb_sourcep*diffvds)+(t2*diffvds_Vdrainb_sourcep))*d00_exp0)+((t2*diffvds)*t0_Vdrainb_sourcep*d10_exp0));
    8739                 :          0 : t1_Vbulkp_sourcep=((((t2_Vbulkp_sourcep*diffvds)+(t2*diffvds_Vbulkp_sourcep))*d00_exp0)+((t2*diffvds)*t0_Vbulkp_sourcep*d10_exp0));
    8740                 :          0 : t1_Vsourceb_sourcep=((((t2_Vsourceb_sourcep*diffvds)+(t2*diffvds_Vsourceb_sourcep))*d00_exp0)+((t2*diffvds)*t0_Vsourceb_sourcep*d10_exp0));
    8741                 :            : #endif
    8742                 :          0 : t1=((t2*diffvds)*d00_exp0);
    8743                 :            : }
    8744                 :            : }
    8745                 :            : else
    8746                 :            : {
    8747                 :            : #if defined(_DERIVATE)
    8748                 :          0 : t3_Vgatep_sourcep=t2_Vgatep_sourcep*1.713908431e-15;
    8749                 :          0 : t3_Vdrainp_sourcep=t2_Vdrainp_sourcep*1.713908431e-15;
    8750                 :          0 : t3_Vdrainb_sourcep=t2_Vdrainb_sourcep*1.713908431e-15;
    8751                 :          0 : t3_Vbulkp_sourcep=t2_Vbulkp_sourcep*1.713908431e-15;
    8752                 :          0 : t3_Vsourceb_sourcep=t2_Vsourceb_sourcep*1.713908431e-15;
    8753                 :            : #endif
    8754                 :          0 : t3=(t2*1.713908431e-15);
    8755                 :            : #if defined(_DERIVATE)
    8756                 :          0 : t1_Vgatep_sourcep=((t3_Vgatep_sourcep*diffvds)+(t3*diffvds_Vgatep_sourcep));
    8757                 :          0 : t1_Vdrainp_sourcep=((t3_Vdrainp_sourcep*diffvds)+(t3*diffvds_Vdrainp_sourcep));
    8758                 :          0 : t1_Vdrainb_sourcep=((t3_Vdrainb_sourcep*diffvds)+(t3*diffvds_Vdrainb_sourcep));
    8759                 :          0 : t1_Vbulkp_sourcep=((t3_Vbulkp_sourcep*diffvds)+(t3*diffvds_Vbulkp_sourcep));
    8760                 :          0 : t1_Vsourceb_sourcep=((t3_Vsourceb_sourcep*diffvds)+(t3*diffvds_Vsourceb_sourcep));
    8761                 :            : #endif
    8762                 :          0 : t1=(t3*diffvds);
    8763                 :            : }
    8764                 :            : #if defined(_DERIVATE)
    8765                 :          0 : t4_Vgatep_sourcep=((idsa_Vgatep_sourcep*vdseff)+(idsa*vdseff_Vgatep_sourcep));
    8766                 :          0 : t4_Vdrainp_sourcep=((idsa_Vdrainp_sourcep*vdseff)+(idsa*vdseff_Vdrainp_sourcep));
    8767                 :          0 : t4_Vdrainb_sourcep=((idsa_Vdrainb_sourcep*vdseff)+(idsa*vdseff_Vdrainb_sourcep));
    8768                 :          0 : t4_Vbulkp_sourcep=((idsa_Vbulkp_sourcep*vdseff)+(idsa*vdseff_Vbulkp_sourcep));
    8769                 :          0 : t4_Vsourceb_sourcep=((idsa_Vsourceb_sourcep*vdseff)+(idsa*vdseff_Vsourceb_sourcep));
    8770                 :            : #endif
    8771                 :          0 : t4=(idsa*vdseff);
    8772                 :            : #if defined(_DERIVATE)
    8773                 :          0 : isub_Vgatep_sourcep=((t1_Vgatep_sourcep*t4)+(t1*t4_Vgatep_sourcep));
    8774                 :          0 : isub_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t4)+(t1*t4_Vdrainp_sourcep));
    8775                 :          0 : isub_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t4)+(t1*t4_Vdrainb_sourcep));
    8776                 :          0 : isub_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t4)+(t1*t4_Vbulkp_sourcep));
    8777                 :          0 : isub_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t4)+(t1*t4_Vsourceb_sourcep));
    8778                 :            : #endif
    8779                 :          0 : isub=(t1*t4);
    8780                 :            : }
    8781                 :            : #if defined(_DERIVATE)
    8782                 :       7356 : csub_Vgatep_sourcep=isub_Vgatep_sourcep;
    8783                 :       7356 : csub_Vdrainp_sourcep=isub_Vdrainp_sourcep;
    8784                 :       7356 : csub_Vdrainb_sourcep=isub_Vdrainb_sourcep;
    8785                 :       7356 : csub_Vbulkp_sourcep=isub_Vbulkp_sourcep;
    8786                 :       7356 : csub_Vsourceb_sourcep=isub_Vsourceb_sourcep;
    8787                 :            : #endif
    8788                 :       7356 : csub=isub;
    8789                 :            : #if defined(_DERIVATE)
    8790                 :       7356 : t9_Vgatep_sourcep=((diffvds_Vgatep_sourcep*vascbe-diffvds*vascbe_Vgatep_sourcep)/vascbe/vascbe);
    8791                 :       7356 : t9_Vdrainp_sourcep=((diffvds_Vdrainp_sourcep*vascbe-diffvds*vascbe_Vdrainp_sourcep)/vascbe/vascbe);
    8792                 :       7356 : t9_Vdrainb_sourcep=((diffvds_Vdrainb_sourcep*vascbe-diffvds*vascbe_Vdrainb_sourcep)/vascbe/vascbe);
    8793                 :       7356 : t9_Vbulkp_sourcep=((diffvds_Vbulkp_sourcep*vascbe-diffvds*vascbe_Vbulkp_sourcep)/vascbe/vascbe);
    8794                 :       7356 : t9_Vsourceb_sourcep=((diffvds_Vsourceb_sourcep*vascbe-diffvds*vascbe_Vsourceb_sourcep)/vascbe/vascbe);
    8795                 :            : #endif
    8796                 :       7356 : t9=(diffvds/vascbe);
    8797                 :            : #if defined(_DERIVATE)
    8798                 :       7356 : t0_Vgatep_sourcep=t9_Vgatep_sourcep;
    8799                 :       7356 : t0_Vdrainp_sourcep=t9_Vdrainp_sourcep;
    8800                 :       7356 : t0_Vdrainb_sourcep=t9_Vdrainb_sourcep;
    8801                 :       7356 : t0_Vbulkp_sourcep=t9_Vbulkp_sourcep;
    8802                 :       7356 : t0_Vsourceb_sourcep=t9_Vsourceb_sourcep;
    8803                 :            : #endif
    8804                 :       7356 : t0=(1.0+t9);
    8805                 :            : #if defined(_DERIVATE)
    8806                 :       7356 : ids_Vgatep_sourcep=((idsa_Vgatep_sourcep*t0)+(idsa*t0_Vgatep_sourcep));
    8807                 :       7356 : ids_Vdrainp_sourcep=((idsa_Vdrainp_sourcep*t0)+(idsa*t0_Vdrainp_sourcep));
    8808                 :       7356 : ids_Vdrainb_sourcep=((idsa_Vdrainb_sourcep*t0)+(idsa*t0_Vdrainb_sourcep));
    8809                 :       7356 : ids_Vbulkp_sourcep=((idsa_Vbulkp_sourcep*t0)+(idsa*t0_Vbulkp_sourcep));
    8810                 :       7356 : ids_Vsourceb_sourcep=((idsa_Vsourceb_sourcep*t0)+(idsa*t0_Vsourceb_sourcep));
    8811                 :            : #endif
    8812                 :       7356 : ids=(idsa*t0);
    8813                 :            : #if defined(_DERIVATE)
    8814                 :       7356 : cdrain_Vgatep_sourcep=((ids_Vgatep_sourcep*vdseff)+(ids*vdseff_Vgatep_sourcep));
    8815                 :       7356 : cdrain_Vdrainp_sourcep=((ids_Vdrainp_sourcep*vdseff)+(ids*vdseff_Vdrainp_sourcep));
    8816                 :       7356 : cdrain_Vdrainb_sourcep=((ids_Vdrainb_sourcep*vdseff)+(ids*vdseff_Vdrainb_sourcep));
    8817                 :       7356 : cdrain_Vbulkp_sourcep=((ids_Vbulkp_sourcep*vdseff)+(ids*vdseff_Vbulkp_sourcep));
    8818                 :       7356 : cdrain_Vsourceb_sourcep=((ids_Vsourceb_sourcep*vdseff)+(ids*vdseff_Vsourceb_sourcep));
    8819                 :            : #endif
    8820                 :       7356 : cdrain=(ids*vdseff);
    8821 [ -  + ][ #  # ]:       7356 : if
    8822                 :            : ((vtl!=(-99.0))&&(vtl>0.0))
    8823                 :            : {
    8824                 :            : #if defined(_DERIVATE)
    8825                 :          0 : t12_Vgatep_sourcep=(-(1.0/leff)*coxeffwovl_Vgatep_sourcep/coxeffwovl/coxeffwovl);
    8826                 :          0 : t12_Vdrainp_sourcep=(-(1.0/leff)*coxeffwovl_Vdrainp_sourcep/coxeffwovl/coxeffwovl);
    8827                 :          0 : t12_Vdrainb_sourcep=(-(1.0/leff)*coxeffwovl_Vdrainb_sourcep/coxeffwovl/coxeffwovl);
    8828                 :          0 : t12_Vbulkp_sourcep=(-(1.0/leff)*coxeffwovl_Vbulkp_sourcep/coxeffwovl/coxeffwovl);
    8829                 :          0 : t12_Vsourceb_sourcep=(-(1.0/leff)*coxeffwovl_Vsourceb_sourcep/coxeffwovl/coxeffwovl);
    8830                 :            : #endif
    8831                 :          0 : t12=((1.0/leff)/coxeffwovl);
    8832                 :            : #if defined(_DERIVATE)
    8833                 :          0 : t11_Vgatep_sourcep=((t12_Vgatep_sourcep*vgsteff-t12*vgsteff_Vgatep_sourcep)/vgsteff/vgsteff);
    8834                 :          0 : t11_Vdrainp_sourcep=((t12_Vdrainp_sourcep*vgsteff-t12*vgsteff_Vdrainp_sourcep)/vgsteff/vgsteff);
    8835                 :          0 : t11_Vdrainb_sourcep=((t12_Vdrainb_sourcep*vgsteff-t12*vgsteff_Vdrainb_sourcep)/vgsteff/vgsteff);
    8836                 :          0 : t11_Vbulkp_sourcep=((t12_Vbulkp_sourcep*vgsteff-t12*vgsteff_Vbulkp_sourcep)/vgsteff/vgsteff);
    8837                 :          0 : t11_Vsourceb_sourcep=((t12_Vsourceb_sourcep*vgsteff-t12*vgsteff_Vsourceb_sourcep)/vgsteff/vgsteff);
    8838                 :            : #endif
    8839                 :          0 : t11=(t12/vgsteff);
    8840                 :            : #if defined(_DERIVATE)
    8841                 :          0 : t10_Vgatep_sourcep=(((-t11_Vgatep_sourcep)*vgsteff-(-t11)*vgsteff_Vgatep_sourcep)/vgsteff/vgsteff);
    8842                 :          0 : t10_Vdrainp_sourcep=(((-t11_Vdrainp_sourcep)*vgsteff-(-t11)*vgsteff_Vdrainp_sourcep)/vgsteff/vgsteff);
    8843                 :          0 : t10_Vdrainb_sourcep=(((-t11_Vdrainb_sourcep)*vgsteff-(-t11)*vgsteff_Vdrainb_sourcep)/vgsteff/vgsteff);
    8844                 :          0 : t10_Vbulkp_sourcep=(((-t11_Vbulkp_sourcep)*vgsteff-(-t11)*vgsteff_Vbulkp_sourcep)/vgsteff/vgsteff);
    8845                 :          0 : t10_Vsourceb_sourcep=(((-t11_Vsourceb_sourcep)*vgsteff-(-t11)*vgsteff_Vsourceb_sourcep)/vgsteff/vgsteff);
    8846                 :            : #endif
    8847                 :          0 : t10=((-t11)/vgsteff);
    8848                 :            : #if defined(_DERIVATE)
    8849                 :          0 : vs_Vgatep_sourcep=((cdrain_Vgatep_sourcep*t11)+(cdrain*t11_Vgatep_sourcep));
    8850                 :          0 : vs_Vdrainp_sourcep=((cdrain_Vdrainp_sourcep*t11)+(cdrain*t11_Vdrainp_sourcep));
    8851                 :          0 : vs_Vdrainb_sourcep=((cdrain_Vdrainb_sourcep*t11)+(cdrain*t11_Vdrainb_sourcep));
    8852                 :          0 : vs_Vbulkp_sourcep=((cdrain_Vbulkp_sourcep*t11)+(cdrain*t11_Vbulkp_sourcep));
    8853                 :          0 : vs_Vsourceb_sourcep=((cdrain_Vsourceb_sourcep*t11)+(cdrain*t11_Vsourceb_sourcep));
    8854                 :            : #endif
    8855                 :          0 : vs=(cdrain*t11);
    8856                 :            : #if defined(_DERIVATE)
    8857                 :          0 : t0_Vgatep_sourcep=0.0;
    8858                 :          0 : t0_Vdrainp_sourcep=0.0;
    8859                 :          0 : t0_Vdrainb_sourcep=0.0;
    8860                 :          0 : t0_Vbulkp_sourcep=0.0;
    8861                 :          0 : t0_Vsourceb_sourcep=0.0;
    8862                 :            : #endif
    8863                 :          0 : t0=(2*3);
    8864                 :            : #if defined(_DERIVATE)
    8865                 :          0 : t1_Vgatep_sourcep=(vs_Vgatep_sourcep/(vtl*tfactor));
    8866                 :          0 : t1_Vdrainp_sourcep=(vs_Vdrainp_sourcep/(vtl*tfactor));
    8867                 :          0 : t1_Vdrainb_sourcep=(vs_Vdrainb_sourcep/(vtl*tfactor));
    8868                 :          0 : t1_Vbulkp_sourcep=(vs_Vbulkp_sourcep/(vtl*tfactor));
    8869                 :          0 : t1_Vsourceb_sourcep=(vs_Vsourceb_sourcep/(vtl*tfactor));
    8870                 :            : #endif
    8871                 :          0 : t1=(vs/(vtl*tfactor));
    8872         [ #  # ]:          0 : if
    8873                 :            : (t1<=0)
    8874                 :            : {
    8875                 :            : #if defined(_DERIVATE)
    8876                 :          0 : t2_Vgatep_sourcep=0.0;
    8877                 :          0 : t2_Vdrainp_sourcep=0.0;
    8878                 :          0 : t2_Vdrainb_sourcep=0.0;
    8879                 :          0 : t2_Vbulkp_sourcep=0.0;
    8880                 :          0 : t2_Vsourceb_sourcep=0.0;
    8881                 :            : #endif
    8882                 :          0 : t2=1.0;
    8883                 :            : }
    8884                 :            : else
    8885                 :            : {
    8886                 :            : {
    8887                 :          0 : double m00_logE(d00_logE0,t1)
    8888                 :          0 : double m00_exp(d00_exp1,(t0*d00_logE0))
    8889                 :            : #if defined(_DERIVATE)
    8890                 :          0 : double m10_logE(d10_logE0,d00_logE0,t1)
    8891                 :            : #define d10_exp1 d00_exp1
    8892                 :            : #endif
    8893                 :            : #if defined(_DERIVATE)
    8894                 :          0 : t2_Vgatep_sourcep=((t0_Vgatep_sourcep*d00_logE0)+(t0*t1_Vgatep_sourcep*d10_logE0))*d10_exp1;
    8895                 :          0 : t2_Vdrainp_sourcep=((t0_Vdrainp_sourcep*d00_logE0)+(t0*t1_Vdrainp_sourcep*d10_logE0))*d10_exp1;
    8896                 :          0 : t2_Vdrainb_sourcep=((t0_Vdrainb_sourcep*d00_logE0)+(t0*t1_Vdrainb_sourcep*d10_logE0))*d10_exp1;
    8897                 :          0 : t2_Vbulkp_sourcep=((t0_Vbulkp_sourcep*d00_logE0)+(t0*t1_Vbulkp_sourcep*d10_logE0))*d10_exp1;
    8898                 :          0 : t2_Vsourceb_sourcep=((t0_Vsourceb_sourcep*d00_logE0)+(t0*t1_Vsourceb_sourcep*d10_logE0))*d10_exp1;
    8899                 :            : #endif
    8900                 :          0 : t2=(1.0+d00_exp1);
    8901                 :            : }
    8902                 :            : }
    8903                 :            : {
    8904                 :          0 : double m00_logE(d00_logE0,t2)
    8905                 :          0 : double m00_exp(d00_exp1,(d00_logE0/t0))
    8906                 :            : #if defined(_DERIVATE)
    8907                 :          0 : double m10_logE(d10_logE0,d00_logE0,t2)
    8908                 :            : #define d10_exp1 d00_exp1
    8909                 :            : #endif
    8910                 :            : #if defined(_DERIVATE)
    8911                 :          0 : fsevl_Vgatep_sourcep=(-((t2_Vgatep_sourcep*d10_logE0*t0-d00_logE0*t0_Vgatep_sourcep)/t0/t0)*d10_exp1/d00_exp1/d00_exp1);
    8912                 :          0 : fsevl_Vdrainp_sourcep=(-((t2_Vdrainp_sourcep*d10_logE0*t0-d00_logE0*t0_Vdrainp_sourcep)/t0/t0)*d10_exp1/d00_exp1/d00_exp1);
    8913                 :          0 : fsevl_Vdrainb_sourcep=(-((t2_Vdrainb_sourcep*d10_logE0*t0-d00_logE0*t0_Vdrainb_sourcep)/t0/t0)*d10_exp1/d00_exp1/d00_exp1);
    8914                 :          0 : fsevl_Vbulkp_sourcep=(-((t2_Vbulkp_sourcep*d10_logE0*t0-d00_logE0*t0_Vbulkp_sourcep)/t0/t0)*d10_exp1/d00_exp1/d00_exp1);
    8915                 :          0 : fsevl_Vsourceb_sourcep=(-((t2_Vsourceb_sourcep*d10_logE0*t0-d00_logE0*t0_Vsourceb_sourcep)/t0/t0)*d10_exp1/d00_exp1/d00_exp1);
    8916                 :            : #endif
    8917                 :          0 : fsevl=(1.0/d00_exp1);
    8918                 :            : }
    8919                 :            : #if defined(_DERIVATE)
    8920                 :          0 : cdrain_Vgatep_sourcep=((cdrain_Vgatep_sourcep*fsevl)+(cdrain*fsevl_Vgatep_sourcep));
    8921                 :          0 : cdrain_Vdrainp_sourcep=((cdrain_Vdrainp_sourcep*fsevl)+(cdrain*fsevl_Vdrainp_sourcep));
    8922                 :          0 : cdrain_Vdrainb_sourcep=((cdrain_Vdrainb_sourcep*fsevl)+(cdrain*fsevl_Vdrainb_sourcep));
    8923                 :          0 : cdrain_Vbulkp_sourcep=((cdrain_Vbulkp_sourcep*fsevl)+(cdrain*fsevl_Vbulkp_sourcep));
    8924                 :          0 : cdrain_Vsourceb_sourcep=((cdrain_Vsourceb_sourcep*fsevl)+(cdrain*fsevl_Vsourceb_sourcep));
    8925                 :            : #endif
    8926                 :          0 : cdrain=(cdrain*fsevl);
    8927                 :            : }
    8928         [ +  - ]:       7356 : if
    8929                 :            : (rgatemod>1)
    8930                 :            : {
    8931                 :            : #if defined(_DERIVATE)
    8932                 :       7356 : t9_Vgatep_sourcep=0.0;
    8933                 :       7356 : t9_Vdrainp_sourcep=0.0;
    8934                 :       7356 : t9_Vdrainb_sourcep=0.0;
    8935                 :       7356 : t9_Vbulkp_sourcep=0.0;
    8936                 :       7356 : t9_Vsourceb_sourcep=0.0;
    8937                 :            : #endif
    8938                 :       7356 : t9=(xrcrg2*vtm);
    8939                 :            : #if defined(_DERIVATE)
    8940                 :       7356 : t0_Vgatep_sourcep=((t9_Vgatep_sourcep*beta)+(t9*beta_Vgatep_sourcep));
    8941                 :       7356 : t0_Vdrainp_sourcep=((t9_Vdrainp_sourcep*beta)+(t9*beta_Vdrainp_sourcep));
    8942                 :       7356 : t0_Vdrainb_sourcep=((t9_Vdrainb_sourcep*beta)+(t9*beta_Vdrainb_sourcep));
    8943                 :       7356 : t0_Vbulkp_sourcep=((t9_Vbulkp_sourcep*beta)+(t9*beta_Vbulkp_sourcep));
    8944                 :       7356 : t0_Vsourceb_sourcep=((t9_Vsourceb_sourcep*beta)+(t9*beta_Vsourceb_sourcep));
    8945                 :            : #endif
    8946                 :       7356 : t0=(t9*beta);
    8947                 :            : #if defined(_DERIVATE)
    8948                 :       7356 : gcrg_Vgatep_sourcep=(xrcrg1*(t0_Vgatep_sourcep+ids_Vgatep_sourcep));
    8949                 :       7356 : gcrg_Vdrainp_sourcep=(xrcrg1*(t0_Vdrainp_sourcep+ids_Vdrainp_sourcep));
    8950                 :       7356 : gcrg_Vdrainb_sourcep=(xrcrg1*(t0_Vdrainb_sourcep+ids_Vdrainb_sourcep));
    8951                 :       7356 : gcrg_Vbulkp_sourcep=(xrcrg1*(t0_Vbulkp_sourcep+ids_Vbulkp_sourcep));
    8952                 :       7356 : gcrg_Vsourceb_sourcep=(xrcrg1*(t0_Vsourceb_sourcep+ids_Vsourceb_sourcep));
    8953                 :            : #endif
    8954                 :       7356 : gcrg=(xrcrg1*(t0+ids));
    8955         [ -  + ]:       7356 : if
    8956                 :            : (nf!=1.0)
    8957                 :            : {
    8958                 :            : #if defined(_DERIVATE)
    8959                 :          0 : gcrg_Vgatep_sourcep=gcrg_Vgatep_sourcep*nf;
    8960                 :          0 : gcrg_Vdrainp_sourcep=gcrg_Vdrainp_sourcep*nf;
    8961                 :          0 : gcrg_Vdrainb_sourcep=gcrg_Vdrainb_sourcep*nf;
    8962                 :          0 : gcrg_Vbulkp_sourcep=gcrg_Vbulkp_sourcep*nf;
    8963                 :          0 : gcrg_Vsourceb_sourcep=gcrg_Vsourceb_sourcep*nf;
    8964                 :            : #endif
    8965                 :          0 : gcrg=(gcrg*nf);
    8966                 :            : }
    8967         [ +  - ]:       7356 : if
    8968                 :            : (rgatemod==2)
    8969                 :            : {
    8970                 :            : #if defined(_DERIVATE)
    8971                 :       7356 : t10_Vgatep_sourcep=0.0;
    8972                 :       7356 : t10_Vdrainp_sourcep=0.0;
    8973                 :       7356 : t10_Vdrainb_sourcep=0.0;
    8974                 :       7356 : t10_Vbulkp_sourcep=0.0;
    8975                 :       7356 : t10_Vsourceb_sourcep=0.0;
    8976                 :            : #endif
    8977                 :       7356 : t10=(grgeltd*grgeltd);
    8978                 :            : #if defined(_DERIVATE)
    8979                 :       7356 : t11_Vgatep_sourcep=gcrg_Vgatep_sourcep;
    8980                 :       7356 : t11_Vdrainp_sourcep=gcrg_Vdrainp_sourcep;
    8981                 :       7356 : t11_Vdrainb_sourcep=gcrg_Vdrainb_sourcep;
    8982                 :       7356 : t11_Vbulkp_sourcep=gcrg_Vbulkp_sourcep;
    8983                 :       7356 : t11_Vsourceb_sourcep=gcrg_Vsourceb_sourcep;
    8984                 :            : #endif
    8985                 :       7356 : t11=(grgeltd+gcrg);
    8986                 :            : #if defined(_DERIVATE)
    8987                 :       7356 : gcrg_Vgatep_sourcep=(((grgeltd*gcrg_Vgatep_sourcep)*t11-(grgeltd*gcrg)*t11_Vgatep_sourcep)/t11/t11);
    8988                 :       7356 : gcrg_Vdrainp_sourcep=(((grgeltd*gcrg_Vdrainp_sourcep)*t11-(grgeltd*gcrg)*t11_Vdrainp_sourcep)/t11/t11);
    8989                 :       7356 : gcrg_Vdrainb_sourcep=(((grgeltd*gcrg_Vdrainb_sourcep)*t11-(grgeltd*gcrg)*t11_Vdrainb_sourcep)/t11/t11);
    8990                 :       7356 : gcrg_Vbulkp_sourcep=(((grgeltd*gcrg_Vbulkp_sourcep)*t11-(grgeltd*gcrg)*t11_Vbulkp_sourcep)/t11/t11);
    8991                 :       7356 : gcrg_Vsourceb_sourcep=(((grgeltd*gcrg_Vsourceb_sourcep)*t11-(grgeltd*gcrg)*t11_Vsourceb_sourcep)/t11/t11);
    8992                 :            : #endif
    8993                 :       7356 : gcrg=((grgeltd*gcrg)/t11);
    8994                 :            : }
    8995                 :            : }
    8996         [ -  + ]:       7356 : if
    8997                 :            : (rdsmod==1.0)
    8998                 :            : {
    8999                 :            : #if defined(_DERIVATE)
    9000                 :          0 : t0_Vgatep_sourcep=vgs_Vgatep_sourcep;
    9001                 :          0 : t0_Vdrainp_sourcep=0.0;
    9002                 :          0 : t0_Vdrainb_sourcep=0.0;
    9003                 :          0 : t0_Vbulkp_sourcep=0.0;
    9004                 :          0 : t0_Vsourceb_sourcep=0.0;
    9005                 :            : #endif
    9006                 :          0 : t0=(vgs-vfbsd);
    9007                 :            : {
    9008                 :          0 : double m00_sqrt(d00_sqrt0,((t0*t0)+1.0e-4))
    9009                 :            : #if defined(_DERIVATE)
    9010                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+1.0e-4))
    9011                 :            : #endif
    9012                 :            : #if defined(_DERIVATE)
    9013                 :          0 : t1_Vgatep_sourcep=((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))*d10_sqrt0;
    9014                 :          0 : t1_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))*d10_sqrt0;
    9015                 :          0 : t1_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))*d10_sqrt0;
    9016                 :          0 : t1_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))*d10_sqrt0;
    9017                 :          0 : t1_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))*d10_sqrt0;
    9018                 :            : #endif
    9019                 :          0 : t1=d00_sqrt0;
    9020                 :            : }
    9021                 :            : #if defined(_DERIVATE)
    9022                 :          0 : vgs_eff_Vgatep_sourcep=(0.5*(t0_Vgatep_sourcep+t1_Vgatep_sourcep));
    9023                 :          0 : vgs_eff_Vdrainp_sourcep=(0.5*(t0_Vdrainp_sourcep+t1_Vdrainp_sourcep));
    9024                 :          0 : vgs_eff_Vdrainb_sourcep=(0.5*(t0_Vdrainb_sourcep+t1_Vdrainb_sourcep));
    9025                 :          0 : vgs_eff_Vbulkp_sourcep=(0.5*(t0_Vbulkp_sourcep+t1_Vbulkp_sourcep));
    9026                 :          0 : vgs_eff_Vsourceb_sourcep=(0.5*(t0_Vsourceb_sourcep+t1_Vsourceb_sourcep));
    9027                 :            : #endif
    9028                 :          0 : vgs_eff=(0.5*(t0+t1));
    9029                 :            : #if defined(_DERIVATE)
    9030                 :          0 : t0_Vgatep_sourcep=(prwg*vgs_eff_Vgatep_sourcep);
    9031                 :          0 : t0_Vdrainp_sourcep=(prwg*vgs_eff_Vdrainp_sourcep);
    9032                 :          0 : t0_Vdrainb_sourcep=(prwg*vgs_eff_Vdrainb_sourcep);
    9033                 :          0 : t0_Vbulkp_sourcep=(prwg*vgs_eff_Vbulkp_sourcep);
    9034                 :          0 : t0_Vsourceb_sourcep=(prwg*vgs_eff_Vsourceb_sourcep);
    9035                 :            : #endif
    9036                 :          0 : t0=(1.0+(prwg*vgs_eff));
    9037                 :            : #if defined(_DERIVATE)
    9038                 :          0 : t1_Vgatep_sourcep=0.0;
    9039                 :          0 : t1_Vdrainp_sourcep=0.0;
    9040                 :          0 : t1_Vdrainb_sourcep=0.0;
    9041                 :          0 : t1_Vbulkp_sourcep=((-prwb)*vbs_Vbulkp_sourcep);
    9042                 :          0 : t1_Vsourceb_sourcep=0.0;
    9043                 :            : #endif
    9044                 :          0 : t1=((-prwb)*vbs);
    9045                 :            : #if defined(_DERIVATE)
    9046                 :          0 : t2_Vgatep_sourcep=((-t0_Vgatep_sourcep/t0/t0)+t1_Vgatep_sourcep);
    9047                 :          0 : t2_Vdrainp_sourcep=((-t0_Vdrainp_sourcep/t0/t0)+t1_Vdrainp_sourcep);
    9048                 :          0 : t2_Vdrainb_sourcep=((-t0_Vdrainb_sourcep/t0/t0)+t1_Vdrainb_sourcep);
    9049                 :          0 : t2_Vbulkp_sourcep=((-t0_Vbulkp_sourcep/t0/t0)+t1_Vbulkp_sourcep);
    9050                 :          0 : t2_Vsourceb_sourcep=((-t0_Vsourceb_sourcep/t0/t0)+t1_Vsourceb_sourcep);
    9051                 :            : #endif
    9052                 :          0 : t2=((1.0/t0)+t1);
    9053                 :            : {
    9054                 :          0 : double m00_sqrt(d00_sqrt0,((t2*t2)+0.01))
    9055                 :            : #if defined(_DERIVATE)
    9056                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t2*t2)+0.01))
    9057                 :            : #endif
    9058                 :            : #if defined(_DERIVATE)
    9059                 :          0 : t3_Vgatep_sourcep=(t2_Vgatep_sourcep+((t2_Vgatep_sourcep*t2)+(t2*t2_Vgatep_sourcep))*d10_sqrt0);
    9060                 :          0 : t3_Vdrainp_sourcep=(t2_Vdrainp_sourcep+((t2_Vdrainp_sourcep*t2)+(t2*t2_Vdrainp_sourcep))*d10_sqrt0);
    9061                 :          0 : t3_Vdrainb_sourcep=(t2_Vdrainb_sourcep+((t2_Vdrainb_sourcep*t2)+(t2*t2_Vdrainb_sourcep))*d10_sqrt0);
    9062                 :          0 : t3_Vbulkp_sourcep=(t2_Vbulkp_sourcep+((t2_Vbulkp_sourcep*t2)+(t2*t2_Vbulkp_sourcep))*d10_sqrt0);
    9063                 :          0 : t3_Vsourceb_sourcep=(t2_Vsourceb_sourcep+((t2_Vsourceb_sourcep*t2)+(t2*t2_Vsourceb_sourcep))*d10_sqrt0);
    9064                 :            : #endif
    9065                 :          0 : t3=(t2+d00_sqrt0);
    9066                 :            : }
    9067                 :            : #if defined(_DERIVATE)
    9068                 :          0 : t4_Vgatep_sourcep=0.0;
    9069                 :          0 : t4_Vdrainp_sourcep=0.0;
    9070                 :          0 : t4_Vdrainb_sourcep=0.0;
    9071                 :          0 : t4_Vbulkp_sourcep=0.0;
    9072                 :          0 : t4_Vsourceb_sourcep=0.0;
    9073                 :            : #endif
    9074                 :          0 : t4=(rs0*0.5);
    9075                 :            : #if defined(_DERIVATE)
    9076                 :          0 : rs_Vgatep_sourcep=((t3_Vgatep_sourcep*t4)+(t3*t4_Vgatep_sourcep));
    9077                 :          0 : rs_Vdrainp_sourcep=((t3_Vdrainp_sourcep*t4)+(t3*t4_Vdrainp_sourcep));
    9078                 :          0 : rs_Vdrainb_sourcep=((t3_Vdrainb_sourcep*t4)+(t3*t4_Vdrainb_sourcep));
    9079                 :          0 : rs_Vbulkp_sourcep=((t3_Vbulkp_sourcep*t4)+(t3*t4_Vbulkp_sourcep));
    9080                 :          0 : rs_Vsourceb_sourcep=((t3_Vsourceb_sourcep*t4)+(t3*t4_Vsourceb_sourcep));
    9081                 :            : #endif
    9082                 :          0 : rs=(rswmin+(t3*t4));
    9083                 :            : #if defined(_DERIVATE)
    9084                 :          0 : t0_Vgatep_sourcep=(gsdiff*rs_Vgatep_sourcep);
    9085                 :          0 : t0_Vdrainp_sourcep=(gsdiff*rs_Vdrainp_sourcep);
    9086                 :          0 : t0_Vdrainb_sourcep=(gsdiff*rs_Vdrainb_sourcep);
    9087                 :          0 : t0_Vbulkp_sourcep=(gsdiff*rs_Vbulkp_sourcep);
    9088                 :          0 : t0_Vsourceb_sourcep=(gsdiff*rs_Vsourceb_sourcep);
    9089                 :            : #endif
    9090                 :          0 : t0=(1.0+(gsdiff*rs));
    9091                 :            : #if defined(_DERIVATE)
    9092                 :          0 : gstot_Vgatep_sourcep=(-gsdiff*t0_Vgatep_sourcep/t0/t0);
    9093                 :          0 : gstot_Vdrainp_sourcep=(-gsdiff*t0_Vdrainp_sourcep/t0/t0);
    9094                 :          0 : gstot_Vdrainb_sourcep=(-gsdiff*t0_Vdrainb_sourcep/t0/t0);
    9095                 :          0 : gstot_Vbulkp_sourcep=(-gsdiff*t0_Vbulkp_sourcep/t0/t0);
    9096                 :          0 : gstot_Vsourceb_sourcep=(-gsdiff*t0_Vsourceb_sourcep/t0/t0);
    9097                 :            : #endif
    9098                 :          0 : gstot=(gsdiff/t0);
    9099                 :            : #if defined(_DERIVATE)
    9100                 :          0 : t0_Vgatep_sourcep=vgd_Vgatep_sourcep;
    9101                 :          0 : t0_Vdrainp_sourcep=vgd_Vdrainp_sourcep;
    9102                 :          0 : t0_Vdrainb_sourcep=0.0;
    9103                 :          0 : t0_Vbulkp_sourcep=0.0;
    9104                 :          0 : t0_Vsourceb_sourcep=0.0;
    9105                 :            : #endif
    9106                 :          0 : t0=(vgd-vfbsd);
    9107                 :            : {
    9108                 :          0 : double m00_sqrt(d00_sqrt0,((t0*t0)+1.0e-4))
    9109                 :            : #if defined(_DERIVATE)
    9110                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+1.0e-4))
    9111                 :            : #endif
    9112                 :            : #if defined(_DERIVATE)
    9113                 :          0 : t1_Vgatep_sourcep=((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))*d10_sqrt0;
    9114                 :          0 : t1_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))*d10_sqrt0;
    9115                 :          0 : t1_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))*d10_sqrt0;
    9116                 :          0 : t1_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))*d10_sqrt0;
    9117                 :          0 : t1_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))*d10_sqrt0;
    9118                 :            : #endif
    9119                 :          0 : t1=d00_sqrt0;
    9120                 :            : }
    9121                 :            : #if defined(_DERIVATE)
    9122                 :          0 : vgd_eff_Vgatep_sourcep=(0.5*(t0_Vgatep_sourcep+t1_Vgatep_sourcep));
    9123                 :          0 : vgd_eff_Vdrainp_sourcep=(0.5*(t0_Vdrainp_sourcep+t1_Vdrainp_sourcep));
    9124                 :          0 : vgd_eff_Vdrainb_sourcep=(0.5*(t0_Vdrainb_sourcep+t1_Vdrainb_sourcep));
    9125                 :          0 : vgd_eff_Vbulkp_sourcep=(0.5*(t0_Vbulkp_sourcep+t1_Vbulkp_sourcep));
    9126                 :          0 : vgd_eff_Vsourceb_sourcep=(0.5*(t0_Vsourceb_sourcep+t1_Vsourceb_sourcep));
    9127                 :            : #endif
    9128                 :          0 : vgd_eff=(0.5*(t0+t1));
    9129                 :            : #if defined(_DERIVATE)
    9130                 :          0 : t0_Vgatep_sourcep=(prwg*vgd_eff_Vgatep_sourcep);
    9131                 :          0 : t0_Vdrainp_sourcep=(prwg*vgd_eff_Vdrainp_sourcep);
    9132                 :          0 : t0_Vdrainb_sourcep=(prwg*vgd_eff_Vdrainb_sourcep);
    9133                 :          0 : t0_Vbulkp_sourcep=(prwg*vgd_eff_Vbulkp_sourcep);
    9134                 :          0 : t0_Vsourceb_sourcep=(prwg*vgd_eff_Vsourceb_sourcep);
    9135                 :            : #endif
    9136                 :          0 : t0=(1.0+(prwg*vgd_eff));
    9137                 :            : #if defined(_DERIVATE)
    9138                 :          0 : t1_Vgatep_sourcep=0.0;
    9139                 :          0 : t1_Vdrainp_sourcep=((-prwb)*vbd_Vdrainp_sourcep);
    9140                 :          0 : t1_Vdrainb_sourcep=0.0;
    9141                 :          0 : t1_Vbulkp_sourcep=((-prwb)*vbd_Vbulkp_sourcep);
    9142                 :          0 : t1_Vsourceb_sourcep=0.0;
    9143                 :            : #endif
    9144                 :          0 : t1=((-prwb)*vbd);
    9145                 :            : #if defined(_DERIVATE)
    9146                 :          0 : t2_Vgatep_sourcep=((-t0_Vgatep_sourcep/t0/t0)+t1_Vgatep_sourcep);
    9147                 :          0 : t2_Vdrainp_sourcep=((-t0_Vdrainp_sourcep/t0/t0)+t1_Vdrainp_sourcep);
    9148                 :          0 : t2_Vdrainb_sourcep=((-t0_Vdrainb_sourcep/t0/t0)+t1_Vdrainb_sourcep);
    9149                 :          0 : t2_Vbulkp_sourcep=((-t0_Vbulkp_sourcep/t0/t0)+t1_Vbulkp_sourcep);
    9150                 :          0 : t2_Vsourceb_sourcep=((-t0_Vsourceb_sourcep/t0/t0)+t1_Vsourceb_sourcep);
    9151                 :            : #endif
    9152                 :          0 : t2=((1.0/t0)+t1);
    9153                 :            : {
    9154                 :          0 : double m00_sqrt(d00_sqrt0,((t2*t2)+0.01))
    9155                 :            : #if defined(_DERIVATE)
    9156                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t2*t2)+0.01))
    9157                 :            : #endif
    9158                 :            : #if defined(_DERIVATE)
    9159                 :          0 : t3_Vgatep_sourcep=(t2_Vgatep_sourcep+((t2_Vgatep_sourcep*t2)+(t2*t2_Vgatep_sourcep))*d10_sqrt0);
    9160                 :          0 : t3_Vdrainp_sourcep=(t2_Vdrainp_sourcep+((t2_Vdrainp_sourcep*t2)+(t2*t2_Vdrainp_sourcep))*d10_sqrt0);
    9161                 :          0 : t3_Vdrainb_sourcep=(t2_Vdrainb_sourcep+((t2_Vdrainb_sourcep*t2)+(t2*t2_Vdrainb_sourcep))*d10_sqrt0);
    9162                 :          0 : t3_Vbulkp_sourcep=(t2_Vbulkp_sourcep+((t2_Vbulkp_sourcep*t2)+(t2*t2_Vbulkp_sourcep))*d10_sqrt0);
    9163                 :          0 : t3_Vsourceb_sourcep=(t2_Vsourceb_sourcep+((t2_Vsourceb_sourcep*t2)+(t2*t2_Vsourceb_sourcep))*d10_sqrt0);
    9164                 :            : #endif
    9165                 :          0 : t3=(t2+d00_sqrt0);
    9166                 :            : }
    9167                 :            : #if defined(_DERIVATE)
    9168                 :          0 : t4_Vgatep_sourcep=0.0;
    9169                 :          0 : t4_Vdrainp_sourcep=0.0;
    9170                 :          0 : t4_Vdrainb_sourcep=0.0;
    9171                 :          0 : t4_Vbulkp_sourcep=0.0;
    9172                 :          0 : t4_Vsourceb_sourcep=0.0;
    9173                 :            : #endif
    9174                 :          0 : t4=(rd0*0.5);
    9175                 :            : #if defined(_DERIVATE)
    9176                 :          0 : rd_Vgatep_sourcep=((t3_Vgatep_sourcep*t4)+(t3*t4_Vgatep_sourcep));
    9177                 :          0 : rd_Vdrainp_sourcep=((t3_Vdrainp_sourcep*t4)+(t3*t4_Vdrainp_sourcep));
    9178                 :          0 : rd_Vdrainb_sourcep=((t3_Vdrainb_sourcep*t4)+(t3*t4_Vdrainb_sourcep));
    9179                 :          0 : rd_Vbulkp_sourcep=((t3_Vbulkp_sourcep*t4)+(t3*t4_Vbulkp_sourcep));
    9180                 :          0 : rd_Vsourceb_sourcep=((t3_Vsourceb_sourcep*t4)+(t3*t4_Vsourceb_sourcep));
    9181                 :            : #endif
    9182                 :          0 : rd=(rdwmin+(t3*t4));
    9183                 :            : #if defined(_DERIVATE)
    9184                 :          0 : t0_Vgatep_sourcep=(gddiff*rd_Vgatep_sourcep);
    9185                 :          0 : t0_Vdrainp_sourcep=(gddiff*rd_Vdrainp_sourcep);
    9186                 :          0 : t0_Vdrainb_sourcep=(gddiff*rd_Vdrainb_sourcep);
    9187                 :          0 : t0_Vbulkp_sourcep=(gddiff*rd_Vbulkp_sourcep);
    9188                 :          0 : t0_Vsourceb_sourcep=(gddiff*rd_Vsourceb_sourcep);
    9189                 :            : #endif
    9190                 :          0 : t0=(1.0+(gddiff*rd));
    9191                 :            : #if defined(_DERIVATE)
    9192                 :          0 : gdtot_Vgatep_sourcep=(-gddiff*t0_Vgatep_sourcep/t0/t0);
    9193                 :          0 : gdtot_Vdrainp_sourcep=(-gddiff*t0_Vdrainp_sourcep/t0/t0);
    9194                 :          0 : gdtot_Vdrainb_sourcep=(-gddiff*t0_Vdrainb_sourcep/t0/t0);
    9195                 :          0 : gdtot_Vbulkp_sourcep=(-gddiff*t0_Vbulkp_sourcep/t0/t0);
    9196                 :          0 : gdtot_Vsourceb_sourcep=(-gddiff*t0_Vsourceb_sourcep/t0/t0);
    9197                 :            : #endif
    9198                 :          0 : gdtot=(gddiff/t0);
    9199                 :            : }
    9200                 :            : else
    9201                 :            : {
    9202                 :            : #if defined(_DERIVATE)
    9203                 :       7356 : gstot_Vgatep_sourcep=0.0;
    9204                 :       7356 : gstot_Vdrainp_sourcep=0.0;
    9205                 :       7356 : gstot_Vdrainb_sourcep=0.0;
    9206                 :       7356 : gstot_Vbulkp_sourcep=0.0;
    9207                 :       7356 : gstot_Vsourceb_sourcep=0.0;
    9208                 :            : #endif
    9209                 :       7356 : gstot=0.0;
    9210                 :            : #if defined(_DERIVATE)
    9211                 :       7356 : gdtot_Vgatep_sourcep=0.0;
    9212                 :       7356 : gdtot_Vdrainp_sourcep=0.0;
    9213                 :       7356 : gdtot_Vdrainb_sourcep=0.0;
    9214                 :       7356 : gdtot_Vbulkp_sourcep=0.0;
    9215                 :       7356 : gdtot_Vsourceb_sourcep=0.0;
    9216                 :            : #endif
    9217                 :       7356 : gdtot=0.0;
    9218                 :            : }
    9219                 :            : #if defined(_DERIVATE)
    9220                 :       7356 : t0_Vgatep_sourcep=0.0;
    9221                 :       7356 : t0_Vdrainp_sourcep=0.0;
    9222                 :       7356 : t0_Vdrainb_sourcep=0.0;
    9223                 :       7356 : t0_Vbulkp_sourcep=0.0;
    9224                 :       7356 : t0_Vsourceb_sourcep=0.0;
    9225                 :            : #endif
    9226                 :       7356 : t0=(3.0*toxe);
    9227                 :            : #if defined(_DERIVATE)
    9228                 :       7356 : t1_Vgatep_sourcep=(((-vgs_eff_Vgatep_sourcep)*t0-((vds-vgs_eff)-egidl)*t0_Vgatep_sourcep)/t0/t0);
    9229                 :       7356 : t1_Vdrainp_sourcep=(((vds_Vdrainp_sourcep-vgs_eff_Vdrainp_sourcep)*t0-((vds-vgs_eff)-egidl)*t0_Vdrainp_sourcep)/t0/t0);
    9230                 :       7356 : t1_Vdrainb_sourcep=(((-vgs_eff_Vdrainb_sourcep)*t0-((vds-vgs_eff)-egidl)*t0_Vdrainb_sourcep)/t0/t0);
    9231                 :       7356 : t1_Vbulkp_sourcep=(((-vgs_eff_Vbulkp_sourcep)*t0-((vds-vgs_eff)-egidl)*t0_Vbulkp_sourcep)/t0/t0);
    9232                 :       7356 : t1_Vsourceb_sourcep=(((-vgs_eff_Vsourceb_sourcep)*t0-((vds-vgs_eff)-egidl)*t0_Vsourceb_sourcep)/t0/t0);
    9233                 :            : #endif
    9234                 :       7356 : t1=(((vds-vgs_eff)-egidl)/t0);
    9235 [ -  + ][ #  # ]:       7356 : if
         [ #  # ][ #  # ]
                 [ #  # ]
    9236                 :            : (((((agidl<=0.0)||(bgidl<=0.0))||(t1<=0.0))||(cgidl<=0.0))||(vbd>0.0))
    9237                 :            : {
    9238                 :            : #if defined(_DERIVATE)
    9239                 :       7356 : igidl_Vgatep_sourcep=0.0;
    9240                 :       7356 : igidl_Vdrainp_sourcep=0.0;
    9241                 :       7356 : igidl_Vdrainb_sourcep=0.0;
    9242                 :       7356 : igidl_Vbulkp_sourcep=0.0;
    9243                 :       7356 : igidl_Vsourceb_sourcep=0.0;
    9244                 :            : #endif
    9245                 :       7356 : igidl=0.0;
    9246                 :            : }
    9247                 :            : else
    9248                 :            : {
    9249                 :            : #if defined(_DERIVATE)
    9250                 :          0 : t2_Vgatep_sourcep=(-bgidl*t1_Vgatep_sourcep/t1/t1);
    9251                 :          0 : t2_Vdrainp_sourcep=(-bgidl*t1_Vdrainp_sourcep/t1/t1);
    9252                 :          0 : t2_Vdrainb_sourcep=(-bgidl*t1_Vdrainb_sourcep/t1/t1);
    9253                 :          0 : t2_Vbulkp_sourcep=(-bgidl*t1_Vbulkp_sourcep/t1/t1);
    9254                 :          0 : t2_Vsourceb_sourcep=(-bgidl*t1_Vsourceb_sourcep/t1/t1);
    9255                 :            : #endif
    9256                 :          0 : t2=(bgidl/t1);
    9257         [ #  # ]:          0 : if
    9258                 :            : (t2<100.0)
    9259                 :            : {
    9260                 :            : {
    9261                 :          0 : double m00_exp(d00_exp0,(-t2))
    9262                 :            : #if defined(_DERIVATE)
    9263                 :            : #define d10_exp0 d00_exp0
    9264                 :            : #endif
    9265                 :            : #if defined(_DERIVATE)
    9266                 :          0 : igidl_Vgatep_sourcep=((((agidl*weffcj)*t1_Vgatep_sourcep)*d00_exp0)+(((agidl*weffcj)*t1)*(-t2_Vgatep_sourcep)*d10_exp0));
    9267                 :          0 : igidl_Vdrainp_sourcep=((((agidl*weffcj)*t1_Vdrainp_sourcep)*d00_exp0)+(((agidl*weffcj)*t1)*(-t2_Vdrainp_sourcep)*d10_exp0));
    9268                 :          0 : igidl_Vdrainb_sourcep=((((agidl*weffcj)*t1_Vdrainb_sourcep)*d00_exp0)+(((agidl*weffcj)*t1)*(-t2_Vdrainb_sourcep)*d10_exp0));
    9269                 :          0 : igidl_Vbulkp_sourcep=((((agidl*weffcj)*t1_Vbulkp_sourcep)*d00_exp0)+(((agidl*weffcj)*t1)*(-t2_Vbulkp_sourcep)*d10_exp0));
    9270                 :          0 : igidl_Vsourceb_sourcep=((((agidl*weffcj)*t1_Vsourceb_sourcep)*d00_exp0)+(((agidl*weffcj)*t1)*(-t2_Vsourceb_sourcep)*d10_exp0));
    9271                 :            : #endif
    9272                 :          0 : igidl=(((agidl*weffcj)*t1)*d00_exp0);
    9273                 :            : }
    9274                 :            : }
    9275                 :            : else
    9276                 :            : {
    9277                 :            : #if defined(_DERIVATE)
    9278                 :          0 : igidl_Vgatep_sourcep=0.0;
    9279                 :          0 : igidl_Vdrainp_sourcep=0.0;
    9280                 :          0 : igidl_Vdrainb_sourcep=0.0;
    9281                 :          0 : igidl_Vbulkp_sourcep=0.0;
    9282                 :          0 : igidl_Vsourceb_sourcep=0.0;
    9283                 :            : #endif
    9284                 :          0 : igidl=((agidl*weffcj)*3.720075976e-44);
    9285                 :            : #if defined(_DERIVATE)
    9286                 :          0 : igidl_Vgatep_sourcep=((igidl_Vgatep_sourcep*t1)+(igidl*t1_Vgatep_sourcep));
    9287                 :          0 : igidl_Vdrainp_sourcep=((igidl_Vdrainp_sourcep*t1)+(igidl*t1_Vdrainp_sourcep));
    9288                 :          0 : igidl_Vdrainb_sourcep=((igidl_Vdrainb_sourcep*t1)+(igidl*t1_Vdrainb_sourcep));
    9289                 :          0 : igidl_Vbulkp_sourcep=((igidl_Vbulkp_sourcep*t1)+(igidl*t1_Vbulkp_sourcep));
    9290                 :          0 : igidl_Vsourceb_sourcep=((igidl_Vsourceb_sourcep*t1)+(igidl*t1_Vsourceb_sourcep));
    9291                 :            : #endif
    9292                 :          0 : igidl=(igidl*t1);
    9293                 :            : }
    9294                 :            : #if defined(_DERIVATE)
    9295                 :          0 : t4_Vgatep_sourcep=0.0;
    9296                 :          0 : t4_Vdrainp_sourcep=((vbd_Vdrainp_sourcep*vbd)+(vbd*vbd_Vdrainp_sourcep));
    9297                 :          0 : t4_Vdrainb_sourcep=0.0;
    9298                 :          0 : t4_Vbulkp_sourcep=((vbd_Vbulkp_sourcep*vbd)+(vbd*vbd_Vbulkp_sourcep));
    9299                 :          0 : t4_Vsourceb_sourcep=0.0;
    9300                 :            : #endif
    9301                 :          0 : t4=(vbd*vbd);
    9302                 :            : #if defined(_DERIVATE)
    9303                 :          0 : t5_Vgatep_sourcep=((-vbd)*t4_Vgatep_sourcep);
    9304                 :          0 : t5_Vdrainp_sourcep=(((-vbd_Vdrainp_sourcep)*t4)+((-vbd)*t4_Vdrainp_sourcep));
    9305                 :          0 : t5_Vdrainb_sourcep=((-vbd)*t4_Vdrainb_sourcep);
    9306                 :          0 : t5_Vbulkp_sourcep=(((-vbd_Vbulkp_sourcep)*t4)+((-vbd)*t4_Vbulkp_sourcep));
    9307                 :          0 : t5_Vsourceb_sourcep=((-vbd)*t4_Vsourceb_sourcep);
    9308                 :            : #endif
    9309                 :          0 : t5=((-vbd)*t4);
    9310                 :            : #if defined(_DERIVATE)
    9311                 :          0 : t6_Vgatep_sourcep=t5_Vgatep_sourcep;
    9312                 :          0 : t6_Vdrainp_sourcep=t5_Vdrainp_sourcep;
    9313                 :          0 : t6_Vdrainb_sourcep=t5_Vdrainb_sourcep;
    9314                 :          0 : t6_Vbulkp_sourcep=t5_Vbulkp_sourcep;
    9315                 :          0 : t6_Vsourceb_sourcep=t5_Vsourceb_sourcep;
    9316                 :            : #endif
    9317                 :          0 : t6=(cgidl+t5);
    9318                 :            : #if defined(_DERIVATE)
    9319                 :          0 : t7_Vgatep_sourcep=((t5_Vgatep_sourcep*t6-t5*t6_Vgatep_sourcep)/t6/t6);
    9320                 :          0 : t7_Vdrainp_sourcep=((t5_Vdrainp_sourcep*t6-t5*t6_Vdrainp_sourcep)/t6/t6);
    9321                 :          0 : t7_Vdrainb_sourcep=((t5_Vdrainb_sourcep*t6-t5*t6_Vdrainb_sourcep)/t6/t6);
    9322                 :          0 : t7_Vbulkp_sourcep=((t5_Vbulkp_sourcep*t6-t5*t6_Vbulkp_sourcep)/t6/t6);
    9323                 :          0 : t7_Vsourceb_sourcep=((t5_Vsourceb_sourcep*t6-t5*t6_Vsourceb_sourcep)/t6/t6);
    9324                 :            : #endif
    9325                 :          0 : t7=(t5/t6);
    9326                 :            : #if defined(_DERIVATE)
    9327                 :          0 : t8_Vgatep_sourcep=((((((3.0*cgidl)*t4_Vgatep_sourcep)*t6-((3.0*cgidl)*t4)*t6_Vgatep_sourcep)/t6/t6)*t6-(((3.0*cgidl)*t4)/t6)*t6_Vgatep_sourcep)/t6/t6);
    9328                 :          0 : t8_Vdrainp_sourcep=((((((3.0*cgidl)*t4_Vdrainp_sourcep)*t6-((3.0*cgidl)*t4)*t6_Vdrainp_sourcep)/t6/t6)*t6-(((3.0*cgidl)*t4)/t6)*t6_Vdrainp_sourcep)/t6/t6);
    9329                 :          0 : t8_Vdrainb_sourcep=((((((3.0*cgidl)*t4_Vdrainb_sourcep)*t6-((3.0*cgidl)*t4)*t6_Vdrainb_sourcep)/t6/t6)*t6-(((3.0*cgidl)*t4)/t6)*t6_Vdrainb_sourcep)/t6/t6);
    9330                 :          0 : t8_Vbulkp_sourcep=((((((3.0*cgidl)*t4_Vbulkp_sourcep)*t6-((3.0*cgidl)*t4)*t6_Vbulkp_sourcep)/t6/t6)*t6-(((3.0*cgidl)*t4)/t6)*t6_Vbulkp_sourcep)/t6/t6);
    9331                 :          0 : t8_Vsourceb_sourcep=((((((3.0*cgidl)*t4_Vsourceb_sourcep)*t6-((3.0*cgidl)*t4)*t6_Vsourceb_sourcep)/t6/t6)*t6-(((3.0*cgidl)*t4)/t6)*t6_Vsourceb_sourcep)/t6/t6);
    9332                 :            : #endif
    9333                 :          0 : t8=((((3.0*cgidl)*t4)/t6)/t6);
    9334                 :            : #if defined(_DERIVATE)
    9335                 :          0 : igidl_Vgatep_sourcep=((igidl_Vgatep_sourcep*t7)+(igidl*t7_Vgatep_sourcep));
    9336                 :          0 : igidl_Vdrainp_sourcep=((igidl_Vdrainp_sourcep*t7)+(igidl*t7_Vdrainp_sourcep));
    9337                 :          0 : igidl_Vdrainb_sourcep=((igidl_Vdrainb_sourcep*t7)+(igidl*t7_Vdrainb_sourcep));
    9338                 :          0 : igidl_Vbulkp_sourcep=((igidl_Vbulkp_sourcep*t7)+(igidl*t7_Vbulkp_sourcep));
    9339                 :          0 : igidl_Vsourceb_sourcep=((igidl_Vsourceb_sourcep*t7)+(igidl*t7_Vsourceb_sourcep));
    9340                 :            : #endif
    9341                 :          0 : igidl=(igidl*t7);
    9342                 :            : }
    9343                 :            : #if defined(_DERIVATE)
    9344                 :       7356 : t1_Vgatep_sourcep=(((-vgd_eff_Vgatep_sourcep)*t0-(((-vds)-vgd_eff)-egidl)*t0_Vgatep_sourcep)/t0/t0);
    9345                 :       7356 : t1_Vdrainp_sourcep=((((-vds_Vdrainp_sourcep)-vgd_eff_Vdrainp_sourcep)*t0-(((-vds)-vgd_eff)-egidl)*t0_Vdrainp_sourcep)/t0/t0);
    9346                 :       7356 : t1_Vdrainb_sourcep=(((-vgd_eff_Vdrainb_sourcep)*t0-(((-vds)-vgd_eff)-egidl)*t0_Vdrainb_sourcep)/t0/t0);
    9347                 :       7356 : t1_Vbulkp_sourcep=(((-vgd_eff_Vbulkp_sourcep)*t0-(((-vds)-vgd_eff)-egidl)*t0_Vbulkp_sourcep)/t0/t0);
    9348                 :       7356 : t1_Vsourceb_sourcep=(((-vgd_eff_Vsourceb_sourcep)*t0-(((-vds)-vgd_eff)-egidl)*t0_Vsourceb_sourcep)/t0/t0);
    9349                 :            : #endif
    9350                 :       7356 : t1=((((-vds)-vgd_eff)-egidl)/t0);
    9351 [ -  + ][ #  # ]:       7356 : if
         [ #  # ][ #  # ]
                 [ #  # ]
    9352                 :            : (((((agidl<=0.0)||(bgidl<=0.0))||(t1<=0.0))||(cgidl<=0.0))||(vbs>0.0))
    9353                 :            : {
    9354                 :            : #if defined(_DERIVATE)
    9355                 :       7356 : igisl_Vgatep_sourcep=0.0;
    9356                 :       7356 : igisl_Vdrainp_sourcep=0.0;
    9357                 :       7356 : igisl_Vdrainb_sourcep=0.0;
    9358                 :       7356 : igisl_Vbulkp_sourcep=0.0;
    9359                 :       7356 : igisl_Vsourceb_sourcep=0.0;
    9360                 :            : #endif
    9361                 :       7356 : igisl=0.0;
    9362                 :            : }
    9363                 :            : else
    9364                 :            : {
    9365                 :            : #if defined(_DERIVATE)
    9366                 :          0 : t2_Vgatep_sourcep=(-bgidl*t1_Vgatep_sourcep/t1/t1);
    9367                 :          0 : t2_Vdrainp_sourcep=(-bgidl*t1_Vdrainp_sourcep/t1/t1);
    9368                 :          0 : t2_Vdrainb_sourcep=(-bgidl*t1_Vdrainb_sourcep/t1/t1);
    9369                 :          0 : t2_Vbulkp_sourcep=(-bgidl*t1_Vbulkp_sourcep/t1/t1);
    9370                 :          0 : t2_Vsourceb_sourcep=(-bgidl*t1_Vsourceb_sourcep/t1/t1);
    9371                 :            : #endif
    9372                 :          0 : t2=(bgidl/t1);
    9373         [ #  # ]:          0 : if
    9374                 :            : (t2<100.0)
    9375                 :            : {
    9376                 :            : {
    9377                 :          0 : double m00_exp(d00_exp0,(-t2))
    9378                 :            : #if defined(_DERIVATE)
    9379                 :            : #define d10_exp0 d00_exp0
    9380                 :            : #endif
    9381                 :            : #if defined(_DERIVATE)
    9382                 :          0 : igisl_Vgatep_sourcep=((((agidl*weffcj)*t1_Vgatep_sourcep)*d00_exp0)+(((agidl*weffcj)*t1)*(-t2_Vgatep_sourcep)*d10_exp0));
    9383                 :          0 : igisl_Vdrainp_sourcep=((((agidl*weffcj)*t1_Vdrainp_sourcep)*d00_exp0)+(((agidl*weffcj)*t1)*(-t2_Vdrainp_sourcep)*d10_exp0));
    9384                 :          0 : igisl_Vdrainb_sourcep=((((agidl*weffcj)*t1_Vdrainb_sourcep)*d00_exp0)+(((agidl*weffcj)*t1)*(-t2_Vdrainb_sourcep)*d10_exp0));
    9385                 :          0 : igisl_Vbulkp_sourcep=((((agidl*weffcj)*t1_Vbulkp_sourcep)*d00_exp0)+(((agidl*weffcj)*t1)*(-t2_Vbulkp_sourcep)*d10_exp0));
    9386                 :          0 : igisl_Vsourceb_sourcep=((((agidl*weffcj)*t1_Vsourceb_sourcep)*d00_exp0)+(((agidl*weffcj)*t1)*(-t2_Vsourceb_sourcep)*d10_exp0));
    9387                 :            : #endif
    9388                 :          0 : igisl=(((agidl*weffcj)*t1)*d00_exp0);
    9389                 :            : }
    9390                 :            : }
    9391                 :            : else
    9392                 :            : {
    9393                 :            : #if defined(_DERIVATE)
    9394                 :          0 : igisl_Vgatep_sourcep=0.0;
    9395                 :          0 : igisl_Vdrainp_sourcep=0.0;
    9396                 :          0 : igisl_Vdrainb_sourcep=0.0;
    9397                 :          0 : igisl_Vbulkp_sourcep=0.0;
    9398                 :          0 : igisl_Vsourceb_sourcep=0.0;
    9399                 :            : #endif
    9400                 :          0 : igisl=((agidl*weffcj)*3.720075976e-44);
    9401                 :            : #if defined(_DERIVATE)
    9402                 :          0 : igisl_Vgatep_sourcep=((igisl_Vgatep_sourcep*t1)+(igisl*t1_Vgatep_sourcep));
    9403                 :          0 : igisl_Vdrainp_sourcep=((igisl_Vdrainp_sourcep*t1)+(igisl*t1_Vdrainp_sourcep));
    9404                 :          0 : igisl_Vdrainb_sourcep=((igisl_Vdrainb_sourcep*t1)+(igisl*t1_Vdrainb_sourcep));
    9405                 :          0 : igisl_Vbulkp_sourcep=((igisl_Vbulkp_sourcep*t1)+(igisl*t1_Vbulkp_sourcep));
    9406                 :          0 : igisl_Vsourceb_sourcep=((igisl_Vsourceb_sourcep*t1)+(igisl*t1_Vsourceb_sourcep));
    9407                 :            : #endif
    9408                 :          0 : igisl=(igisl*t1);
    9409                 :            : }
    9410                 :            : #if defined(_DERIVATE)
    9411                 :          0 : t4_Vgatep_sourcep=0.0;
    9412                 :          0 : t4_Vdrainp_sourcep=0.0;
    9413                 :          0 : t4_Vdrainb_sourcep=0.0;
    9414                 :          0 : t4_Vbulkp_sourcep=((vbs_Vbulkp_sourcep*vbs)+(vbs*vbs_Vbulkp_sourcep));
    9415                 :          0 : t4_Vsourceb_sourcep=0.0;
    9416                 :            : #endif
    9417                 :          0 : t4=(vbs*vbs);
    9418                 :            : #if defined(_DERIVATE)
    9419                 :          0 : t5_Vgatep_sourcep=((-vbs)*t4_Vgatep_sourcep);
    9420                 :          0 : t5_Vdrainp_sourcep=((-vbs)*t4_Vdrainp_sourcep);
    9421                 :          0 : t5_Vdrainb_sourcep=((-vbs)*t4_Vdrainb_sourcep);
    9422                 :          0 : t5_Vbulkp_sourcep=(((-vbs_Vbulkp_sourcep)*t4)+((-vbs)*t4_Vbulkp_sourcep));
    9423                 :          0 : t5_Vsourceb_sourcep=((-vbs)*t4_Vsourceb_sourcep);
    9424                 :            : #endif
    9425                 :          0 : t5=((-vbs)*t4);
    9426                 :            : #if defined(_DERIVATE)
    9427                 :          0 : t6_Vgatep_sourcep=t5_Vgatep_sourcep;
    9428                 :          0 : t6_Vdrainp_sourcep=t5_Vdrainp_sourcep;
    9429                 :          0 : t6_Vdrainb_sourcep=t5_Vdrainb_sourcep;
    9430                 :          0 : t6_Vbulkp_sourcep=t5_Vbulkp_sourcep;
    9431                 :          0 : t6_Vsourceb_sourcep=t5_Vsourceb_sourcep;
    9432                 :            : #endif
    9433                 :          0 : t6=(cgidl+t5);
    9434                 :            : #if defined(_DERIVATE)
    9435                 :          0 : t7_Vgatep_sourcep=((t5_Vgatep_sourcep*t6-t5*t6_Vgatep_sourcep)/t6/t6);
    9436                 :          0 : t7_Vdrainp_sourcep=((t5_Vdrainp_sourcep*t6-t5*t6_Vdrainp_sourcep)/t6/t6);
    9437                 :          0 : t7_Vdrainb_sourcep=((t5_Vdrainb_sourcep*t6-t5*t6_Vdrainb_sourcep)/t6/t6);
    9438                 :          0 : t7_Vbulkp_sourcep=((t5_Vbulkp_sourcep*t6-t5*t6_Vbulkp_sourcep)/t6/t6);
    9439                 :          0 : t7_Vsourceb_sourcep=((t5_Vsourceb_sourcep*t6-t5*t6_Vsourceb_sourcep)/t6/t6);
    9440                 :            : #endif
    9441                 :          0 : t7=(t5/t6);
    9442                 :            : #if defined(_DERIVATE)
    9443                 :          0 : t8_Vgatep_sourcep=((((((3.0*cgidl)*t4_Vgatep_sourcep)*t6-((3.0*cgidl)*t4)*t6_Vgatep_sourcep)/t6/t6)*t6-(((3.0*cgidl)*t4)/t6)*t6_Vgatep_sourcep)/t6/t6);
    9444                 :          0 : t8_Vdrainp_sourcep=((((((3.0*cgidl)*t4_Vdrainp_sourcep)*t6-((3.0*cgidl)*t4)*t6_Vdrainp_sourcep)/t6/t6)*t6-(((3.0*cgidl)*t4)/t6)*t6_Vdrainp_sourcep)/t6/t6);
    9445                 :          0 : t8_Vdrainb_sourcep=((((((3.0*cgidl)*t4_Vdrainb_sourcep)*t6-((3.0*cgidl)*t4)*t6_Vdrainb_sourcep)/t6/t6)*t6-(((3.0*cgidl)*t4)/t6)*t6_Vdrainb_sourcep)/t6/t6);
    9446                 :          0 : t8_Vbulkp_sourcep=((((((3.0*cgidl)*t4_Vbulkp_sourcep)*t6-((3.0*cgidl)*t4)*t6_Vbulkp_sourcep)/t6/t6)*t6-(((3.0*cgidl)*t4)/t6)*t6_Vbulkp_sourcep)/t6/t6);
    9447                 :          0 : t8_Vsourceb_sourcep=((((((3.0*cgidl)*t4_Vsourceb_sourcep)*t6-((3.0*cgidl)*t4)*t6_Vsourceb_sourcep)/t6/t6)*t6-(((3.0*cgidl)*t4)/t6)*t6_Vsourceb_sourcep)/t6/t6);
    9448                 :            : #endif
    9449                 :          0 : t8=((((3.0*cgidl)*t4)/t6)/t6);
    9450                 :            : #if defined(_DERIVATE)
    9451                 :          0 : igisl_Vgatep_sourcep=((igisl_Vgatep_sourcep*t7)+(igisl*t7_Vgatep_sourcep));
    9452                 :          0 : igisl_Vdrainp_sourcep=((igisl_Vdrainp_sourcep*t7)+(igisl*t7_Vdrainp_sourcep));
    9453                 :          0 : igisl_Vdrainb_sourcep=((igisl_Vdrainb_sourcep*t7)+(igisl*t7_Vdrainb_sourcep));
    9454                 :          0 : igisl_Vbulkp_sourcep=((igisl_Vbulkp_sourcep*t7)+(igisl*t7_Vbulkp_sourcep));
    9455                 :          0 : igisl_Vsourceb_sourcep=((igisl_Vsourceb_sourcep*t7)+(igisl*t7_Vsourceb_sourcep));
    9456                 :            : #endif
    9457                 :          0 : igisl=(igisl*t7);
    9458                 :            : }
    9459 [ +  - ][ -  + ]:       7356 : if
    9460                 :            : ((igcmod!=0.0)||(igbmod!=0.0))
    9461                 :            : {
    9462                 :            : #if defined(_DERIVATE)
    9463                 :          0 : v3_Vgatep_sourcep=(-Vgs_eff_Vgatep_sourcep);
    9464                 :          0 : v3_Vdrainp_sourcep=((-Vgs_eff_Vdrainp_sourcep)+vbseff_Vdrainp_sourcep);
    9465                 :          0 : v3_Vdrainb_sourcep=((-Vgs_eff_Vdrainb_sourcep)+vbseff_Vdrainb_sourcep);
    9466                 :          0 : v3_Vbulkp_sourcep=((-Vgs_eff_Vbulkp_sourcep)+vbseff_Vbulkp_sourcep);
    9467                 :          0 : v3_Vsourceb_sourcep=((-Vgs_eff_Vsourceb_sourcep)+vbseff_Vsourceb_sourcep);
    9468                 :            : #endif
    9469                 :          0 : v3=(((vfbzb-Vgs_eff)+vbseff)-0.02);
    9470         [ #  # ]:          0 : if
    9471                 :            : (vfbzb<=0.0)
    9472                 :            : {
    9473                 :            : {
    9474                 :          0 : double m00_sqrt(d00_sqrt0,((v3*v3)-((4.0*0.02)*vfbzb)))
    9475                 :            : #if defined(_DERIVATE)
    9476                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((v3*v3)-((4.0*0.02)*vfbzb)))
    9477                 :            : #endif
    9478                 :            : #if defined(_DERIVATE)
    9479                 :          0 : t0_Vgatep_sourcep=((v3_Vgatep_sourcep*v3)+(v3*v3_Vgatep_sourcep))*d10_sqrt0;
    9480                 :          0 : t0_Vdrainp_sourcep=((v3_Vdrainp_sourcep*v3)+(v3*v3_Vdrainp_sourcep))*d10_sqrt0;
    9481                 :          0 : t0_Vdrainb_sourcep=((v3_Vdrainb_sourcep*v3)+(v3*v3_Vdrainb_sourcep))*d10_sqrt0;
    9482                 :          0 : t0_Vbulkp_sourcep=((v3_Vbulkp_sourcep*v3)+(v3*v3_Vbulkp_sourcep))*d10_sqrt0;
    9483                 :          0 : t0_Vsourceb_sourcep=((v3_Vsourceb_sourcep*v3)+(v3*v3_Vsourceb_sourcep))*d10_sqrt0;
    9484                 :            : #endif
    9485                 :          0 : t0=d00_sqrt0;
    9486                 :            : }
    9487                 :            : }
    9488                 :            : else
    9489                 :            : {
    9490                 :            : {
    9491                 :          0 : double m00_sqrt(d00_sqrt0,((v3*v3)+((4.0*0.02)*vfbzb)))
    9492                 :            : #if defined(_DERIVATE)
    9493                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((v3*v3)+((4.0*0.02)*vfbzb)))
    9494                 :            : #endif
    9495                 :            : #if defined(_DERIVATE)
    9496                 :          0 : t0_Vgatep_sourcep=((v3_Vgatep_sourcep*v3)+(v3*v3_Vgatep_sourcep))*d10_sqrt0;
    9497                 :          0 : t0_Vdrainp_sourcep=((v3_Vdrainp_sourcep*v3)+(v3*v3_Vdrainp_sourcep))*d10_sqrt0;
    9498                 :          0 : t0_Vdrainb_sourcep=((v3_Vdrainb_sourcep*v3)+(v3*v3_Vdrainb_sourcep))*d10_sqrt0;
    9499                 :          0 : t0_Vbulkp_sourcep=((v3_Vbulkp_sourcep*v3)+(v3*v3_Vbulkp_sourcep))*d10_sqrt0;
    9500                 :          0 : t0_Vsourceb_sourcep=((v3_Vsourceb_sourcep*v3)+(v3*v3_Vsourceb_sourcep))*d10_sqrt0;
    9501                 :            : #endif
    9502                 :          0 : t0=d00_sqrt0;
    9503                 :            : }
    9504                 :            : }
    9505                 :            : #if defined(_DERIVATE)
    9506                 :          0 : vfbeff_Vgatep_sourcep=(-(0.5*(v3_Vgatep_sourcep+t0_Vgatep_sourcep)));
    9507                 :          0 : vfbeff_Vdrainp_sourcep=(-(0.5*(v3_Vdrainp_sourcep+t0_Vdrainp_sourcep)));
    9508                 :          0 : vfbeff_Vdrainb_sourcep=(-(0.5*(v3_Vdrainb_sourcep+t0_Vdrainb_sourcep)));
    9509                 :          0 : vfbeff_Vbulkp_sourcep=(-(0.5*(v3_Vbulkp_sourcep+t0_Vbulkp_sourcep)));
    9510                 :          0 : vfbeff_Vsourceb_sourcep=(-(0.5*(v3_Vsourceb_sourcep+t0_Vsourceb_sourcep)));
    9511                 :            : #endif
    9512                 :          0 : vfbeff=(vfbzb-(0.5*(v3+t0)));
    9513                 :            : #if defined(_DERIVATE)
    9514                 :          0 : voxacc_Vgatep_sourcep=(-vfbeff_Vgatep_sourcep);
    9515                 :          0 : voxacc_Vdrainp_sourcep=(-vfbeff_Vdrainp_sourcep);
    9516                 :          0 : voxacc_Vdrainb_sourcep=(-vfbeff_Vdrainb_sourcep);
    9517                 :          0 : voxacc_Vbulkp_sourcep=(-vfbeff_Vbulkp_sourcep);
    9518                 :          0 : voxacc_Vsourceb_sourcep=(-vfbeff_Vsourceb_sourcep);
    9519                 :            : #endif
    9520                 :          0 : voxacc=(vfbzb-vfbeff);
    9521         [ #  # ]:          0 : if
    9522                 :            : (voxacc<0.0)
    9523                 :            : {
    9524                 :            : #if defined(_DERIVATE)
    9525                 :          0 : voxacc_Vgatep_sourcep=0.0;
    9526                 :          0 : voxacc_Vdrainp_sourcep=0.0;
    9527                 :          0 : voxacc_Vdrainb_sourcep=0.0;
    9528                 :          0 : voxacc_Vbulkp_sourcep=0.0;
    9529                 :          0 : voxacc_Vsourceb_sourcep=0.0;
    9530                 :            : #endif
    9531                 :          0 : voxacc=0.0;
    9532                 :            : }
    9533                 :            : #if defined(_DERIVATE)
    9534                 :          0 : t0_Vgatep_sourcep=0.0;
    9535                 :          0 : t0_Vdrainp_sourcep=0.0;
    9536                 :          0 : t0_Vdrainb_sourcep=0.0;
    9537                 :          0 : t0_Vbulkp_sourcep=0.0;
    9538                 :          0 : t0_Vsourceb_sourcep=0.0;
    9539                 :            : #endif
    9540                 :          0 : t0=(0.5*k1ox);
    9541                 :            : #if defined(_DERIVATE)
    9542                 :          0 : t3_Vgatep_sourcep=((Vgs_eff_Vgatep_sourcep-vfbeff_Vgatep_sourcep)-vgsteff_Vgatep_sourcep);
    9543                 :          0 : t3_Vdrainp_sourcep=(((Vgs_eff_Vdrainp_sourcep-vfbeff_Vdrainp_sourcep)-vbseff_Vdrainp_sourcep)-vgsteff_Vdrainp_sourcep);
    9544                 :          0 : t3_Vdrainb_sourcep=(((Vgs_eff_Vdrainb_sourcep-vfbeff_Vdrainb_sourcep)-vbseff_Vdrainb_sourcep)-vgsteff_Vdrainb_sourcep);
    9545                 :          0 : t3_Vbulkp_sourcep=(((Vgs_eff_Vbulkp_sourcep-vfbeff_Vbulkp_sourcep)-vbseff_Vbulkp_sourcep)-vgsteff_Vbulkp_sourcep);
    9546                 :          0 : t3_Vsourceb_sourcep=(((Vgs_eff_Vsourceb_sourcep-vfbeff_Vsourceb_sourcep)-vbseff_Vsourceb_sourcep)-vgsteff_Vsourceb_sourcep);
    9547                 :            : #endif
    9548                 :          0 : t3=(((Vgs_eff-vfbeff)-vbseff)-vgsteff);
    9549         [ #  # ]:          0 : if
    9550                 :            : (k1ox==0.0)
    9551                 :            : {
    9552                 :            : #if defined(_DERIVATE)
    9553                 :          0 : voxdepinv_Vgatep_sourcep=0.0;
    9554                 :          0 : voxdepinv_Vdrainp_sourcep=0.0;
    9555                 :          0 : voxdepinv_Vdrainb_sourcep=0.0;
    9556                 :          0 : voxdepinv_Vbulkp_sourcep=0.0;
    9557                 :          0 : voxdepinv_Vsourceb_sourcep=0.0;
    9558                 :            : #endif
    9559                 :          0 : voxdepinv=0.0;
    9560                 :            : }
    9561                 :            : else
    9562                 :            : {
    9563         [ #  # ]:          0 : if
    9564                 :            : (t3<0.0)
    9565                 :            : {
    9566                 :            : #if defined(_DERIVATE)
    9567                 :          0 : voxdepinv_Vgatep_sourcep=(-t3_Vgatep_sourcep);
    9568                 :          0 : voxdepinv_Vdrainp_sourcep=(-t3_Vdrainp_sourcep);
    9569                 :          0 : voxdepinv_Vdrainb_sourcep=(-t3_Vdrainb_sourcep);
    9570                 :          0 : voxdepinv_Vbulkp_sourcep=(-t3_Vbulkp_sourcep);
    9571                 :          0 : voxdepinv_Vsourceb_sourcep=(-t3_Vsourceb_sourcep);
    9572                 :            : #endif
    9573                 :          0 : voxdepinv=(-t3);
    9574                 :            : }
    9575                 :            : else
    9576                 :            : {
    9577                 :            : {
    9578                 :          0 : double m00_sqrt(d00_sqrt0,((t0*t0)+t3))
    9579                 :            : #if defined(_DERIVATE)
    9580                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+t3))
    9581                 :            : #endif
    9582                 :            : #if defined(_DERIVATE)
    9583                 :          0 : t1_Vgatep_sourcep=(((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))+t3_Vgatep_sourcep)*d10_sqrt0;
    9584                 :          0 : t1_Vdrainp_sourcep=(((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))+t3_Vdrainp_sourcep)*d10_sqrt0;
    9585                 :          0 : t1_Vdrainb_sourcep=(((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))+t3_Vdrainb_sourcep)*d10_sqrt0;
    9586                 :          0 : t1_Vbulkp_sourcep=(((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))+t3_Vbulkp_sourcep)*d10_sqrt0;
    9587                 :          0 : t1_Vsourceb_sourcep=(((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))+t3_Vsourceb_sourcep)*d10_sqrt0;
    9588                 :            : #endif
    9589                 :          0 : t1=d00_sqrt0;
    9590                 :            : }
    9591                 :            : #if defined(_DERIVATE)
    9592                 :          0 : t2_Vgatep_sourcep=((t0_Vgatep_sourcep*t1-t0*t1_Vgatep_sourcep)/t1/t1);
    9593                 :          0 : t2_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t1-t0*t1_Vdrainp_sourcep)/t1/t1);
    9594                 :          0 : t2_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t1-t0*t1_Vdrainb_sourcep)/t1/t1);
    9595                 :          0 : t2_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t1-t0*t1_Vbulkp_sourcep)/t1/t1);
    9596                 :          0 : t2_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t1-t0*t1_Vsourceb_sourcep)/t1/t1);
    9597                 :            : #endif
    9598                 :          0 : t2=(t0/t1);
    9599                 :            : #if defined(_DERIVATE)
    9600                 :          0 : voxdepinv_Vgatep_sourcep=(k1ox*(t1_Vgatep_sourcep-t0_Vgatep_sourcep));
    9601                 :          0 : voxdepinv_Vdrainp_sourcep=(k1ox*(t1_Vdrainp_sourcep-t0_Vdrainp_sourcep));
    9602                 :          0 : voxdepinv_Vdrainb_sourcep=(k1ox*(t1_Vdrainb_sourcep-t0_Vdrainb_sourcep));
    9603                 :          0 : voxdepinv_Vbulkp_sourcep=(k1ox*(t1_Vbulkp_sourcep-t0_Vbulkp_sourcep));
    9604                 :          0 : voxdepinv_Vsourceb_sourcep=(k1ox*(t1_Vsourceb_sourcep-t0_Vsourceb_sourcep));
    9605                 :            : #endif
    9606                 :          0 : voxdepinv=(k1ox*(t1-t0));
    9607                 :            : }
    9608                 :            : }
    9609                 :            : #if defined(_DERIVATE)
    9610                 :          0 : voxdepinv_Vgatep_sourcep=(voxdepinv_Vgatep_sourcep+vgsteff_Vgatep_sourcep);
    9611                 :          0 : voxdepinv_Vdrainp_sourcep=(voxdepinv_Vdrainp_sourcep+vgsteff_Vdrainp_sourcep);
    9612                 :          0 : voxdepinv_Vdrainb_sourcep=(voxdepinv_Vdrainb_sourcep+vgsteff_Vdrainb_sourcep);
    9613                 :          0 : voxdepinv_Vbulkp_sourcep=(voxdepinv_Vbulkp_sourcep+vgsteff_Vbulkp_sourcep);
    9614                 :          0 : voxdepinv_Vsourceb_sourcep=(voxdepinv_Vsourceb_sourcep+vgsteff_Vsourceb_sourcep);
    9615                 :            : #endif
    9616                 :          0 : voxdepinv=(voxdepinv+vgsteff);
    9617                 :            : }
    9618         [ -  + ]:       7356 : if
    9619                 :            : (igcmod==1.0)
    9620                 :            : {
    9621                 :            : #if defined(_DERIVATE)
    9622                 :          0 : t0_Vgatep_sourcep=0.0;
    9623                 :          0 : t0_Vdrainp_sourcep=0.0;
    9624                 :          0 : t0_Vdrainb_sourcep=0.0;
    9625                 :          0 : t0_Vbulkp_sourcep=0.0;
    9626                 :          0 : t0_Vsourceb_sourcep=0.0;
    9627                 :            : #endif
    9628                 :          0 : t0=(vtm*nigc);
    9629                 :            : #if defined(_DERIVATE)
    9630                 :          0 : vxnvt_Vgatep_sourcep=((Vgs_eff_Vgatep_sourcep*t0-(Vgs_eff-(type*vth0))*t0_Vgatep_sourcep)/t0/t0);
    9631                 :          0 : vxnvt_Vdrainp_sourcep=((Vgs_eff_Vdrainp_sourcep*t0-(Vgs_eff-(type*vth0))*t0_Vdrainp_sourcep)/t0/t0);
    9632                 :          0 : vxnvt_Vdrainb_sourcep=((Vgs_eff_Vdrainb_sourcep*t0-(Vgs_eff-(type*vth0))*t0_Vdrainb_sourcep)/t0/t0);
    9633                 :          0 : vxnvt_Vbulkp_sourcep=((Vgs_eff_Vbulkp_sourcep*t0-(Vgs_eff-(type*vth0))*t0_Vbulkp_sourcep)/t0/t0);
    9634                 :          0 : vxnvt_Vsourceb_sourcep=((Vgs_eff_Vsourceb_sourcep*t0-(Vgs_eff-(type*vth0))*t0_Vsourceb_sourcep)/t0/t0);
    9635                 :            : #endif
    9636                 :          0 : vxnvt=((Vgs_eff-(type*vth0))/t0);
    9637         [ #  # ]:          0 : if
    9638                 :            : (vxnvt>34.0)
    9639                 :            : {
    9640                 :            : #if defined(_DERIVATE)
    9641                 :          0 : vaux_Vgatep_sourcep=Vgs_eff_Vgatep_sourcep;
    9642                 :          0 : vaux_Vdrainp_sourcep=Vgs_eff_Vdrainp_sourcep;
    9643                 :          0 : vaux_Vdrainb_sourcep=Vgs_eff_Vdrainb_sourcep;
    9644                 :          0 : vaux_Vbulkp_sourcep=Vgs_eff_Vbulkp_sourcep;
    9645                 :          0 : vaux_Vsourceb_sourcep=Vgs_eff_Vsourceb_sourcep;
    9646                 :            : #endif
    9647                 :          0 : vaux=(Vgs_eff-(type*vth0));
    9648                 :            : }
    9649                 :            : else
    9650                 :            : {
    9651         [ #  # ]:          0 : if
    9652                 :            : (vxnvt<(-34.0))
    9653                 :            : {
    9654                 :            : {
    9655                 :          0 : double m00_logE(d00_logE0,(1.0+1.713908431e-15))
    9656                 :            : #if defined(_DERIVATE)
    9657                 :          0 : vaux_Vgatep_sourcep=t0_Vgatep_sourcep*d00_logE0;
    9658                 :          0 : vaux_Vdrainp_sourcep=t0_Vdrainp_sourcep*d00_logE0;
    9659                 :          0 : vaux_Vdrainb_sourcep=t0_Vdrainb_sourcep*d00_logE0;
    9660                 :          0 : vaux_Vbulkp_sourcep=t0_Vbulkp_sourcep*d00_logE0;
    9661                 :          0 : vaux_Vsourceb_sourcep=t0_Vsourceb_sourcep*d00_logE0;
    9662                 :            : #endif
    9663                 :          0 : vaux=(t0*d00_logE0);
    9664                 :            : }
    9665                 :            : }
    9666                 :            : else
    9667                 :            : {
    9668                 :            : {
    9669                 :          0 : double m00_exp(d00_exp0,vxnvt)
    9670                 :            : #if defined(_DERIVATE)
    9671                 :            : #define d10_exp0 d00_exp0
    9672                 :            : #endif
    9673                 :            : #if defined(_DERIVATE)
    9674                 :          0 : expvxnvt_Vgatep_sourcep=vxnvt_Vgatep_sourcep*d10_exp0;
    9675                 :          0 : expvxnvt_Vdrainp_sourcep=vxnvt_Vdrainp_sourcep*d10_exp0;
    9676                 :          0 : expvxnvt_Vdrainb_sourcep=vxnvt_Vdrainb_sourcep*d10_exp0;
    9677                 :          0 : expvxnvt_Vbulkp_sourcep=vxnvt_Vbulkp_sourcep*d10_exp0;
    9678                 :          0 : expvxnvt_Vsourceb_sourcep=vxnvt_Vsourceb_sourcep*d10_exp0;
    9679                 :            : #endif
    9680                 :          0 : expvxnvt=d00_exp0;
    9681                 :            : }
    9682                 :            : {
    9683                 :          0 : double m00_logE(d00_logE0,(1.0+expvxnvt))
    9684                 :            : #if defined(_DERIVATE)
    9685                 :          0 : double m10_logE(d10_logE0,d00_logE0,(1.0+expvxnvt))
    9686                 :            : #endif
    9687                 :            : #if defined(_DERIVATE)
    9688                 :          0 : vaux_Vgatep_sourcep=((t0_Vgatep_sourcep*d00_logE0)+(t0*expvxnvt_Vgatep_sourcep*d10_logE0));
    9689                 :          0 : vaux_Vdrainp_sourcep=((t0_Vdrainp_sourcep*d00_logE0)+(t0*expvxnvt_Vdrainp_sourcep*d10_logE0));
    9690                 :          0 : vaux_Vdrainb_sourcep=((t0_Vdrainb_sourcep*d00_logE0)+(t0*expvxnvt_Vdrainb_sourcep*d10_logE0));
    9691                 :          0 : vaux_Vbulkp_sourcep=((t0_Vbulkp_sourcep*d00_logE0)+(t0*expvxnvt_Vbulkp_sourcep*d10_logE0));
    9692                 :          0 : vaux_Vsourceb_sourcep=((t0_Vsourceb_sourcep*d00_logE0)+(t0*expvxnvt_Vsourceb_sourcep*d10_logE0));
    9693                 :            : #endif
    9694                 :          0 : vaux=(t0*d00_logE0);
    9695                 :            : }
    9696                 :            : }
    9697                 :            : }
    9698                 :            : #if defined(_DERIVATE)
    9699                 :          0 : t2_Vgatep_sourcep=((Vgs_eff_Vgatep_sourcep*vaux)+(Vgs_eff*vaux_Vgatep_sourcep));
    9700                 :          0 : t2_Vdrainp_sourcep=((Vgs_eff_Vdrainp_sourcep*vaux)+(Vgs_eff*vaux_Vdrainp_sourcep));
    9701                 :          0 : t2_Vdrainb_sourcep=((Vgs_eff_Vdrainb_sourcep*vaux)+(Vgs_eff*vaux_Vdrainb_sourcep));
    9702                 :          0 : t2_Vbulkp_sourcep=((Vgs_eff_Vbulkp_sourcep*vaux)+(Vgs_eff*vaux_Vbulkp_sourcep));
    9703                 :          0 : t2_Vsourceb_sourcep=((Vgs_eff_Vsourceb_sourcep*vaux)+(Vgs_eff*vaux_Vsourceb_sourcep));
    9704                 :            : #endif
    9705                 :          0 : t2=(Vgs_eff*vaux);
    9706                 :            : #if defined(_DERIVATE)
    9707                 :          0 : t11_Vgatep_sourcep=0.0;
    9708                 :          0 : t11_Vdrainp_sourcep=0.0;
    9709                 :          0 : t11_Vdrainb_sourcep=0.0;
    9710                 :          0 : t11_Vbulkp_sourcep=0.0;
    9711                 :          0 : t11_Vsourceb_sourcep=0.0;
    9712                 :            : #endif
    9713                 :          0 : t11=aechvb;
    9714                 :            : #if defined(_DERIVATE)
    9715                 :          0 : t12_Vgatep_sourcep=0.0;
    9716                 :          0 : t12_Vdrainp_sourcep=0.0;
    9717                 :          0 : t12_Vdrainb_sourcep=0.0;
    9718                 :          0 : t12_Vbulkp_sourcep=0.0;
    9719                 :          0 : t12_Vsourceb_sourcep=0.0;
    9720                 :            : #endif
    9721                 :          0 : t12=bechvb;
    9722                 :            : #if defined(_DERIVATE)
    9723                 :          0 : t3_Vgatep_sourcep=0.0;
    9724                 :          0 : t3_Vdrainp_sourcep=0.0;
    9725                 :          0 : t3_Vdrainb_sourcep=0.0;
    9726                 :          0 : t3_Vbulkp_sourcep=0.0;
    9727                 :          0 : t3_Vsourceb_sourcep=0.0;
    9728                 :            : #endif
    9729                 :          0 : t3=((aigc*cigc)-bigc);
    9730                 :            : #if defined(_DERIVATE)
    9731                 :          0 : t4_Vgatep_sourcep=0.0;
    9732                 :          0 : t4_Vdrainp_sourcep=0.0;
    9733                 :          0 : t4_Vdrainb_sourcep=0.0;
    9734                 :          0 : t4_Vbulkp_sourcep=0.0;
    9735                 :          0 : t4_Vsourceb_sourcep=0.0;
    9736                 :            : #endif
    9737                 :          0 : t4=(bigc*cigc);
    9738                 :            : #if defined(_DERIVATE)
    9739                 :          0 : t5_Vgatep_sourcep=((t12_Vgatep_sourcep*((aigc+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)))+(t12*(((t3_Vgatep_sourcep*voxdepinv)+(t3*voxdepinv_Vgatep_sourcep))-((((t4_Vgatep_sourcep*voxdepinv)+(t4*voxdepinv_Vgatep_sourcep))*voxdepinv)+((t4*voxdepinv)*voxdepinv_Vgatep_sourcep)))));
    9740                 :          0 : t5_Vdrainp_sourcep=((t12_Vdrainp_sourcep*((aigc+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)))+(t12*(((t3_Vdrainp_sourcep*voxdepinv)+(t3*voxdepinv_Vdrainp_sourcep))-((((t4_Vdrainp_sourcep*voxdepinv)+(t4*voxdepinv_Vdrainp_sourcep))*voxdepinv)+((t4*voxdepinv)*voxdepinv_Vdrainp_sourcep)))));
    9741                 :          0 : t5_Vdrainb_sourcep=((t12_Vdrainb_sourcep*((aigc+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)))+(t12*(((t3_Vdrainb_sourcep*voxdepinv)+(t3*voxdepinv_Vdrainb_sourcep))-((((t4_Vdrainb_sourcep*voxdepinv)+(t4*voxdepinv_Vdrainb_sourcep))*voxdepinv)+((t4*voxdepinv)*voxdepinv_Vdrainb_sourcep)))));
    9742                 :          0 : t5_Vbulkp_sourcep=((t12_Vbulkp_sourcep*((aigc+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)))+(t12*(((t3_Vbulkp_sourcep*voxdepinv)+(t3*voxdepinv_Vbulkp_sourcep))-((((t4_Vbulkp_sourcep*voxdepinv)+(t4*voxdepinv_Vbulkp_sourcep))*voxdepinv)+((t4*voxdepinv)*voxdepinv_Vbulkp_sourcep)))));
    9743                 :          0 : t5_Vsourceb_sourcep=((t12_Vsourceb_sourcep*((aigc+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)))+(t12*(((t3_Vsourceb_sourcep*voxdepinv)+(t3*voxdepinv_Vsourceb_sourcep))-((((t4_Vsourceb_sourcep*voxdepinv)+(t4*voxdepinv_Vsourceb_sourcep))*voxdepinv)+((t4*voxdepinv)*voxdepinv_Vsourceb_sourcep)))));
    9744                 :            : #endif
    9745                 :          0 : t5=(t12*((aigc+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)));
    9746         [ #  # ]:          0 : if
    9747                 :            : (t5>34.0)
    9748                 :            : {
    9749                 :            : #if defined(_DERIVATE)
    9750                 :          0 : t6_Vgatep_sourcep=0.0;
    9751                 :          0 : t6_Vdrainp_sourcep=0.0;
    9752                 :          0 : t6_Vdrainb_sourcep=0.0;
    9753                 :          0 : t6_Vbulkp_sourcep=0.0;
    9754                 :          0 : t6_Vsourceb_sourcep=0.0;
    9755                 :            : #endif
    9756                 :          0 : t6=5.834617425e14;
    9757                 :            : }
    9758                 :            : else
    9759                 :            : {
    9760         [ #  # ]:          0 : if
    9761                 :            : (t5<(-34.0))
    9762                 :            : {
    9763                 :            : #if defined(_DERIVATE)
    9764                 :          0 : t6_Vgatep_sourcep=0.0;
    9765                 :          0 : t6_Vdrainp_sourcep=0.0;
    9766                 :          0 : t6_Vdrainb_sourcep=0.0;
    9767                 :          0 : t6_Vbulkp_sourcep=0.0;
    9768                 :          0 : t6_Vsourceb_sourcep=0.0;
    9769                 :            : #endif
    9770                 :          0 : t6=1.713908431e-15;
    9771                 :            : }
    9772                 :            : else
    9773                 :            : {
    9774                 :            : {
    9775                 :          0 : double m00_exp(d00_exp0,t5)
    9776                 :            : #if defined(_DERIVATE)
    9777                 :            : #define d10_exp0 d00_exp0
    9778                 :            : #endif
    9779                 :            : #if defined(_DERIVATE)
    9780                 :          0 : t6_Vgatep_sourcep=t5_Vgatep_sourcep*d10_exp0;
    9781                 :          0 : t6_Vdrainp_sourcep=t5_Vdrainp_sourcep*d10_exp0;
    9782                 :          0 : t6_Vdrainb_sourcep=t5_Vdrainb_sourcep*d10_exp0;
    9783                 :          0 : t6_Vbulkp_sourcep=t5_Vbulkp_sourcep*d10_exp0;
    9784                 :          0 : t6_Vsourceb_sourcep=t5_Vsourceb_sourcep*d10_exp0;
    9785                 :            : #endif
    9786                 :          0 : t6=d00_exp0;
    9787                 :            : }
    9788                 :            : }
    9789                 :            : }
    9790                 :            : #if defined(_DERIVATE)
    9791                 :          0 : igc_Vgatep_sourcep=((((t11_Vgatep_sourcep*t2)+(t11*t2_Vgatep_sourcep))*t6)+((t11*t2)*t6_Vgatep_sourcep));
    9792                 :          0 : igc_Vdrainp_sourcep=((((t11_Vdrainp_sourcep*t2)+(t11*t2_Vdrainp_sourcep))*t6)+((t11*t2)*t6_Vdrainp_sourcep));
    9793                 :          0 : igc_Vdrainb_sourcep=((((t11_Vdrainb_sourcep*t2)+(t11*t2_Vdrainb_sourcep))*t6)+((t11*t2)*t6_Vdrainb_sourcep));
    9794                 :          0 : igc_Vbulkp_sourcep=((((t11_Vbulkp_sourcep*t2)+(t11*t2_Vbulkp_sourcep))*t6)+((t11*t2)*t6_Vbulkp_sourcep));
    9795                 :          0 : igc_Vsourceb_sourcep=((((t11_Vsourceb_sourcep*t2)+(t11*t2_Vsourceb_sourcep))*t6)+((t11*t2)*t6_Vsourceb_sourcep));
    9796                 :            : #endif
    9797                 :          0 : igc=((t11*t2)*t6);
    9798         [ #  # ]:          0 : if
    9799                 :            : (pigcd!=(-99.0))
    9800                 :            : {
    9801                 :            : #if defined(_DERIVATE)
    9802                 :          0 : modif_pigcd_Vgatep_sourcep=0.0;
    9803                 :          0 : modif_pigcd_Vdrainp_sourcep=0.0;
    9804                 :          0 : modif_pigcd_Vdrainb_sourcep=0.0;
    9805                 :          0 : modif_pigcd_Vbulkp_sourcep=0.0;
    9806                 :          0 : modif_pigcd_Vsourceb_sourcep=0.0;
    9807                 :            : #endif
    9808                 :          0 : modif_pigcd=pigcd;
    9809                 :            : }
    9810                 :            : else
    9811                 :            : {
    9812                 :            : #if defined(_DERIVATE)
    9813                 :          0 : t11_Vgatep_sourcep=0.0;
    9814                 :          0 : t11_Vdrainp_sourcep=0.0;
    9815                 :          0 : t11_Vdrainb_sourcep=0.0;
    9816                 :          0 : t11_Vbulkp_sourcep=0.0;
    9817                 :          0 : t11_Vsourceb_sourcep=0.0;
    9818                 :            : #endif
    9819                 :          0 : t11=(bechvb*toxe);
    9820                 :            : #if defined(_DERIVATE)
    9821                 :          0 : t12_Vgatep_sourcep=vgsteff_Vgatep_sourcep;
    9822                 :          0 : t12_Vdrainp_sourcep=vgsteff_Vdrainp_sourcep;
    9823                 :          0 : t12_Vdrainb_sourcep=vgsteff_Vdrainb_sourcep;
    9824                 :          0 : t12_Vbulkp_sourcep=vgsteff_Vbulkp_sourcep;
    9825                 :          0 : t12_Vsourceb_sourcep=vgsteff_Vsourceb_sourcep;
    9826                 :            : #endif
    9827                 :          0 : t12=(vgsteff+1.0e-20);
    9828                 :            : #if defined(_DERIVATE)
    9829                 :          0 : t13_Vgatep_sourcep=((((t11_Vgatep_sourcep*t12-t11*t12_Vgatep_sourcep)/t12/t12)*t12-(t11/t12)*t12_Vgatep_sourcep)/t12/t12);
    9830                 :          0 : t13_Vdrainp_sourcep=((((t11_Vdrainp_sourcep*t12-t11*t12_Vdrainp_sourcep)/t12/t12)*t12-(t11/t12)*t12_Vdrainp_sourcep)/t12/t12);
    9831                 :          0 : t13_Vdrainb_sourcep=((((t11_Vdrainb_sourcep*t12-t11*t12_Vdrainb_sourcep)/t12/t12)*t12-(t11/t12)*t12_Vdrainb_sourcep)/t12/t12);
    9832                 :          0 : t13_Vbulkp_sourcep=((((t11_Vbulkp_sourcep*t12-t11*t12_Vbulkp_sourcep)/t12/t12)*t12-(t11/t12)*t12_Vbulkp_sourcep)/t12/t12);
    9833                 :          0 : t13_Vsourceb_sourcep=((((t11_Vsourceb_sourcep*t12-t11*t12_Vsourceb_sourcep)/t12/t12)*t12-(t11/t12)*t12_Vsourceb_sourcep)/t12/t12);
    9834                 :            : #endif
    9835                 :          0 : t13=((t11/t12)/t12);
    9836                 :            : #if defined(_DERIVATE)
    9837                 :          0 : modif_pigcd_Vgatep_sourcep=((t13_Vgatep_sourcep*(1.0-((0.5*vdseff)/t12)))+(t13*(-(((0.5*vdseff_Vgatep_sourcep)*t12-(0.5*vdseff)*t12_Vgatep_sourcep)/t12/t12))));
    9838                 :          0 : modif_pigcd_Vdrainp_sourcep=((t13_Vdrainp_sourcep*(1.0-((0.5*vdseff)/t12)))+(t13*(-(((0.5*vdseff_Vdrainp_sourcep)*t12-(0.5*vdseff)*t12_Vdrainp_sourcep)/t12/t12))));
    9839                 :          0 : modif_pigcd_Vdrainb_sourcep=((t13_Vdrainb_sourcep*(1.0-((0.5*vdseff)/t12)))+(t13*(-(((0.5*vdseff_Vdrainb_sourcep)*t12-(0.5*vdseff)*t12_Vdrainb_sourcep)/t12/t12))));
    9840                 :          0 : modif_pigcd_Vbulkp_sourcep=((t13_Vbulkp_sourcep*(1.0-((0.5*vdseff)/t12)))+(t13*(-(((0.5*vdseff_Vbulkp_sourcep)*t12-(0.5*vdseff)*t12_Vbulkp_sourcep)/t12/t12))));
    9841                 :          0 : modif_pigcd_Vsourceb_sourcep=((t13_Vsourceb_sourcep*(1.0-((0.5*vdseff)/t12)))+(t13*(-(((0.5*vdseff_Vsourceb_sourcep)*t12-(0.5*vdseff)*t12_Vsourceb_sourcep)/t12/t12))));
    9842                 :            : #endif
    9843                 :          0 : modif_pigcd=(t13*(1.0-((0.5*vdseff)/t12)));
    9844                 :            : }
    9845                 :            : #if defined(_DERIVATE)
    9846                 :          0 : t7_Vgatep_sourcep=(((-modif_pigcd_Vgatep_sourcep)*vdseff)+((-modif_pigcd)*vdseff_Vgatep_sourcep));
    9847                 :          0 : t7_Vdrainp_sourcep=(((-modif_pigcd_Vdrainp_sourcep)*vdseff)+((-modif_pigcd)*vdseff_Vdrainp_sourcep));
    9848                 :          0 : t7_Vdrainb_sourcep=(((-modif_pigcd_Vdrainb_sourcep)*vdseff)+((-modif_pigcd)*vdseff_Vdrainb_sourcep));
    9849                 :          0 : t7_Vbulkp_sourcep=(((-modif_pigcd_Vbulkp_sourcep)*vdseff)+((-modif_pigcd)*vdseff_Vbulkp_sourcep));
    9850                 :          0 : t7_Vsourceb_sourcep=(((-modif_pigcd_Vsourceb_sourcep)*vdseff)+((-modif_pigcd)*vdseff_Vsourceb_sourcep));
    9851                 :            : #endif
    9852                 :          0 : t7=((-modif_pigcd)*vdseff);
    9853                 :            : #if defined(_DERIVATE)
    9854                 :          0 : t8_Vgatep_sourcep=((t7_Vgatep_sourcep*t7)+(t7*t7_Vgatep_sourcep));
    9855                 :          0 : t8_Vdrainp_sourcep=((t7_Vdrainp_sourcep*t7)+(t7*t7_Vdrainp_sourcep));
    9856                 :          0 : t8_Vdrainb_sourcep=((t7_Vdrainb_sourcep*t7)+(t7*t7_Vdrainb_sourcep));
    9857                 :          0 : t8_Vbulkp_sourcep=((t7_Vbulkp_sourcep*t7)+(t7*t7_Vbulkp_sourcep));
    9858                 :          0 : t8_Vsourceb_sourcep=((t7_Vsourceb_sourcep*t7)+(t7*t7_Vsourceb_sourcep));
    9859                 :            : #endif
    9860                 :          0 : t8=((t7*t7)+2.0e-4);
    9861         [ #  # ]:          0 : if
    9862                 :            : (t7>34.0)
    9863                 :            : {
    9864                 :            : #if defined(_DERIVATE)
    9865                 :          0 : t9_Vgatep_sourcep=0.0;
    9866                 :          0 : t9_Vdrainp_sourcep=0.0;
    9867                 :          0 : t9_Vdrainb_sourcep=0.0;
    9868                 :          0 : t9_Vbulkp_sourcep=0.0;
    9869                 :          0 : t9_Vsourceb_sourcep=0.0;
    9870                 :            : #endif
    9871                 :          0 : t9=5.834617425e14;
    9872                 :            : }
    9873                 :            : else
    9874                 :            : {
    9875         [ #  # ]:          0 : if
    9876                 :            : (t7<(-34.0))
    9877                 :            : {
    9878                 :            : #if defined(_DERIVATE)
    9879                 :          0 : t9_Vgatep_sourcep=0.0;
    9880                 :          0 : t9_Vdrainp_sourcep=0.0;
    9881                 :          0 : t9_Vdrainb_sourcep=0.0;
    9882                 :          0 : t9_Vbulkp_sourcep=0.0;
    9883                 :          0 : t9_Vsourceb_sourcep=0.0;
    9884                 :            : #endif
    9885                 :          0 : t9=1.713908431e-15;
    9886                 :            : }
    9887                 :            : else
    9888                 :            : {
    9889                 :            : {
    9890                 :          0 : double m00_exp(d00_exp0,t7)
    9891                 :            : #if defined(_DERIVATE)
    9892                 :            : #define d10_exp0 d00_exp0
    9893                 :            : #endif
    9894                 :            : #if defined(_DERIVATE)
    9895                 :          0 : t9_Vgatep_sourcep=t7_Vgatep_sourcep*d10_exp0;
    9896                 :          0 : t9_Vdrainp_sourcep=t7_Vdrainp_sourcep*d10_exp0;
    9897                 :          0 : t9_Vdrainb_sourcep=t7_Vdrainb_sourcep*d10_exp0;
    9898                 :          0 : t9_Vbulkp_sourcep=t7_Vbulkp_sourcep*d10_exp0;
    9899                 :          0 : t9_Vsourceb_sourcep=t7_Vsourceb_sourcep*d10_exp0;
    9900                 :            : #endif
    9901                 :          0 : t9=d00_exp0;
    9902                 :            : }
    9903                 :            : }
    9904                 :            : }
    9905                 :            : #if defined(_DERIVATE)
    9906                 :          0 : t0_Vgatep_sourcep=((t8_Vgatep_sourcep*t8)+(t8*t8_Vgatep_sourcep));
    9907                 :          0 : t0_Vdrainp_sourcep=((t8_Vdrainp_sourcep*t8)+(t8*t8_Vdrainp_sourcep));
    9908                 :          0 : t0_Vdrainb_sourcep=((t8_Vdrainb_sourcep*t8)+(t8*t8_Vdrainb_sourcep));
    9909                 :          0 : t0_Vbulkp_sourcep=((t8_Vbulkp_sourcep*t8)+(t8*t8_Vbulkp_sourcep));
    9910                 :          0 : t0_Vsourceb_sourcep=((t8_Vsourceb_sourcep*t8)+(t8*t8_Vsourceb_sourcep));
    9911                 :            : #endif
    9912                 :          0 : t0=(t8*t8);
    9913                 :            : #if defined(_DERIVATE)
    9914                 :          0 : t1_Vgatep_sourcep=t9_Vgatep_sourcep;
    9915                 :          0 : t1_Vdrainp_sourcep=t9_Vdrainp_sourcep;
    9916                 :          0 : t1_Vdrainb_sourcep=t9_Vdrainb_sourcep;
    9917                 :          0 : t1_Vbulkp_sourcep=t9_Vbulkp_sourcep;
    9918                 :          0 : t1_Vsourceb_sourcep=t9_Vsourceb_sourcep;
    9919                 :            : #endif
    9920                 :          0 : t1=((t9-1.0)+1.0e-4);
    9921                 :            : #if defined(_DERIVATE)
    9922                 :          0 : t10_Vgatep_sourcep=(((t1_Vgatep_sourcep-t7_Vgatep_sourcep)*t8-(t1-t7)*t8_Vgatep_sourcep)/t8/t8);
    9923                 :          0 : t10_Vdrainp_sourcep=(((t1_Vdrainp_sourcep-t7_Vdrainp_sourcep)*t8-(t1-t7)*t8_Vdrainp_sourcep)/t8/t8);
    9924                 :          0 : t10_Vdrainb_sourcep=(((t1_Vdrainb_sourcep-t7_Vdrainb_sourcep)*t8-(t1-t7)*t8_Vdrainb_sourcep)/t8/t8);
    9925                 :          0 : t10_Vbulkp_sourcep=(((t1_Vbulkp_sourcep-t7_Vbulkp_sourcep)*t8-(t1-t7)*t8_Vbulkp_sourcep)/t8/t8);
    9926                 :          0 : t10_Vsourceb_sourcep=(((t1_Vsourceb_sourcep-t7_Vsourceb_sourcep)*t8-(t1-t7)*t8_Vsourceb_sourcep)/t8/t8);
    9927                 :            : #endif
    9928                 :          0 : t10=((t1-t7)/t8);
    9929                 :            : #if defined(_DERIVATE)
    9930                 :          0 : igcs_Vgatep_sourcep=((igc_Vgatep_sourcep*t10)+(igc*t10_Vgatep_sourcep));
    9931                 :          0 : igcs_Vdrainp_sourcep=((igc_Vdrainp_sourcep*t10)+(igc*t10_Vdrainp_sourcep));
    9932                 :          0 : igcs_Vdrainb_sourcep=((igc_Vdrainb_sourcep*t10)+(igc*t10_Vdrainb_sourcep));
    9933                 :          0 : igcs_Vbulkp_sourcep=((igc_Vbulkp_sourcep*t10)+(igc*t10_Vbulkp_sourcep));
    9934                 :          0 : igcs_Vsourceb_sourcep=((igc_Vsourceb_sourcep*t10)+(igc*t10_Vsourceb_sourcep));
    9935                 :            : #endif
    9936                 :          0 : igcs=(igc*t10);
    9937                 :            : #if defined(_DERIVATE)
    9938                 :          0 : t10_Vgatep_sourcep=(((((t7_Vgatep_sourcep*t9)+(t7*t9_Vgatep_sourcep))-t1_Vgatep_sourcep)*t8-((t7*t9)-t1)*t8_Vgatep_sourcep)/t8/t8);
    9939                 :          0 : t10_Vdrainp_sourcep=(((((t7_Vdrainp_sourcep*t9)+(t7*t9_Vdrainp_sourcep))-t1_Vdrainp_sourcep)*t8-((t7*t9)-t1)*t8_Vdrainp_sourcep)/t8/t8);
    9940                 :          0 : t10_Vdrainb_sourcep=(((((t7_Vdrainb_sourcep*t9)+(t7*t9_Vdrainb_sourcep))-t1_Vdrainb_sourcep)*t8-((t7*t9)-t1)*t8_Vdrainb_sourcep)/t8/t8);
    9941                 :          0 : t10_Vbulkp_sourcep=(((((t7_Vbulkp_sourcep*t9)+(t7*t9_Vbulkp_sourcep))-t1_Vbulkp_sourcep)*t8-((t7*t9)-t1)*t8_Vbulkp_sourcep)/t8/t8);
    9942                 :          0 : t10_Vsourceb_sourcep=(((((t7_Vsourceb_sourcep*t9)+(t7*t9_Vsourceb_sourcep))-t1_Vsourceb_sourcep)*t8-((t7*t9)-t1)*t8_Vsourceb_sourcep)/t8/t8);
    9943                 :            : #endif
    9944                 :          0 : t10=(((t7*t9)-t1)/t8);
    9945                 :            : #if defined(_DERIVATE)
    9946                 :          0 : igcd_Vgatep_sourcep=((igc_Vgatep_sourcep*t10)+(igc*t10_Vgatep_sourcep));
    9947                 :          0 : igcd_Vdrainp_sourcep=((igc_Vdrainp_sourcep*t10)+(igc*t10_Vdrainp_sourcep));
    9948                 :          0 : igcd_Vdrainb_sourcep=((igc_Vdrainb_sourcep*t10)+(igc*t10_Vdrainb_sourcep));
    9949                 :          0 : igcd_Vbulkp_sourcep=((igc_Vbulkp_sourcep*t10)+(igc*t10_Vbulkp_sourcep));
    9950                 :          0 : igcd_Vsourceb_sourcep=((igc_Vsourceb_sourcep*t10)+(igc*t10_Vsourceb_sourcep));
    9951                 :            : #endif
    9952                 :          0 : igcd=(igc*t10);
    9953                 :            : #if defined(_DERIVATE)
    9954                 :          0 : t0_Vgatep_sourcep=vgs_Vgatep_sourcep;
    9955                 :          0 : t0_Vdrainp_sourcep=0.0;
    9956                 :          0 : t0_Vdrainb_sourcep=0.0;
    9957                 :          0 : t0_Vbulkp_sourcep=0.0;
    9958                 :          0 : t0_Vsourceb_sourcep=0.0;
    9959                 :            : #endif
    9960                 :          0 : t0=(vgs-vfbsd);
    9961                 :            : {
    9962                 :          0 : double m00_sqrt(d00_sqrt0,((t0*t0)+1.0e-4))
    9963                 :            : #if defined(_DERIVATE)
    9964                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+1.0e-4))
    9965                 :            : #endif
    9966                 :            : #if defined(_DERIVATE)
    9967                 :          0 : vgs_eff_Vgatep_sourcep=((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))*d10_sqrt0;
    9968                 :          0 : vgs_eff_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))*d10_sqrt0;
    9969                 :          0 : vgs_eff_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))*d10_sqrt0;
    9970                 :          0 : vgs_eff_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))*d10_sqrt0;
    9971                 :          0 : vgs_eff_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))*d10_sqrt0;
    9972                 :            : #endif
    9973                 :          0 : vgs_eff=d00_sqrt0;
    9974                 :            : }
    9975                 :            : #if defined(_DERIVATE)
    9976                 :          0 : t2_Vgatep_sourcep=((vgs_Vgatep_sourcep*vgs_eff)+(vgs*vgs_eff_Vgatep_sourcep));
    9977                 :          0 : t2_Vdrainp_sourcep=(vgs*vgs_eff_Vdrainp_sourcep);
    9978                 :          0 : t2_Vdrainb_sourcep=(vgs*vgs_eff_Vdrainb_sourcep);
    9979                 :          0 : t2_Vbulkp_sourcep=(vgs*vgs_eff_Vbulkp_sourcep);
    9980                 :          0 : t2_Vsourceb_sourcep=(vgs*vgs_eff_Vsourceb_sourcep);
    9981                 :            : #endif
    9982                 :          0 : t2=(vgs*vgs_eff);
    9983                 :            : #if defined(_DERIVATE)
    9984                 :          0 : t11_Vgatep_sourcep=0.0;
    9985                 :          0 : t11_Vdrainp_sourcep=0.0;
    9986                 :          0 : t11_Vdrainb_sourcep=0.0;
    9987                 :          0 : t11_Vbulkp_sourcep=0.0;
    9988                 :          0 : t11_Vsourceb_sourcep=0.0;
    9989                 :            : #endif
    9990                 :          0 : t11=aechvbedge;
    9991                 :            : #if defined(_DERIVATE)
    9992                 :          0 : t12_Vgatep_sourcep=0.0;
    9993                 :          0 : t12_Vdrainp_sourcep=0.0;
    9994                 :          0 : t12_Vdrainb_sourcep=0.0;
    9995                 :          0 : t12_Vbulkp_sourcep=0.0;
    9996                 :          0 : t12_Vsourceb_sourcep=0.0;
    9997                 :            : #endif
    9998                 :          0 : t12=bechvbedge;
    9999                 :            : #if defined(_DERIVATE)
   10000                 :          0 : t3_Vgatep_sourcep=0.0;
   10001                 :          0 : t3_Vdrainp_sourcep=0.0;
   10002                 :          0 : t3_Vdrainb_sourcep=0.0;
   10003                 :          0 : t3_Vbulkp_sourcep=0.0;
   10004                 :          0 : t3_Vsourceb_sourcep=0.0;
   10005                 :            : #endif
   10006                 :          0 : t3=((aigsd*cigsd)-bigsd);
   10007                 :            : #if defined(_DERIVATE)
   10008                 :          0 : t4_Vgatep_sourcep=0.0;
   10009                 :          0 : t4_Vdrainp_sourcep=0.0;
   10010                 :          0 : t4_Vdrainb_sourcep=0.0;
   10011                 :          0 : t4_Vbulkp_sourcep=0.0;
   10012                 :          0 : t4_Vsourceb_sourcep=0.0;
   10013                 :            : #endif
   10014                 :          0 : t4=(bigsd*cigsd);
   10015                 :            : #if defined(_DERIVATE)
   10016                 :          0 : t5_Vgatep_sourcep=((t12_Vgatep_sourcep*((aigsd+(t3*vgs_eff))-((t4*vgs_eff)*vgs_eff)))+(t12*(((t3_Vgatep_sourcep*vgs_eff)+(t3*vgs_eff_Vgatep_sourcep))-((((t4_Vgatep_sourcep*vgs_eff)+(t4*vgs_eff_Vgatep_sourcep))*vgs_eff)+((t4*vgs_eff)*vgs_eff_Vgatep_sourcep)))));
   10017                 :          0 : t5_Vdrainp_sourcep=((t12_Vdrainp_sourcep*((aigsd+(t3*vgs_eff))-((t4*vgs_eff)*vgs_eff)))+(t12*(((t3_Vdrainp_sourcep*vgs_eff)+(t3*vgs_eff_Vdrainp_sourcep))-((((t4_Vdrainp_sourcep*vgs_eff)+(t4*vgs_eff_Vdrainp_sourcep))*vgs_eff)+((t4*vgs_eff)*vgs_eff_Vdrainp_sourcep)))));
   10018                 :          0 : t5_Vdrainb_sourcep=((t12_Vdrainb_sourcep*((aigsd+(t3*vgs_eff))-((t4*vgs_eff)*vgs_eff)))+(t12*(((t3_Vdrainb_sourcep*vgs_eff)+(t3*vgs_eff_Vdrainb_sourcep))-((((t4_Vdrainb_sourcep*vgs_eff)+(t4*vgs_eff_Vdrainb_sourcep))*vgs_eff)+((t4*vgs_eff)*vgs_eff_Vdrainb_sourcep)))));
   10019                 :          0 : t5_Vbulkp_sourcep=((t12_Vbulkp_sourcep*((aigsd+(t3*vgs_eff))-((t4*vgs_eff)*vgs_eff)))+(t12*(((t3_Vbulkp_sourcep*vgs_eff)+(t3*vgs_eff_Vbulkp_sourcep))-((((t4_Vbulkp_sourcep*vgs_eff)+(t4*vgs_eff_Vbulkp_sourcep))*vgs_eff)+((t4*vgs_eff)*vgs_eff_Vbulkp_sourcep)))));
   10020                 :          0 : t5_Vsourceb_sourcep=((t12_Vsourceb_sourcep*((aigsd+(t3*vgs_eff))-((t4*vgs_eff)*vgs_eff)))+(t12*(((t3_Vsourceb_sourcep*vgs_eff)+(t3*vgs_eff_Vsourceb_sourcep))-((((t4_Vsourceb_sourcep*vgs_eff)+(t4*vgs_eff_Vsourceb_sourcep))*vgs_eff)+((t4*vgs_eff)*vgs_eff_Vsourceb_sourcep)))));
   10021                 :            : #endif
   10022                 :          0 : t5=(t12*((aigsd+(t3*vgs_eff))-((t4*vgs_eff)*vgs_eff)));
   10023         [ #  # ]:          0 : if
   10024                 :            : (t5>34.0)
   10025                 :            : {
   10026                 :            : #if defined(_DERIVATE)
   10027                 :          0 : t6_Vgatep_sourcep=0.0;
   10028                 :          0 : t6_Vdrainp_sourcep=0.0;
   10029                 :          0 : t6_Vdrainb_sourcep=0.0;
   10030                 :          0 : t6_Vbulkp_sourcep=0.0;
   10031                 :          0 : t6_Vsourceb_sourcep=0.0;
   10032                 :            : #endif
   10033                 :          0 : t6=5.834617425e14;
   10034                 :            : }
   10035                 :            : else
   10036                 :            : {
   10037         [ #  # ]:          0 : if
   10038                 :            : (t5<(-34.0))
   10039                 :            : {
   10040                 :            : #if defined(_DERIVATE)
   10041                 :          0 : t6_Vgatep_sourcep=0.0;
   10042                 :          0 : t6_Vdrainp_sourcep=0.0;
   10043                 :          0 : t6_Vdrainb_sourcep=0.0;
   10044                 :          0 : t6_Vbulkp_sourcep=0.0;
   10045                 :          0 : t6_Vsourceb_sourcep=0.0;
   10046                 :            : #endif
   10047                 :          0 : t6=1.713908431e-15;
   10048                 :            : }
   10049                 :            : else
   10050                 :            : {
   10051                 :            : {
   10052                 :          0 : double m00_exp(d00_exp0,t5)
   10053                 :            : #if defined(_DERIVATE)
   10054                 :            : #define d10_exp0 d00_exp0
   10055                 :            : #endif
   10056                 :            : #if defined(_DERIVATE)
   10057                 :          0 : t6_Vgatep_sourcep=t5_Vgatep_sourcep*d10_exp0;
   10058                 :          0 : t6_Vdrainp_sourcep=t5_Vdrainp_sourcep*d10_exp0;
   10059                 :          0 : t6_Vdrainb_sourcep=t5_Vdrainb_sourcep*d10_exp0;
   10060                 :          0 : t6_Vbulkp_sourcep=t5_Vbulkp_sourcep*d10_exp0;
   10061                 :          0 : t6_Vsourceb_sourcep=t5_Vsourceb_sourcep*d10_exp0;
   10062                 :            : #endif
   10063                 :          0 : t6=d00_exp0;
   10064                 :            : }
   10065                 :            : }
   10066                 :            : }
   10067                 :            : #if defined(_DERIVATE)
   10068                 :          0 : igs_Vgatep_sourcep=((((t11_Vgatep_sourcep*t2)+(t11*t2_Vgatep_sourcep))*t6)+((t11*t2)*t6_Vgatep_sourcep));
   10069                 :          0 : igs_Vdrainp_sourcep=((((t11_Vdrainp_sourcep*t2)+(t11*t2_Vdrainp_sourcep))*t6)+((t11*t2)*t6_Vdrainp_sourcep));
   10070                 :          0 : igs_Vdrainb_sourcep=((((t11_Vdrainb_sourcep*t2)+(t11*t2_Vdrainb_sourcep))*t6)+((t11*t2)*t6_Vdrainb_sourcep));
   10071                 :          0 : igs_Vbulkp_sourcep=((((t11_Vbulkp_sourcep*t2)+(t11*t2_Vbulkp_sourcep))*t6)+((t11*t2)*t6_Vbulkp_sourcep));
   10072                 :          0 : igs_Vsourceb_sourcep=((((t11_Vsourceb_sourcep*t2)+(t11*t2_Vsourceb_sourcep))*t6)+((t11*t2)*t6_Vsourceb_sourcep));
   10073                 :            : #endif
   10074                 :          0 : igs=((t11*t2)*t6);
   10075                 :            : #if defined(_DERIVATE)
   10076                 :          0 : t0_Vgatep_sourcep=vgd_Vgatep_sourcep;
   10077                 :          0 : t0_Vdrainp_sourcep=vgd_Vdrainp_sourcep;
   10078                 :          0 : t0_Vdrainb_sourcep=0.0;
   10079                 :          0 : t0_Vbulkp_sourcep=0.0;
   10080                 :          0 : t0_Vsourceb_sourcep=0.0;
   10081                 :            : #endif
   10082                 :          0 : t0=(vgd-vfbsd);
   10083                 :            : {
   10084                 :          0 : double m00_sqrt(d00_sqrt0,((t0*t0)+1.0e-4))
   10085                 :            : #if defined(_DERIVATE)
   10086                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+1.0e-4))
   10087                 :            : #endif
   10088                 :            : #if defined(_DERIVATE)
   10089                 :          0 : vgd_eff_Vgatep_sourcep=((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))*d10_sqrt0;
   10090                 :          0 : vgd_eff_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))*d10_sqrt0;
   10091                 :          0 : vgd_eff_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))*d10_sqrt0;
   10092                 :          0 : vgd_eff_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))*d10_sqrt0;
   10093                 :          0 : vgd_eff_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))*d10_sqrt0;
   10094                 :            : #endif
   10095                 :          0 : vgd_eff=d00_sqrt0;
   10096                 :            : }
   10097                 :            : #if defined(_DERIVATE)
   10098                 :          0 : t2_Vgatep_sourcep=((vgd_Vgatep_sourcep*vgd_eff)+(vgd*vgd_eff_Vgatep_sourcep));
   10099                 :          0 : t2_Vdrainp_sourcep=((vgd_Vdrainp_sourcep*vgd_eff)+(vgd*vgd_eff_Vdrainp_sourcep));
   10100                 :          0 : t2_Vdrainb_sourcep=(vgd*vgd_eff_Vdrainb_sourcep);
   10101                 :          0 : t2_Vbulkp_sourcep=(vgd*vgd_eff_Vbulkp_sourcep);
   10102                 :          0 : t2_Vsourceb_sourcep=(vgd*vgd_eff_Vsourceb_sourcep);
   10103                 :            : #endif
   10104                 :          0 : t2=(vgd*vgd_eff);
   10105                 :            : #if defined(_DERIVATE)
   10106                 :          0 : t5_Vgatep_sourcep=((t12_Vgatep_sourcep*((aigsd+(t3*vgd_eff))-((t4*vgd_eff)*vgd_eff)))+(t12*(((t3_Vgatep_sourcep*vgd_eff)+(t3*vgd_eff_Vgatep_sourcep))-((((t4_Vgatep_sourcep*vgd_eff)+(t4*vgd_eff_Vgatep_sourcep))*vgd_eff)+((t4*vgd_eff)*vgd_eff_Vgatep_sourcep)))));
   10107                 :          0 : t5_Vdrainp_sourcep=((t12_Vdrainp_sourcep*((aigsd+(t3*vgd_eff))-((t4*vgd_eff)*vgd_eff)))+(t12*(((t3_Vdrainp_sourcep*vgd_eff)+(t3*vgd_eff_Vdrainp_sourcep))-((((t4_Vdrainp_sourcep*vgd_eff)+(t4*vgd_eff_Vdrainp_sourcep))*vgd_eff)+((t4*vgd_eff)*vgd_eff_Vdrainp_sourcep)))));
   10108                 :          0 : t5_Vdrainb_sourcep=((t12_Vdrainb_sourcep*((aigsd+(t3*vgd_eff))-((t4*vgd_eff)*vgd_eff)))+(t12*(((t3_Vdrainb_sourcep*vgd_eff)+(t3*vgd_eff_Vdrainb_sourcep))-((((t4_Vdrainb_sourcep*vgd_eff)+(t4*vgd_eff_Vdrainb_sourcep))*vgd_eff)+((t4*vgd_eff)*vgd_eff_Vdrainb_sourcep)))));
   10109                 :          0 : t5_Vbulkp_sourcep=((t12_Vbulkp_sourcep*((aigsd+(t3*vgd_eff))-((t4*vgd_eff)*vgd_eff)))+(t12*(((t3_Vbulkp_sourcep*vgd_eff)+(t3*vgd_eff_Vbulkp_sourcep))-((((t4_Vbulkp_sourcep*vgd_eff)+(t4*vgd_eff_Vbulkp_sourcep))*vgd_eff)+((t4*vgd_eff)*vgd_eff_Vbulkp_sourcep)))));
   10110                 :          0 : t5_Vsourceb_sourcep=((t12_Vsourceb_sourcep*((aigsd+(t3*vgd_eff))-((t4*vgd_eff)*vgd_eff)))+(t12*(((t3_Vsourceb_sourcep*vgd_eff)+(t3*vgd_eff_Vsourceb_sourcep))-((((t4_Vsourceb_sourcep*vgd_eff)+(t4*vgd_eff_Vsourceb_sourcep))*vgd_eff)+((t4*vgd_eff)*vgd_eff_Vsourceb_sourcep)))));
   10111                 :            : #endif
   10112                 :          0 : t5=(t12*((aigsd+(t3*vgd_eff))-((t4*vgd_eff)*vgd_eff)));
   10113         [ #  # ]:          0 : if
   10114                 :            : (t5>34.0)
   10115                 :            : {
   10116                 :            : #if defined(_DERIVATE)
   10117                 :          0 : t6_Vgatep_sourcep=0.0;
   10118                 :          0 : t6_Vdrainp_sourcep=0.0;
   10119                 :          0 : t6_Vdrainb_sourcep=0.0;
   10120                 :          0 : t6_Vbulkp_sourcep=0.0;
   10121                 :          0 : t6_Vsourceb_sourcep=0.0;
   10122                 :            : #endif
   10123                 :          0 : t6=5.834617425e14;
   10124                 :            : }
   10125                 :            : else
   10126                 :            : {
   10127         [ #  # ]:          0 : if
   10128                 :            : (t5<(-34.0))
   10129                 :            : {
   10130                 :            : #if defined(_DERIVATE)
   10131                 :          0 : t6_Vgatep_sourcep=0.0;
   10132                 :          0 : t6_Vdrainp_sourcep=0.0;
   10133                 :          0 : t6_Vdrainb_sourcep=0.0;
   10134                 :          0 : t6_Vbulkp_sourcep=0.0;
   10135                 :          0 : t6_Vsourceb_sourcep=0.0;
   10136                 :            : #endif
   10137                 :          0 : t6=1.713908431e-15;
   10138                 :            : }
   10139                 :            : else
   10140                 :            : {
   10141                 :            : {
   10142                 :          0 : double m00_exp(d00_exp0,t5)
   10143                 :            : #if defined(_DERIVATE)
   10144                 :            : #define d10_exp0 d00_exp0
   10145                 :            : #endif
   10146                 :            : #if defined(_DERIVATE)
   10147                 :          0 : t6_Vgatep_sourcep=t5_Vgatep_sourcep*d10_exp0;
   10148                 :          0 : t6_Vdrainp_sourcep=t5_Vdrainp_sourcep*d10_exp0;
   10149                 :          0 : t6_Vdrainb_sourcep=t5_Vdrainb_sourcep*d10_exp0;
   10150                 :          0 : t6_Vbulkp_sourcep=t5_Vbulkp_sourcep*d10_exp0;
   10151                 :          0 : t6_Vsourceb_sourcep=t5_Vsourceb_sourcep*d10_exp0;
   10152                 :            : #endif
   10153                 :          0 : t6=d00_exp0;
   10154                 :            : }
   10155                 :            : }
   10156                 :            : }
   10157                 :            : #if defined(_DERIVATE)
   10158                 :          0 : igd_Vgatep_sourcep=((((t11_Vgatep_sourcep*t2)+(t11*t2_Vgatep_sourcep))*t6)+((t11*t2)*t6_Vgatep_sourcep));
   10159                 :          0 : igd_Vdrainp_sourcep=((((t11_Vdrainp_sourcep*t2)+(t11*t2_Vdrainp_sourcep))*t6)+((t11*t2)*t6_Vdrainp_sourcep));
   10160                 :          0 : igd_Vdrainb_sourcep=((((t11_Vdrainb_sourcep*t2)+(t11*t2_Vdrainb_sourcep))*t6)+((t11*t2)*t6_Vdrainb_sourcep));
   10161                 :          0 : igd_Vbulkp_sourcep=((((t11_Vbulkp_sourcep*t2)+(t11*t2_Vbulkp_sourcep))*t6)+((t11*t2)*t6_Vbulkp_sourcep));
   10162                 :          0 : igd_Vsourceb_sourcep=((((t11_Vsourceb_sourcep*t2)+(t11*t2_Vsourceb_sourcep))*t6)+((t11*t2)*t6_Vsourceb_sourcep));
   10163                 :            : #endif
   10164                 :          0 : igd=((t11*t2)*t6);
   10165                 :            : }
   10166                 :            : else
   10167                 :            : {
   10168                 :            : #if defined(_DERIVATE)
   10169                 :       7356 : igcs_Vgatep_sourcep=0.0;
   10170                 :       7356 : igcs_Vdrainp_sourcep=0.0;
   10171                 :       7356 : igcs_Vdrainb_sourcep=0.0;
   10172                 :       7356 : igcs_Vbulkp_sourcep=0.0;
   10173                 :       7356 : igcs_Vsourceb_sourcep=0.0;
   10174                 :            : #endif
   10175                 :       7356 : igcs=0.0;
   10176                 :            : #if defined(_DERIVATE)
   10177                 :       7356 : igcd_Vgatep_sourcep=0.0;
   10178                 :       7356 : igcd_Vdrainp_sourcep=0.0;
   10179                 :       7356 : igcd_Vdrainb_sourcep=0.0;
   10180                 :       7356 : igcd_Vbulkp_sourcep=0.0;
   10181                 :       7356 : igcd_Vsourceb_sourcep=0.0;
   10182                 :            : #endif
   10183                 :       7356 : igcd=0.0;
   10184                 :            : #if defined(_DERIVATE)
   10185                 :       7356 : igs_Vgatep_sourcep=0.0;
   10186                 :       7356 : igs_Vdrainp_sourcep=0.0;
   10187                 :       7356 : igs_Vdrainb_sourcep=0.0;
   10188                 :       7356 : igs_Vbulkp_sourcep=0.0;
   10189                 :       7356 : igs_Vsourceb_sourcep=0.0;
   10190                 :            : #endif
   10191                 :       7356 : igs=0.0;
   10192                 :            : #if defined(_DERIVATE)
   10193                 :       7356 : igd_Vgatep_sourcep=0.0;
   10194                 :       7356 : igd_Vdrainp_sourcep=0.0;
   10195                 :       7356 : igd_Vdrainb_sourcep=0.0;
   10196                 :       7356 : igd_Vbulkp_sourcep=0.0;
   10197                 :       7356 : igd_Vsourceb_sourcep=0.0;
   10198                 :            : #endif
   10199                 :       7356 : igd=0.0;
   10200                 :            : }
   10201         [ -  + ]:       7356 : if
   10202                 :            : (igbmod==1.0)
   10203                 :            : {
   10204                 :            : #if defined(_DERIVATE)
   10205                 :          0 : t0_Vgatep_sourcep=0.0;
   10206                 :          0 : t0_Vdrainp_sourcep=0.0;
   10207                 :          0 : t0_Vdrainb_sourcep=0.0;
   10208                 :          0 : t0_Vbulkp_sourcep=0.0;
   10209                 :          0 : t0_Vsourceb_sourcep=0.0;
   10210                 :            : #endif
   10211                 :          0 : t0=(vtm*nigbacc);
   10212                 :            : #if defined(_DERIVATE)
   10213                 :          0 : t1_Vgatep_sourcep=(-Vgs_eff_Vgatep_sourcep);
   10214                 :          0 : t1_Vdrainp_sourcep=((-Vgs_eff_Vdrainp_sourcep)+vbseff_Vdrainp_sourcep);
   10215                 :          0 : t1_Vdrainb_sourcep=((-Vgs_eff_Vdrainb_sourcep)+vbseff_Vdrainb_sourcep);
   10216                 :          0 : t1_Vbulkp_sourcep=((-Vgs_eff_Vbulkp_sourcep)+vbseff_Vbulkp_sourcep);
   10217                 :          0 : t1_Vsourceb_sourcep=((-Vgs_eff_Vsourceb_sourcep)+vbseff_Vsourceb_sourcep);
   10218                 :            : #endif
   10219                 :          0 : t1=(((-Vgs_eff)+vbseff)+vfbzb);
   10220                 :            : #if defined(_DERIVATE)
   10221                 :          0 : vxnvt_Vgatep_sourcep=((t1_Vgatep_sourcep*t0-t1*t0_Vgatep_sourcep)/t0/t0);
   10222                 :          0 : vxnvt_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t0-t1*t0_Vdrainp_sourcep)/t0/t0);
   10223                 :          0 : vxnvt_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t0-t1*t0_Vdrainb_sourcep)/t0/t0);
   10224                 :          0 : vxnvt_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t0-t1*t0_Vbulkp_sourcep)/t0/t0);
   10225                 :          0 : vxnvt_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t0-t1*t0_Vsourceb_sourcep)/t0/t0);
   10226                 :            : #endif
   10227                 :          0 : vxnvt=(t1/t0);
   10228         [ #  # ]:          0 : if
   10229                 :            : (vxnvt>34.0)
   10230                 :            : {
   10231                 :            : #if defined(_DERIVATE)
   10232                 :          0 : vaux_Vgatep_sourcep=t1_Vgatep_sourcep;
   10233                 :          0 : vaux_Vdrainp_sourcep=t1_Vdrainp_sourcep;
   10234                 :          0 : vaux_Vdrainb_sourcep=t1_Vdrainb_sourcep;
   10235                 :          0 : vaux_Vbulkp_sourcep=t1_Vbulkp_sourcep;
   10236                 :          0 : vaux_Vsourceb_sourcep=t1_Vsourceb_sourcep;
   10237                 :            : #endif
   10238                 :          0 : vaux=t1;
   10239                 :            : }
   10240                 :            : else
   10241                 :            : {
   10242         [ #  # ]:          0 : if
   10243                 :            : (vxnvt<(-34.0))
   10244                 :            : {
   10245                 :            : {
   10246                 :          0 : double m00_logE(d00_logE0,(1.0+1.713908431e-15))
   10247                 :            : #if defined(_DERIVATE)
   10248                 :          0 : vaux_Vgatep_sourcep=t0_Vgatep_sourcep*d00_logE0;
   10249                 :          0 : vaux_Vdrainp_sourcep=t0_Vdrainp_sourcep*d00_logE0;
   10250                 :          0 : vaux_Vdrainb_sourcep=t0_Vdrainb_sourcep*d00_logE0;
   10251                 :          0 : vaux_Vbulkp_sourcep=t0_Vbulkp_sourcep*d00_logE0;
   10252                 :          0 : vaux_Vsourceb_sourcep=t0_Vsourceb_sourcep*d00_logE0;
   10253                 :            : #endif
   10254                 :          0 : vaux=(t0*d00_logE0);
   10255                 :            : }
   10256                 :            : }
   10257                 :            : else
   10258                 :            : {
   10259                 :            : {
   10260                 :          0 : double m00_exp(d00_exp0,vxnvt)
   10261                 :            : #if defined(_DERIVATE)
   10262                 :            : #define d10_exp0 d00_exp0
   10263                 :            : #endif
   10264                 :            : #if defined(_DERIVATE)
   10265                 :          0 : expvxnvt_Vgatep_sourcep=vxnvt_Vgatep_sourcep*d10_exp0;
   10266                 :          0 : expvxnvt_Vdrainp_sourcep=vxnvt_Vdrainp_sourcep*d10_exp0;
   10267                 :          0 : expvxnvt_Vdrainb_sourcep=vxnvt_Vdrainb_sourcep*d10_exp0;
   10268                 :          0 : expvxnvt_Vbulkp_sourcep=vxnvt_Vbulkp_sourcep*d10_exp0;
   10269                 :          0 : expvxnvt_Vsourceb_sourcep=vxnvt_Vsourceb_sourcep*d10_exp0;
   10270                 :            : #endif
   10271                 :          0 : expvxnvt=d00_exp0;
   10272                 :            : }
   10273                 :            : {
   10274                 :          0 : double m00_logE(d00_logE0,(1.0+expvxnvt))
   10275                 :            : #if defined(_DERIVATE)
   10276                 :          0 : double m10_logE(d10_logE0,d00_logE0,(1.0+expvxnvt))
   10277                 :            : #endif
   10278                 :            : #if defined(_DERIVATE)
   10279                 :          0 : vaux_Vgatep_sourcep=((t0_Vgatep_sourcep*d00_logE0)+(t0*expvxnvt_Vgatep_sourcep*d10_logE0));
   10280                 :          0 : vaux_Vdrainp_sourcep=((t0_Vdrainp_sourcep*d00_logE0)+(t0*expvxnvt_Vdrainp_sourcep*d10_logE0));
   10281                 :          0 : vaux_Vdrainb_sourcep=((t0_Vdrainb_sourcep*d00_logE0)+(t0*expvxnvt_Vdrainb_sourcep*d10_logE0));
   10282                 :          0 : vaux_Vbulkp_sourcep=((t0_Vbulkp_sourcep*d00_logE0)+(t0*expvxnvt_Vbulkp_sourcep*d10_logE0));
   10283                 :          0 : vaux_Vsourceb_sourcep=((t0_Vsourceb_sourcep*d00_logE0)+(t0*expvxnvt_Vsourceb_sourcep*d10_logE0));
   10284                 :            : #endif
   10285                 :          0 : vaux=(t0*d00_logE0);
   10286                 :            : }
   10287                 :            : }
   10288                 :            : }
   10289                 :            : #if defined(_DERIVATE)
   10290                 :          0 : t2_Vgatep_sourcep=((Vgs_eff_Vgatep_sourcep*vaux)+((Vgs_eff-vbseff)*vaux_Vgatep_sourcep));
   10291                 :          0 : t2_Vdrainp_sourcep=(((Vgs_eff_Vdrainp_sourcep-vbseff_Vdrainp_sourcep)*vaux)+((Vgs_eff-vbseff)*vaux_Vdrainp_sourcep));
   10292                 :          0 : t2_Vdrainb_sourcep=(((Vgs_eff_Vdrainb_sourcep-vbseff_Vdrainb_sourcep)*vaux)+((Vgs_eff-vbseff)*vaux_Vdrainb_sourcep));
   10293                 :          0 : t2_Vbulkp_sourcep=(((Vgs_eff_Vbulkp_sourcep-vbseff_Vbulkp_sourcep)*vaux)+((Vgs_eff-vbseff)*vaux_Vbulkp_sourcep));
   10294                 :          0 : t2_Vsourceb_sourcep=(((Vgs_eff_Vsourceb_sourcep-vbseff_Vsourceb_sourcep)*vaux)+((Vgs_eff-vbseff)*vaux_Vsourceb_sourcep));
   10295                 :            : #endif
   10296                 :          0 : t2=((Vgs_eff-vbseff)*vaux);
   10297                 :            : #if defined(_DERIVATE)
   10298                 :          0 : t11_Vgatep_sourcep=0.0;
   10299                 :          0 : t11_Vdrainp_sourcep=0.0;
   10300                 :          0 : t11_Vdrainb_sourcep=0.0;
   10301                 :          0 : t11_Vbulkp_sourcep=0.0;
   10302                 :          0 : t11_Vsourceb_sourcep=0.0;
   10303                 :            : #endif
   10304                 :          0 : t11=(((4.97232e-7*weff)*leff)*toxratio);
   10305                 :            : #if defined(_DERIVATE)
   10306                 :          0 : t12_Vgatep_sourcep=0.0;
   10307                 :          0 : t12_Vdrainp_sourcep=0.0;
   10308                 :          0 : t12_Vdrainb_sourcep=0.0;
   10309                 :          0 : t12_Vbulkp_sourcep=0.0;
   10310                 :          0 : t12_Vsourceb_sourcep=0.0;
   10311                 :            : #endif
   10312                 :          0 : t12=((-7.45669e11)*toxe);
   10313                 :            : #if defined(_DERIVATE)
   10314                 :          0 : t3_Vgatep_sourcep=0.0;
   10315                 :          0 : t3_Vdrainp_sourcep=0.0;
   10316                 :          0 : t3_Vdrainb_sourcep=0.0;
   10317                 :          0 : t3_Vbulkp_sourcep=0.0;
   10318                 :          0 : t3_Vsourceb_sourcep=0.0;
   10319                 :            : #endif
   10320                 :          0 : t3=((aigbacc*cigbacc)-bigbacc);
   10321                 :            : #if defined(_DERIVATE)
   10322                 :          0 : t4_Vgatep_sourcep=0.0;
   10323                 :          0 : t4_Vdrainp_sourcep=0.0;
   10324                 :          0 : t4_Vdrainb_sourcep=0.0;
   10325                 :          0 : t4_Vbulkp_sourcep=0.0;
   10326                 :          0 : t4_Vsourceb_sourcep=0.0;
   10327                 :            : #endif
   10328                 :          0 : t4=(bigbacc*cigbacc);
   10329                 :            : #if defined(_DERIVATE)
   10330                 :          0 : t5_Vgatep_sourcep=((t12_Vgatep_sourcep*((aigbacc+(t3*voxacc))-((t4*voxacc)*voxacc)))+(t12*(((t3_Vgatep_sourcep*voxacc)+(t3*voxacc_Vgatep_sourcep))-((((t4_Vgatep_sourcep*voxacc)+(t4*voxacc_Vgatep_sourcep))*voxacc)+((t4*voxacc)*voxacc_Vgatep_sourcep)))));
   10331                 :          0 : t5_Vdrainp_sourcep=((t12_Vdrainp_sourcep*((aigbacc+(t3*voxacc))-((t4*voxacc)*voxacc)))+(t12*(((t3_Vdrainp_sourcep*voxacc)+(t3*voxacc_Vdrainp_sourcep))-((((t4_Vdrainp_sourcep*voxacc)+(t4*voxacc_Vdrainp_sourcep))*voxacc)+((t4*voxacc)*voxacc_Vdrainp_sourcep)))));
   10332                 :          0 : t5_Vdrainb_sourcep=((t12_Vdrainb_sourcep*((aigbacc+(t3*voxacc))-((t4*voxacc)*voxacc)))+(t12*(((t3_Vdrainb_sourcep*voxacc)+(t3*voxacc_Vdrainb_sourcep))-((((t4_Vdrainb_sourcep*voxacc)+(t4*voxacc_Vdrainb_sourcep))*voxacc)+((t4*voxacc)*voxacc_Vdrainb_sourcep)))));
   10333                 :          0 : t5_Vbulkp_sourcep=((t12_Vbulkp_sourcep*((aigbacc+(t3*voxacc))-((t4*voxacc)*voxacc)))+(t12*(((t3_Vbulkp_sourcep*voxacc)+(t3*voxacc_Vbulkp_sourcep))-((((t4_Vbulkp_sourcep*voxacc)+(t4*voxacc_Vbulkp_sourcep))*voxacc)+((t4*voxacc)*voxacc_Vbulkp_sourcep)))));
   10334                 :          0 : t5_Vsourceb_sourcep=((t12_Vsourceb_sourcep*((aigbacc+(t3*voxacc))-((t4*voxacc)*voxacc)))+(t12*(((t3_Vsourceb_sourcep*voxacc)+(t3*voxacc_Vsourceb_sourcep))-((((t4_Vsourceb_sourcep*voxacc)+(t4*voxacc_Vsourceb_sourcep))*voxacc)+((t4*voxacc)*voxacc_Vsourceb_sourcep)))));
   10335                 :            : #endif
   10336                 :          0 : t5=(t12*((aigbacc+(t3*voxacc))-((t4*voxacc)*voxacc)));
   10337         [ #  # ]:          0 : if
   10338                 :            : (t5>34.0)
   10339                 :            : {
   10340                 :            : #if defined(_DERIVATE)
   10341                 :          0 : t6_Vgatep_sourcep=0.0;
   10342                 :          0 : t6_Vdrainp_sourcep=0.0;
   10343                 :          0 : t6_Vdrainb_sourcep=0.0;
   10344                 :          0 : t6_Vbulkp_sourcep=0.0;
   10345                 :          0 : t6_Vsourceb_sourcep=0.0;
   10346                 :            : #endif
   10347                 :          0 : t6=5.834617425e14;
   10348                 :            : }
   10349                 :            : else
   10350                 :            : {
   10351         [ #  # ]:          0 : if
   10352                 :            : (t5<(-34.0))
   10353                 :            : {
   10354                 :            : #if defined(_DERIVATE)
   10355                 :          0 : t6_Vgatep_sourcep=0.0;
   10356                 :          0 : t6_Vdrainp_sourcep=0.0;
   10357                 :          0 : t6_Vdrainb_sourcep=0.0;
   10358                 :          0 : t6_Vbulkp_sourcep=0.0;
   10359                 :          0 : t6_Vsourceb_sourcep=0.0;
   10360                 :            : #endif
   10361                 :          0 : t6=1.713908431e-15;
   10362                 :            : }
   10363                 :            : else
   10364                 :            : {
   10365                 :            : {
   10366                 :          0 : double m00_exp(d00_exp0,t5)
   10367                 :            : #if defined(_DERIVATE)
   10368                 :            : #define d10_exp0 d00_exp0
   10369                 :            : #endif
   10370                 :            : #if defined(_DERIVATE)
   10371                 :          0 : t6_Vgatep_sourcep=t5_Vgatep_sourcep*d10_exp0;
   10372                 :          0 : t6_Vdrainp_sourcep=t5_Vdrainp_sourcep*d10_exp0;
   10373                 :          0 : t6_Vdrainb_sourcep=t5_Vdrainb_sourcep*d10_exp0;
   10374                 :          0 : t6_Vbulkp_sourcep=t5_Vbulkp_sourcep*d10_exp0;
   10375                 :          0 : t6_Vsourceb_sourcep=t5_Vsourceb_sourcep*d10_exp0;
   10376                 :            : #endif
   10377                 :          0 : t6=d00_exp0;
   10378                 :            : }
   10379                 :            : }
   10380                 :            : }
   10381                 :            : #if defined(_DERIVATE)
   10382                 :          0 : igbacc_Vgatep_sourcep=((((t11_Vgatep_sourcep*t2)+(t11*t2_Vgatep_sourcep))*t6)+((t11*t2)*t6_Vgatep_sourcep));
   10383                 :          0 : igbacc_Vdrainp_sourcep=((((t11_Vdrainp_sourcep*t2)+(t11*t2_Vdrainp_sourcep))*t6)+((t11*t2)*t6_Vdrainp_sourcep));
   10384                 :          0 : igbacc_Vdrainb_sourcep=((((t11_Vdrainb_sourcep*t2)+(t11*t2_Vdrainb_sourcep))*t6)+((t11*t2)*t6_Vdrainb_sourcep));
   10385                 :          0 : igbacc_Vbulkp_sourcep=((((t11_Vbulkp_sourcep*t2)+(t11*t2_Vbulkp_sourcep))*t6)+((t11*t2)*t6_Vbulkp_sourcep));
   10386                 :          0 : igbacc_Vsourceb_sourcep=((((t11_Vsourceb_sourcep*t2)+(t11*t2_Vsourceb_sourcep))*t6)+((t11*t2)*t6_Vsourceb_sourcep));
   10387                 :            : #endif
   10388                 :          0 : igbacc=((t11*t2)*t6);
   10389                 :            : #if defined(_DERIVATE)
   10390                 :          0 : t0_Vgatep_sourcep=0.0;
   10391                 :          0 : t0_Vdrainp_sourcep=0.0;
   10392                 :          0 : t0_Vdrainb_sourcep=0.0;
   10393                 :          0 : t0_Vbulkp_sourcep=0.0;
   10394                 :          0 : t0_Vsourceb_sourcep=0.0;
   10395                 :            : #endif
   10396                 :          0 : t0=(vtm*nigbinv);
   10397                 :            : #if defined(_DERIVATE)
   10398                 :          0 : t1_Vgatep_sourcep=voxdepinv_Vgatep_sourcep;
   10399                 :          0 : t1_Vdrainp_sourcep=voxdepinv_Vdrainp_sourcep;
   10400                 :          0 : t1_Vdrainb_sourcep=voxdepinv_Vdrainb_sourcep;
   10401                 :          0 : t1_Vbulkp_sourcep=voxdepinv_Vbulkp_sourcep;
   10402                 :          0 : t1_Vsourceb_sourcep=voxdepinv_Vsourceb_sourcep;
   10403                 :            : #endif
   10404                 :          0 : t1=(voxdepinv-eigbinv);
   10405                 :            : #if defined(_DERIVATE)
   10406                 :          0 : vxnvt_Vgatep_sourcep=((t1_Vgatep_sourcep*t0-t1*t0_Vgatep_sourcep)/t0/t0);
   10407                 :          0 : vxnvt_Vdrainp_sourcep=((t1_Vdrainp_sourcep*t0-t1*t0_Vdrainp_sourcep)/t0/t0);
   10408                 :          0 : vxnvt_Vdrainb_sourcep=((t1_Vdrainb_sourcep*t0-t1*t0_Vdrainb_sourcep)/t0/t0);
   10409                 :          0 : vxnvt_Vbulkp_sourcep=((t1_Vbulkp_sourcep*t0-t1*t0_Vbulkp_sourcep)/t0/t0);
   10410                 :          0 : vxnvt_Vsourceb_sourcep=((t1_Vsourceb_sourcep*t0-t1*t0_Vsourceb_sourcep)/t0/t0);
   10411                 :            : #endif
   10412                 :          0 : vxnvt=(t1/t0);
   10413         [ #  # ]:          0 : if
   10414                 :            : (vxnvt>34.0)
   10415                 :            : {
   10416                 :            : #if defined(_DERIVATE)
   10417                 :          0 : vaux_Vgatep_sourcep=t1_Vgatep_sourcep;
   10418                 :          0 : vaux_Vdrainp_sourcep=t1_Vdrainp_sourcep;
   10419                 :          0 : vaux_Vdrainb_sourcep=t1_Vdrainb_sourcep;
   10420                 :          0 : vaux_Vbulkp_sourcep=t1_Vbulkp_sourcep;
   10421                 :          0 : vaux_Vsourceb_sourcep=t1_Vsourceb_sourcep;
   10422                 :            : #endif
   10423                 :          0 : vaux=t1;
   10424                 :            : }
   10425                 :            : else
   10426                 :            : {
   10427         [ #  # ]:          0 : if
   10428                 :            : (vxnvt<(-34.0))
   10429                 :            : {
   10430                 :            : {
   10431                 :          0 : double m00_logE(d00_logE0,(1.0+1.713908431e-15))
   10432                 :            : #if defined(_DERIVATE)
   10433                 :          0 : vaux_Vgatep_sourcep=t0_Vgatep_sourcep*d00_logE0;
   10434                 :          0 : vaux_Vdrainp_sourcep=t0_Vdrainp_sourcep*d00_logE0;
   10435                 :          0 : vaux_Vdrainb_sourcep=t0_Vdrainb_sourcep*d00_logE0;
   10436                 :          0 : vaux_Vbulkp_sourcep=t0_Vbulkp_sourcep*d00_logE0;
   10437                 :          0 : vaux_Vsourceb_sourcep=t0_Vsourceb_sourcep*d00_logE0;
   10438                 :            : #endif
   10439                 :          0 : vaux=(t0*d00_logE0);
   10440                 :            : }
   10441                 :            : }
   10442                 :            : else
   10443                 :            : {
   10444                 :            : {
   10445                 :          0 : double m00_exp(d00_exp0,vxnvt)
   10446                 :            : #if defined(_DERIVATE)
   10447                 :            : #define d10_exp0 d00_exp0
   10448                 :            : #endif
   10449                 :            : #if defined(_DERIVATE)
   10450                 :          0 : expvxnvt_Vgatep_sourcep=vxnvt_Vgatep_sourcep*d10_exp0;
   10451                 :          0 : expvxnvt_Vdrainp_sourcep=vxnvt_Vdrainp_sourcep*d10_exp0;
   10452                 :          0 : expvxnvt_Vdrainb_sourcep=vxnvt_Vdrainb_sourcep*d10_exp0;
   10453                 :          0 : expvxnvt_Vbulkp_sourcep=vxnvt_Vbulkp_sourcep*d10_exp0;
   10454                 :          0 : expvxnvt_Vsourceb_sourcep=vxnvt_Vsourceb_sourcep*d10_exp0;
   10455                 :            : #endif
   10456                 :          0 : expvxnvt=d00_exp0;
   10457                 :            : }
   10458                 :            : {
   10459                 :          0 : double m00_logE(d00_logE0,(1.0+expvxnvt))
   10460                 :            : #if defined(_DERIVATE)
   10461                 :          0 : double m10_logE(d10_logE0,d00_logE0,(1.0+expvxnvt))
   10462                 :            : #endif
   10463                 :            : #if defined(_DERIVATE)
   10464                 :          0 : vaux_Vgatep_sourcep=((t0_Vgatep_sourcep*d00_logE0)+(t0*expvxnvt_Vgatep_sourcep*d10_logE0));
   10465                 :          0 : vaux_Vdrainp_sourcep=((t0_Vdrainp_sourcep*d00_logE0)+(t0*expvxnvt_Vdrainp_sourcep*d10_logE0));
   10466                 :          0 : vaux_Vdrainb_sourcep=((t0_Vdrainb_sourcep*d00_logE0)+(t0*expvxnvt_Vdrainb_sourcep*d10_logE0));
   10467                 :          0 : vaux_Vbulkp_sourcep=((t0_Vbulkp_sourcep*d00_logE0)+(t0*expvxnvt_Vbulkp_sourcep*d10_logE0));
   10468                 :          0 : vaux_Vsourceb_sourcep=((t0_Vsourceb_sourcep*d00_logE0)+(t0*expvxnvt_Vsourceb_sourcep*d10_logE0));
   10469                 :            : #endif
   10470                 :          0 : vaux=(t0*d00_logE0);
   10471                 :            : }
   10472                 :            : }
   10473                 :            : }
   10474                 :            : #if defined(_DERIVATE)
   10475                 :          0 : t2_Vgatep_sourcep=((Vgs_eff_Vgatep_sourcep*vaux)+((Vgs_eff-vbseff)*vaux_Vgatep_sourcep));
   10476                 :          0 : t2_Vdrainp_sourcep=(((Vgs_eff_Vdrainp_sourcep-vbseff_Vdrainp_sourcep)*vaux)+((Vgs_eff-vbseff)*vaux_Vdrainp_sourcep));
   10477                 :          0 : t2_Vdrainb_sourcep=(((Vgs_eff_Vdrainb_sourcep-vbseff_Vdrainb_sourcep)*vaux)+((Vgs_eff-vbseff)*vaux_Vdrainb_sourcep));
   10478                 :          0 : t2_Vbulkp_sourcep=(((Vgs_eff_Vbulkp_sourcep-vbseff_Vbulkp_sourcep)*vaux)+((Vgs_eff-vbseff)*vaux_Vbulkp_sourcep));
   10479                 :          0 : t2_Vsourceb_sourcep=(((Vgs_eff_Vsourceb_sourcep-vbseff_Vsourceb_sourcep)*vaux)+((Vgs_eff-vbseff)*vaux_Vsourceb_sourcep));
   10480                 :            : #endif
   10481                 :          0 : t2=((Vgs_eff-vbseff)*vaux);
   10482                 :            : #if defined(_DERIVATE)
   10483                 :          0 : t11_Vgatep_sourcep=t11_Vgatep_sourcep*0.75610;
   10484                 :          0 : t11_Vdrainp_sourcep=t11_Vdrainp_sourcep*0.75610;
   10485                 :          0 : t11_Vdrainb_sourcep=t11_Vdrainb_sourcep*0.75610;
   10486                 :          0 : t11_Vbulkp_sourcep=t11_Vbulkp_sourcep*0.75610;
   10487                 :          0 : t11_Vsourceb_sourcep=t11_Vsourceb_sourcep*0.75610;
   10488                 :            : #endif
   10489                 :          0 : t11=(t11*0.75610);
   10490                 :            : #if defined(_DERIVATE)
   10491                 :          0 : t12_Vgatep_sourcep=t12_Vgatep_sourcep*1.31724;
   10492                 :          0 : t12_Vdrainp_sourcep=t12_Vdrainp_sourcep*1.31724;
   10493                 :          0 : t12_Vdrainb_sourcep=t12_Vdrainb_sourcep*1.31724;
   10494                 :          0 : t12_Vbulkp_sourcep=t12_Vbulkp_sourcep*1.31724;
   10495                 :          0 : t12_Vsourceb_sourcep=t12_Vsourceb_sourcep*1.31724;
   10496                 :            : #endif
   10497                 :          0 : t12=(t12*1.31724);
   10498                 :            : #if defined(_DERIVATE)
   10499                 :          0 : t3_Vgatep_sourcep=0.0;
   10500                 :          0 : t3_Vdrainp_sourcep=0.0;
   10501                 :          0 : t3_Vdrainb_sourcep=0.0;
   10502                 :          0 : t3_Vbulkp_sourcep=0.0;
   10503                 :          0 : t3_Vsourceb_sourcep=0.0;
   10504                 :            : #endif
   10505                 :          0 : t3=((aigbinv*cigbinv)-bigbinv);
   10506                 :            : #if defined(_DERIVATE)
   10507                 :          0 : t4_Vgatep_sourcep=0.0;
   10508                 :          0 : t4_Vdrainp_sourcep=0.0;
   10509                 :          0 : t4_Vdrainb_sourcep=0.0;
   10510                 :          0 : t4_Vbulkp_sourcep=0.0;
   10511                 :          0 : t4_Vsourceb_sourcep=0.0;
   10512                 :            : #endif
   10513                 :          0 : t4=(bigbinv*cigbinv);
   10514                 :            : #if defined(_DERIVATE)
   10515                 :          0 : t5_Vgatep_sourcep=((t12_Vgatep_sourcep*((aigbinv+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)))+(t12*(((t3_Vgatep_sourcep*voxdepinv)+(t3*voxdepinv_Vgatep_sourcep))-((((t4_Vgatep_sourcep*voxdepinv)+(t4*voxdepinv_Vgatep_sourcep))*voxdepinv)+((t4*voxdepinv)*voxdepinv_Vgatep_sourcep)))));
   10516                 :          0 : t5_Vdrainp_sourcep=((t12_Vdrainp_sourcep*((aigbinv+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)))+(t12*(((t3_Vdrainp_sourcep*voxdepinv)+(t3*voxdepinv_Vdrainp_sourcep))-((((t4_Vdrainp_sourcep*voxdepinv)+(t4*voxdepinv_Vdrainp_sourcep))*voxdepinv)+((t4*voxdepinv)*voxdepinv_Vdrainp_sourcep)))));
   10517                 :          0 : t5_Vdrainb_sourcep=((t12_Vdrainb_sourcep*((aigbinv+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)))+(t12*(((t3_Vdrainb_sourcep*voxdepinv)+(t3*voxdepinv_Vdrainb_sourcep))-((((t4_Vdrainb_sourcep*voxdepinv)+(t4*voxdepinv_Vdrainb_sourcep))*voxdepinv)+((t4*voxdepinv)*voxdepinv_Vdrainb_sourcep)))));
   10518                 :          0 : t5_Vbulkp_sourcep=((t12_Vbulkp_sourcep*((aigbinv+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)))+(t12*(((t3_Vbulkp_sourcep*voxdepinv)+(t3*voxdepinv_Vbulkp_sourcep))-((((t4_Vbulkp_sourcep*voxdepinv)+(t4*voxdepinv_Vbulkp_sourcep))*voxdepinv)+((t4*voxdepinv)*voxdepinv_Vbulkp_sourcep)))));
   10519                 :          0 : t5_Vsourceb_sourcep=((t12_Vsourceb_sourcep*((aigbinv+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)))+(t12*(((t3_Vsourceb_sourcep*voxdepinv)+(t3*voxdepinv_Vsourceb_sourcep))-((((t4_Vsourceb_sourcep*voxdepinv)+(t4*voxdepinv_Vsourceb_sourcep))*voxdepinv)+((t4*voxdepinv)*voxdepinv_Vsourceb_sourcep)))));
   10520                 :            : #endif
   10521                 :          0 : t5=(t12*((aigbinv+(t3*voxdepinv))-((t4*voxdepinv)*voxdepinv)));
   10522         [ #  # ]:          0 : if
   10523                 :            : (t5>34.0)
   10524                 :            : {
   10525                 :            : #if defined(_DERIVATE)
   10526                 :          0 : t6_Vgatep_sourcep=0.0;
   10527                 :          0 : t6_Vdrainp_sourcep=0.0;
   10528                 :          0 : t6_Vdrainb_sourcep=0.0;
   10529                 :          0 : t6_Vbulkp_sourcep=0.0;
   10530                 :          0 : t6_Vsourceb_sourcep=0.0;
   10531                 :            : #endif
   10532                 :          0 : t6=5.834617425e14;
   10533                 :            : }
   10534                 :            : else
   10535                 :            : {
   10536         [ #  # ]:          0 : if
   10537                 :            : (t5<(-34.0))
   10538                 :            : {
   10539                 :            : #if defined(_DERIVATE)
   10540                 :          0 : t6_Vgatep_sourcep=0.0;
   10541                 :          0 : t6_Vdrainp_sourcep=0.0;
   10542                 :          0 : t6_Vdrainb_sourcep=0.0;
   10543                 :          0 : t6_Vbulkp_sourcep=0.0;
   10544                 :          0 : t6_Vsourceb_sourcep=0.0;
   10545                 :            : #endif
   10546                 :          0 : t6=1.713908431e-15;
   10547                 :            : }
   10548                 :            : else
   10549                 :            : {
   10550                 :            : {
   10551                 :          0 : double m00_exp(d00_exp0,t5)
   10552                 :            : #if defined(_DERIVATE)
   10553                 :            : #define d10_exp0 d00_exp0
   10554                 :            : #endif
   10555                 :            : #if defined(_DERIVATE)
   10556                 :          0 : t6_Vgatep_sourcep=t5_Vgatep_sourcep*d10_exp0;
   10557                 :          0 : t6_Vdrainp_sourcep=t5_Vdrainp_sourcep*d10_exp0;
   10558                 :          0 : t6_Vdrainb_sourcep=t5_Vdrainb_sourcep*d10_exp0;
   10559                 :          0 : t6_Vbulkp_sourcep=t5_Vbulkp_sourcep*d10_exp0;
   10560                 :          0 : t6_Vsourceb_sourcep=t5_Vsourceb_sourcep*d10_exp0;
   10561                 :            : #endif
   10562                 :          0 : t6=d00_exp0;
   10563                 :            : }
   10564                 :            : }
   10565                 :            : }
   10566                 :            : #if defined(_DERIVATE)
   10567                 :          0 : igbinv_Vgatep_sourcep=((((t11_Vgatep_sourcep*t2)+(t11*t2_Vgatep_sourcep))*t6)+((t11*t2)*t6_Vgatep_sourcep));
   10568                 :          0 : igbinv_Vdrainp_sourcep=((((t11_Vdrainp_sourcep*t2)+(t11*t2_Vdrainp_sourcep))*t6)+((t11*t2)*t6_Vdrainp_sourcep));
   10569                 :          0 : igbinv_Vdrainb_sourcep=((((t11_Vdrainb_sourcep*t2)+(t11*t2_Vdrainb_sourcep))*t6)+((t11*t2)*t6_Vdrainb_sourcep));
   10570                 :          0 : igbinv_Vbulkp_sourcep=((((t11_Vbulkp_sourcep*t2)+(t11*t2_Vbulkp_sourcep))*t6)+((t11*t2)*t6_Vbulkp_sourcep));
   10571                 :          0 : igbinv_Vsourceb_sourcep=((((t11_Vsourceb_sourcep*t2)+(t11*t2_Vsourceb_sourcep))*t6)+((t11*t2)*t6_Vsourceb_sourcep));
   10572                 :            : #endif
   10573                 :          0 : igbinv=((t11*t2)*t6);
   10574                 :            : #if defined(_DERIVATE)
   10575                 :          0 : igb_Vgatep_sourcep=(igbinv_Vgatep_sourcep+igbacc_Vgatep_sourcep);
   10576                 :          0 : igb_Vdrainp_sourcep=(igbinv_Vdrainp_sourcep+igbacc_Vdrainp_sourcep);
   10577                 :          0 : igb_Vdrainb_sourcep=(igbinv_Vdrainb_sourcep+igbacc_Vdrainb_sourcep);
   10578                 :          0 : igb_Vbulkp_sourcep=(igbinv_Vbulkp_sourcep+igbacc_Vbulkp_sourcep);
   10579                 :          0 : igb_Vsourceb_sourcep=(igbinv_Vsourceb_sourcep+igbacc_Vsourceb_sourcep);
   10580                 :            : #endif
   10581                 :          0 : igb=(igbinv+igbacc);
   10582                 :            : }
   10583                 :            : else
   10584                 :            : {
   10585                 :            : #if defined(_DERIVATE)
   10586                 :       7356 : igb_Vgatep_sourcep=0.0;
   10587                 :       7356 : igb_Vdrainp_sourcep=0.0;
   10588                 :       7356 : igb_Vdrainb_sourcep=0.0;
   10589                 :       7356 : igb_Vbulkp_sourcep=0.0;
   10590                 :       7356 : igb_Vsourceb_sourcep=0.0;
   10591                 :            : #endif
   10592                 :       7356 : igb=0.0;
   10593                 :            : }
   10594         [ -  + ]:       7356 : if
   10595                 :            : (nf!=1.0)
   10596                 :            : {
   10597                 :            : #if defined(_DERIVATE)
   10598                 :          0 : cdrain_Vgatep_sourcep=cdrain_Vgatep_sourcep*nf;
   10599                 :          0 : cdrain_Vdrainp_sourcep=cdrain_Vdrainp_sourcep*nf;
   10600                 :          0 : cdrain_Vdrainb_sourcep=cdrain_Vdrainb_sourcep*nf;
   10601                 :          0 : cdrain_Vbulkp_sourcep=cdrain_Vbulkp_sourcep*nf;
   10602                 :          0 : cdrain_Vsourceb_sourcep=cdrain_Vsourceb_sourcep*nf;
   10603                 :            : #endif
   10604                 :          0 : cdrain=(cdrain*nf);
   10605                 :            : #if defined(_DERIVATE)
   10606                 :          0 : csub_Vgatep_sourcep=csub_Vgatep_sourcep*nf;
   10607                 :          0 : csub_Vdrainp_sourcep=csub_Vdrainp_sourcep*nf;
   10608                 :          0 : csub_Vdrainb_sourcep=csub_Vdrainb_sourcep*nf;
   10609                 :          0 : csub_Vbulkp_sourcep=csub_Vbulkp_sourcep*nf;
   10610                 :          0 : csub_Vsourceb_sourcep=csub_Vsourceb_sourcep*nf;
   10611                 :            : #endif
   10612                 :          0 : csub=(csub*nf);
   10613                 :            : #if defined(_DERIVATE)
   10614                 :          0 : igidl_Vgatep_sourcep=igidl_Vgatep_sourcep*nf;
   10615                 :          0 : igidl_Vdrainp_sourcep=igidl_Vdrainp_sourcep*nf;
   10616                 :          0 : igidl_Vdrainb_sourcep=igidl_Vdrainb_sourcep*nf;
   10617                 :          0 : igidl_Vbulkp_sourcep=igidl_Vbulkp_sourcep*nf;
   10618                 :          0 : igidl_Vsourceb_sourcep=igidl_Vsourceb_sourcep*nf;
   10619                 :            : #endif
   10620                 :          0 : igidl=(igidl*nf);
   10621                 :            : #if defined(_DERIVATE)
   10622                 :          0 : igisl_Vgatep_sourcep=igisl_Vgatep_sourcep*nf;
   10623                 :          0 : igisl_Vdrainp_sourcep=igisl_Vdrainp_sourcep*nf;
   10624                 :          0 : igisl_Vdrainb_sourcep=igisl_Vdrainb_sourcep*nf;
   10625                 :          0 : igisl_Vbulkp_sourcep=igisl_Vbulkp_sourcep*nf;
   10626                 :          0 : igisl_Vsourceb_sourcep=igisl_Vsourceb_sourcep*nf;
   10627                 :            : #endif
   10628                 :          0 : igisl=(igisl*nf);
   10629                 :            : #if defined(_DERIVATE)
   10630                 :          0 : igcs_Vgatep_sourcep=igcs_Vgatep_sourcep*nf;
   10631                 :          0 : igcs_Vdrainp_sourcep=igcs_Vdrainp_sourcep*nf;
   10632                 :          0 : igcs_Vdrainb_sourcep=igcs_Vdrainb_sourcep*nf;
   10633                 :          0 : igcs_Vbulkp_sourcep=igcs_Vbulkp_sourcep*nf;
   10634                 :          0 : igcs_Vsourceb_sourcep=igcs_Vsourceb_sourcep*nf;
   10635                 :            : #endif
   10636                 :          0 : igcs=(igcs*nf);
   10637                 :            : #if defined(_DERIVATE)
   10638                 :          0 : igcd_Vgatep_sourcep=igcd_Vgatep_sourcep*nf;
   10639                 :          0 : igcd_Vdrainp_sourcep=igcd_Vdrainp_sourcep*nf;
   10640                 :          0 : igcd_Vdrainb_sourcep=igcd_Vdrainb_sourcep*nf;
   10641                 :          0 : igcd_Vbulkp_sourcep=igcd_Vbulkp_sourcep*nf;
   10642                 :          0 : igcd_Vsourceb_sourcep=igcd_Vsourceb_sourcep*nf;
   10643                 :            : #endif
   10644                 :          0 : igcd=(igcd*nf);
   10645                 :            : #if defined(_DERIVATE)
   10646                 :          0 : igs_Vgatep_sourcep=igs_Vgatep_sourcep*nf;
   10647                 :          0 : igs_Vdrainp_sourcep=igs_Vdrainp_sourcep*nf;
   10648                 :          0 : igs_Vdrainb_sourcep=igs_Vdrainb_sourcep*nf;
   10649                 :          0 : igs_Vbulkp_sourcep=igs_Vbulkp_sourcep*nf;
   10650                 :          0 : igs_Vsourceb_sourcep=igs_Vsourceb_sourcep*nf;
   10651                 :            : #endif
   10652                 :          0 : igs=(igs*nf);
   10653                 :            : #if defined(_DERIVATE)
   10654                 :          0 : igd_Vgatep_sourcep=igd_Vgatep_sourcep*nf;
   10655                 :          0 : igd_Vdrainp_sourcep=igd_Vdrainp_sourcep*nf;
   10656                 :          0 : igd_Vdrainb_sourcep=igd_Vdrainb_sourcep*nf;
   10657                 :          0 : igd_Vbulkp_sourcep=igd_Vbulkp_sourcep*nf;
   10658                 :          0 : igd_Vsourceb_sourcep=igd_Vsourceb_sourcep*nf;
   10659                 :            : #endif
   10660                 :          0 : igd=(igd*nf);
   10661                 :            : #if defined(_DERIVATE)
   10662                 :          0 : igb_Vgatep_sourcep=igb_Vgatep_sourcep*nf;
   10663                 :          0 : igb_Vdrainp_sourcep=igb_Vdrainp_sourcep*nf;
   10664                 :          0 : igb_Vdrainb_sourcep=igb_Vdrainb_sourcep*nf;
   10665                 :          0 : igb_Vbulkp_sourcep=igb_Vbulkp_sourcep*nf;
   10666                 :          0 : igb_Vsourceb_sourcep=igb_Vsourceb_sourcep*nf;
   10667                 :            : #endif
   10668                 :          0 : igb=(igb*nf);
   10669                 :            : }
   10670                 :       7356 : ccn=1;
   10671 [ +  - ][ -  + ]:       7356 : if
   10672                 :            : ((xpart<0)||(ccn==0))
   10673                 :            : {
   10674                 :            : #if defined(_DERIVATE)
   10675                 :          0 : qgate_Vgatep_sourcep=0.0;
   10676                 :          0 : qgate_Vdrainp_sourcep=0.0;
   10677                 :          0 : qgate_Vdrainb_sourcep=0.0;
   10678                 :          0 : qgate_Vbulkp_sourcep=0.0;
   10679                 :          0 : qgate_Vsourceb_sourcep=0.0;
   10680                 :            : #endif
   10681                 :          0 : qgate=0.0;
   10682                 :            : #if defined(_DERIVATE)
   10683                 :          0 : qdrn_Vgatem_sourcep=0.0;
   10684                 :          0 : qdrn_Vgatep_sourcep=0.0;
   10685                 :          0 : qdrn_Vdrainp_sourcep=0.0;
   10686                 :          0 : qdrn_Vdrainb_sourcep=0.0;
   10687                 :          0 : qdrn_Vbulkp_sourcep=0.0;
   10688                 :          0 : qdrn_Vsourceb_sourcep=0.0;
   10689                 :            : #endif
   10690                 :          0 : qdrn=0.0;
   10691                 :            : #if defined(_DERIVATE)
   10692                 :          0 : qsrc_Vgatem_sourcep=0.0;
   10693                 :          0 : qsrc_Vgatep_sourcep=0.0;
   10694                 :          0 : qsrc_Vdrainp_sourcep=0.0;
   10695                 :          0 : qsrc_Vdrainb_sourcep=0.0;
   10696                 :          0 : qsrc_Vbulkp_sourcep=0.0;
   10697                 :          0 : qsrc_Vsourceb_sourcep=0.0;
   10698                 :            : #endif
   10699                 :          0 : qsrc=0.0;
   10700                 :            : #if defined(_DERIVATE)
   10701                 :          0 : qbulk_Vgatem_sourcep=0.0;
   10702                 :          0 : qbulk_Vgatep_sourcep=0.0;
   10703                 :          0 : qbulk_Vdrainp_sourcep=0.0;
   10704                 :          0 : qbulk_Vdrainb_sourcep=0.0;
   10705                 :          0 : qbulk_Vbulkp_sourcep=0.0;
   10706                 :          0 : qbulk_Vsourceb_sourcep=0.0;
   10707                 :            : #endif
   10708                 :          0 : qbulk=0.0;
   10709                 :            : #if defined(_DERIVATE)
   10710                 :          0 : qgmid_Vdrainb_sourcep=0.0;
   10711                 :          0 : qgmid_Vbulkp_sourcep=0.0;
   10712                 :          0 : qgmid_Vsourceb_sourcep=0.0;
   10713                 :          0 : qgmid_Vgatep_sourcep=0.0;
   10714                 :          0 : qgmid_Vdrainp_sourcep=0.0;
   10715                 :          0 : qgmid_Vgatem_sourcep=0.0;
   10716                 :            : #endif
   10717                 :          0 : qgmid=0.0;
   10718                 :            : }
   10719                 :            : else
   10720                 :            : {
   10721         [ -  + ]:       7356 : if
   10722                 :            : (capmod==0)
   10723                 :            : {
   10724         [ #  # ]:          0 : if
   10725                 :            : (vbseff<0.0)
   10726                 :            : {
   10727                 :            : #if defined(_DERIVATE)
   10728                 :          0 : vbseff_Vdrainp_sourcep=Vbs_Vdrainp_sourcep;
   10729                 :          0 : vbseff_Vdrainb_sourcep=0.0;
   10730                 :          0 : vbseff_Vbulkp_sourcep=Vbs_Vbulkp_sourcep;
   10731                 :          0 : vbseff_Vsourceb_sourcep=0.0;
   10732                 :            : #endif
   10733                 :          0 : vbseff=Vbs;
   10734                 :            : }
   10735                 :            : else
   10736                 :            : {
   10737                 :            : #if defined(_DERIVATE)
   10738                 :          0 : vbseff_Vdrainp_sourcep=(-phis_Vdrainp_sourcep);
   10739                 :          0 : vbseff_Vdrainb_sourcep=(-phis_Vdrainb_sourcep);
   10740                 :          0 : vbseff_Vbulkp_sourcep=(-phis_Vbulkp_sourcep);
   10741                 :          0 : vbseff_Vsourceb_sourcep=(-phis_Vsourceb_sourcep);
   10742                 :            : #endif
   10743                 :          0 : vbseff=(phi-phis);
   10744                 :            : }
   10745                 :          0 : vfb=vfbcv;
   10746                 :            : #if defined(_DERIVATE)
   10747                 :          0 : vth_Vdrainp_sourcep=(k1ox*sqrtphis_Vdrainp_sourcep);
   10748                 :          0 : vth_Vdrainb_sourcep=(k1ox*sqrtphis_Vdrainb_sourcep);
   10749                 :          0 : vth_Vbulkp_sourcep=(k1ox*sqrtphis_Vbulkp_sourcep);
   10750                 :          0 : vth_Vsourceb_sourcep=(k1ox*sqrtphis_Vsourceb_sourcep);
   10751                 :            : #endif
   10752                 :          0 : vth=((vfb+phi)+(k1ox*sqrtphis));
   10753                 :            : #if defined(_DERIVATE)
   10754                 :          0 : vgst_Vgatep_sourcep=Vgs_eff_Vgatep_sourcep;
   10755                 :          0 : vgst_Vdrainp_sourcep=(Vgs_eff_Vdrainp_sourcep-vth_Vdrainp_sourcep);
   10756                 :          0 : vgst_Vdrainb_sourcep=(Vgs_eff_Vdrainb_sourcep-vth_Vdrainb_sourcep);
   10757                 :          0 : vgst_Vbulkp_sourcep=(Vgs_eff_Vbulkp_sourcep-vth_Vbulkp_sourcep);
   10758                 :          0 : vgst_Vsourceb_sourcep=(Vgs_eff_Vsourceb_sourcep-vth_Vsourceb_sourcep);
   10759                 :            : #endif
   10760                 :          0 : vgst=(Vgs_eff-vth);
   10761                 :          0 : coxwl=(((coxe*weffcv)*leffcv)*nf);
   10762                 :            : #if defined(_DERIVATE)
   10763                 :          0 : arg1_Vgatep_sourcep=Vgs_eff_Vgatep_sourcep;
   10764                 :          0 : arg1_Vdrainp_sourcep=(Vgs_eff_Vdrainp_sourcep-vbseff_Vdrainp_sourcep);
   10765                 :          0 : arg1_Vdrainb_sourcep=(Vgs_eff_Vdrainb_sourcep-vbseff_Vdrainb_sourcep);
   10766                 :          0 : arg1_Vbulkp_sourcep=(Vgs_eff_Vbulkp_sourcep-vbseff_Vbulkp_sourcep);
   10767                 :          0 : arg1_Vsourceb_sourcep=(Vgs_eff_Vsourceb_sourcep-vbseff_Vsourceb_sourcep);
   10768                 :            : #endif
   10769                 :          0 : arg1=((Vgs_eff-vbseff)-vfb);
   10770         [ #  # ]:          0 : if
   10771                 :            : (arg1<=0.0)
   10772                 :            : {
   10773                 :            : #if defined(_DERIVATE)
   10774                 :          0 : qgate_Vgatep_sourcep=(coxwl*arg1_Vgatep_sourcep);
   10775                 :          0 : qgate_Vdrainp_sourcep=(coxwl*arg1_Vdrainp_sourcep);
   10776                 :          0 : qgate_Vdrainb_sourcep=(coxwl*arg1_Vdrainb_sourcep);
   10777                 :          0 : qgate_Vbulkp_sourcep=(coxwl*arg1_Vbulkp_sourcep);
   10778                 :          0 : qgate_Vsourceb_sourcep=(coxwl*arg1_Vsourceb_sourcep);
   10779                 :            : #endif
   10780                 :          0 : qgate=(coxwl*arg1);
   10781                 :            : #if defined(_DERIVATE)
   10782                 :          0 : qbulk_Vgatem_sourcep=0.0;
   10783                 :          0 : qbulk_Vgatep_sourcep=(-qgate_Vgatep_sourcep);
   10784                 :          0 : qbulk_Vdrainp_sourcep=(-qgate_Vdrainp_sourcep);
   10785                 :          0 : qbulk_Vdrainb_sourcep=(-qgate_Vdrainb_sourcep);
   10786                 :          0 : qbulk_Vbulkp_sourcep=(-qgate_Vbulkp_sourcep);
   10787                 :          0 : qbulk_Vsourceb_sourcep=(-qgate_Vsourceb_sourcep);
   10788                 :            : #endif
   10789                 :          0 : qbulk=(-qgate);
   10790                 :            : #if defined(_DERIVATE)
   10791                 :          0 : qdrn_Vgatem_sourcep=0.0;
   10792                 :          0 : qdrn_Vgatep_sourcep=0.0;
   10793                 :          0 : qdrn_Vdrainp_sourcep=0.0;
   10794                 :          0 : qdrn_Vdrainb_sourcep=0.0;
   10795                 :          0 : qdrn_Vbulkp_sourcep=0.0;
   10796                 :          0 : qdrn_Vsourceb_sourcep=0.0;
   10797                 :            : #endif
   10798                 :          0 : qdrn=0.0;
   10799                 :            : }
   10800                 :            : else
   10801                 :            : {
   10802         [ #  # ]:          0 : if
   10803                 :            : (vgst<=0.0)
   10804                 :            : {
   10805                 :            : #if defined(_DERIVATE)
   10806                 :          0 : t1_Vgatep_sourcep=0.0;
   10807                 :          0 : t1_Vdrainp_sourcep=0.0;
   10808                 :          0 : t1_Vdrainb_sourcep=0.0;
   10809                 :          0 : t1_Vbulkp_sourcep=0.0;
   10810                 :          0 : t1_Vsourceb_sourcep=0.0;
   10811                 :            : #endif
   10812                 :          0 : t1=(0.5*k1ox);
   10813                 :            : {
   10814                 :          0 : double m00_sqrt(d00_sqrt0,((t1*t1)+arg1))
   10815                 :            : #if defined(_DERIVATE)
   10816                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t1*t1)+arg1))
   10817                 :            : #endif
   10818                 :            : #if defined(_DERIVATE)
   10819                 :          0 : t2_Vgatep_sourcep=(((t1_Vgatep_sourcep*t1)+(t1*t1_Vgatep_sourcep))+arg1_Vgatep_sourcep)*d10_sqrt0;
   10820                 :          0 : t2_Vdrainp_sourcep=(((t1_Vdrainp_sourcep*t1)+(t1*t1_Vdrainp_sourcep))+arg1_Vdrainp_sourcep)*d10_sqrt0;
   10821                 :          0 : t2_Vdrainb_sourcep=(((t1_Vdrainb_sourcep*t1)+(t1*t1_Vdrainb_sourcep))+arg1_Vdrainb_sourcep)*d10_sqrt0;
   10822                 :          0 : t2_Vbulkp_sourcep=(((t1_Vbulkp_sourcep*t1)+(t1*t1_Vbulkp_sourcep))+arg1_Vbulkp_sourcep)*d10_sqrt0;
   10823                 :          0 : t2_Vsourceb_sourcep=(((t1_Vsourceb_sourcep*t1)+(t1*t1_Vsourceb_sourcep))+arg1_Vsourceb_sourcep)*d10_sqrt0;
   10824                 :            : #endif
   10825                 :          0 : t2=d00_sqrt0;
   10826                 :            : }
   10827                 :            : #if defined(_DERIVATE)
   10828                 :          0 : qgate_Vgatep_sourcep=((coxwl*k1ox)*(t2_Vgatep_sourcep-t1_Vgatep_sourcep));
   10829                 :          0 : qgate_Vdrainp_sourcep=((coxwl*k1ox)*(t2_Vdrainp_sourcep-t1_Vdrainp_sourcep));
   10830                 :          0 : qgate_Vdrainb_sourcep=((coxwl*k1ox)*(t2_Vdrainb_sourcep-t1_Vdrainb_sourcep));
   10831                 :          0 : qgate_Vbulkp_sourcep=((coxwl*k1ox)*(t2_Vbulkp_sourcep-t1_Vbulkp_sourcep));
   10832                 :          0 : qgate_Vsourceb_sourcep=((coxwl*k1ox)*(t2_Vsourceb_sourcep-t1_Vsourceb_sourcep));
   10833                 :            : #endif
   10834                 :          0 : qgate=((coxwl*k1ox)*(t2-t1));
   10835                 :            : #if defined(_DERIVATE)
   10836                 :          0 : qbulk_Vgatem_sourcep=0.0;
   10837                 :          0 : qbulk_Vgatep_sourcep=(-qgate_Vgatep_sourcep);
   10838                 :          0 : qbulk_Vdrainp_sourcep=(-qgate_Vdrainp_sourcep);
   10839                 :          0 : qbulk_Vdrainb_sourcep=(-qgate_Vdrainb_sourcep);
   10840                 :          0 : qbulk_Vbulkp_sourcep=(-qgate_Vbulkp_sourcep);
   10841                 :          0 : qbulk_Vsourceb_sourcep=(-qgate_Vsourceb_sourcep);
   10842                 :            : #endif
   10843                 :          0 : qbulk=(-qgate);
   10844                 :            : #if defined(_DERIVATE)
   10845                 :          0 : qdrn_Vgatem_sourcep=0.0;
   10846                 :          0 : qdrn_Vgatep_sourcep=0.0;
   10847                 :          0 : qdrn_Vdrainp_sourcep=0.0;
   10848                 :          0 : qdrn_Vdrainb_sourcep=0.0;
   10849                 :          0 : qdrn_Vbulkp_sourcep=0.0;
   10850                 :          0 : qdrn_Vsourceb_sourcep=0.0;
   10851                 :            : #endif
   10852                 :          0 : qdrn=0.0;
   10853                 :            : }
   10854                 :            : else
   10855                 :            : {
   10856                 :          0 : two_third_coxwl=((2.0*(((coxe*weffcv)*leffcv)*nf))/3.0);
   10857                 :            : #if defined(_DERIVATE)
   10858                 :          0 : abulkcv_Vgatep_sourcep=abulk0_Vgatep_sourcep*abulkcvfactor;
   10859                 :          0 : abulkcv_Vdrainp_sourcep=abulk0_Vdrainp_sourcep*abulkcvfactor;
   10860                 :          0 : abulkcv_Vdrainb_sourcep=abulk0_Vdrainb_sourcep*abulkcvfactor;
   10861                 :          0 : abulkcv_Vbulkp_sourcep=abulk0_Vbulkp_sourcep*abulkcvfactor;
   10862                 :          0 : abulkcv_Vsourceb_sourcep=abulk0_Vsourceb_sourcep*abulkcvfactor;
   10863                 :            : #endif
   10864                 :          0 : abulkcv=(abulk0*abulkcvfactor);
   10865                 :            : #if defined(_DERIVATE)
   10866                 :          0 : vdsat_Vgatep_sourcep=((vgst_Vgatep_sourcep*abulkcv-vgst*abulkcv_Vgatep_sourcep)/abulkcv/abulkcv);
   10867                 :          0 : vdsat_Vdrainp_sourcep=((vgst_Vdrainp_sourcep*abulkcv-vgst*abulkcv_Vdrainp_sourcep)/abulkcv/abulkcv);
   10868                 :          0 : vdsat_Vdrainb_sourcep=((vgst_Vdrainb_sourcep*abulkcv-vgst*abulkcv_Vdrainb_sourcep)/abulkcv/abulkcv);
   10869                 :          0 : vdsat_Vbulkp_sourcep=((vgst_Vbulkp_sourcep*abulkcv-vgst*abulkcv_Vbulkp_sourcep)/abulkcv/abulkcv);
   10870                 :          0 : vdsat_Vsourceb_sourcep=((vgst_Vsourceb_sourcep*abulkcv-vgst*abulkcv_Vsourceb_sourcep)/abulkcv/abulkcv);
   10871                 :            : #endif
   10872                 :          0 : vdsat=(vgst/abulkcv);
   10873         [ #  # ]:          0 : if
   10874                 :            : (xpart>0.5)
   10875                 :            : {
   10876         [ #  # ]:          0 : if
   10877                 :            : (vdsat<=Vds)
   10878                 :            : {
   10879                 :            : #if defined(_DERIVATE)
   10880                 :          0 : t1_Vgatep_sourcep=(vdsat_Vgatep_sourcep/3.0);
   10881                 :          0 : t1_Vdrainp_sourcep=(vdsat_Vdrainp_sourcep/3.0);
   10882                 :          0 : t1_Vdrainb_sourcep=(vdsat_Vdrainb_sourcep/3.0);
   10883                 :          0 : t1_Vbulkp_sourcep=(vdsat_Vbulkp_sourcep/3.0);
   10884                 :          0 : t1_Vsourceb_sourcep=(vdsat_Vsourceb_sourcep/3.0);
   10885                 :            : #endif
   10886                 :          0 : t1=(vdsat/3.0);
   10887                 :            : #if defined(_DERIVATE)
   10888                 :          0 : qgate_Vgatep_sourcep=(coxwl*(Vgs_eff_Vgatep_sourcep-t1_Vgatep_sourcep));
   10889                 :          0 : qgate_Vdrainp_sourcep=(coxwl*(Vgs_eff_Vdrainp_sourcep-t1_Vdrainp_sourcep));
   10890                 :          0 : qgate_Vdrainb_sourcep=(coxwl*(Vgs_eff_Vdrainb_sourcep-t1_Vdrainb_sourcep));
   10891                 :          0 : qgate_Vbulkp_sourcep=(coxwl*(Vgs_eff_Vbulkp_sourcep-t1_Vbulkp_sourcep));
   10892                 :          0 : qgate_Vsourceb_sourcep=(coxwl*(Vgs_eff_Vsourceb_sourcep-t1_Vsourceb_sourcep));
   10893                 :            : #endif
   10894                 :          0 : qgate=(coxwl*(((Vgs_eff-vfb)-phi)-t1));
   10895                 :            : #if defined(_DERIVATE)
   10896                 :          0 : t2_Vgatep_sourcep=((-two_third_coxwl)*vgst_Vgatep_sourcep);
   10897                 :          0 : t2_Vdrainp_sourcep=((-two_third_coxwl)*vgst_Vdrainp_sourcep);
   10898                 :          0 : t2_Vdrainb_sourcep=((-two_third_coxwl)*vgst_Vdrainb_sourcep);
   10899                 :          0 : t2_Vbulkp_sourcep=((-two_third_coxwl)*vgst_Vbulkp_sourcep);
   10900                 :          0 : t2_Vsourceb_sourcep=((-two_third_coxwl)*vgst_Vsourceb_sourcep);
   10901                 :            : #endif
   10902                 :          0 : t2=((-two_third_coxwl)*vgst);
   10903                 :            : #if defined(_DERIVATE)
   10904                 :          0 : qbulk_Vgatem_sourcep=0.0;
   10905                 :          0 : qbulk_Vgatep_sourcep=(-(qgate_Vgatep_sourcep+t2_Vgatep_sourcep));
   10906                 :          0 : qbulk_Vdrainp_sourcep=(-(qgate_Vdrainp_sourcep+t2_Vdrainp_sourcep));
   10907                 :          0 : qbulk_Vdrainb_sourcep=(-(qgate_Vdrainb_sourcep+t2_Vdrainb_sourcep));
   10908                 :          0 : qbulk_Vbulkp_sourcep=(-(qgate_Vbulkp_sourcep+t2_Vbulkp_sourcep));
   10909                 :          0 : qbulk_Vsourceb_sourcep=(-(qgate_Vsourceb_sourcep+t2_Vsourceb_sourcep));
   10910                 :            : #endif
   10911                 :          0 : qbulk=(-(qgate+t2));
   10912                 :            : #if defined(_DERIVATE)
   10913                 :          0 : qdrn_Vgatem_sourcep=0.0;
   10914                 :          0 : qdrn_Vgatep_sourcep=0.0;
   10915                 :          0 : qdrn_Vdrainp_sourcep=0.0;
   10916                 :          0 : qdrn_Vdrainb_sourcep=0.0;
   10917                 :          0 : qdrn_Vbulkp_sourcep=0.0;
   10918                 :          0 : qdrn_Vsourceb_sourcep=0.0;
   10919                 :            : #endif
   10920                 :          0 : qdrn=0.0;
   10921                 :            : }
   10922                 :            : else
   10923                 :            : {
   10924                 :            : #if defined(_DERIVATE)
   10925                 :          0 : alphaz_Vgatep_sourcep=((vgst_Vgatep_sourcep*vdsat-vgst*vdsat_Vgatep_sourcep)/vdsat/vdsat);
   10926                 :          0 : alphaz_Vdrainp_sourcep=((vgst_Vdrainp_sourcep*vdsat-vgst*vdsat_Vdrainp_sourcep)/vdsat/vdsat);
   10927                 :          0 : alphaz_Vdrainb_sourcep=((vgst_Vdrainb_sourcep*vdsat-vgst*vdsat_Vdrainb_sourcep)/vdsat/vdsat);
   10928                 :          0 : alphaz_Vbulkp_sourcep=((vgst_Vbulkp_sourcep*vdsat-vgst*vdsat_Vbulkp_sourcep)/vdsat/vdsat);
   10929                 :          0 : alphaz_Vsourceb_sourcep=((vgst_Vsourceb_sourcep*vdsat-vgst*vdsat_Vsourceb_sourcep)/vdsat/vdsat);
   10930                 :            : #endif
   10931                 :          0 : alphaz=(vgst/vdsat);
   10932                 :            : #if defined(_DERIVATE)
   10933                 :          0 : t1_Vgatep_sourcep=(2.0*vdsat_Vgatep_sourcep);
   10934                 :          0 : t1_Vdrainp_sourcep=((2.0*vdsat_Vdrainp_sourcep)-Vds_Vdrainp_sourcep);
   10935                 :          0 : t1_Vdrainb_sourcep=(2.0*vdsat_Vdrainb_sourcep);
   10936                 :          0 : t1_Vbulkp_sourcep=(2.0*vdsat_Vbulkp_sourcep);
   10937                 :          0 : t1_Vsourceb_sourcep=(2.0*vdsat_Vsourceb_sourcep);
   10938                 :            : #endif
   10939                 :          0 : t1=((2.0*vdsat)-Vds);
   10940                 :            : #if defined(_DERIVATE)
   10941                 :          0 : t2_Vgatep_sourcep=(-Vds*(3.0*t1_Vgatep_sourcep)/(3.0*t1)/(3.0*t1));
   10942                 :          0 : t2_Vdrainp_sourcep=((Vds_Vdrainp_sourcep*(3.0*t1)-Vds*(3.0*t1_Vdrainp_sourcep))/(3.0*t1)/(3.0*t1));
   10943                 :          0 : t2_Vdrainb_sourcep=(-Vds*(3.0*t1_Vdrainb_sourcep)/(3.0*t1)/(3.0*t1));
   10944                 :          0 : t2_Vbulkp_sourcep=(-Vds*(3.0*t1_Vbulkp_sourcep)/(3.0*t1)/(3.0*t1));
   10945                 :          0 : t2_Vsourceb_sourcep=(-Vds*(3.0*t1_Vsourceb_sourcep)/(3.0*t1)/(3.0*t1));
   10946                 :            : #endif
   10947                 :          0 : t2=(Vds/(3.0*t1));
   10948                 :            : #if defined(_DERIVATE)
   10949                 :          0 : t3_Vgatep_sourcep=t2_Vgatep_sourcep*Vds;
   10950                 :          0 : t3_Vdrainp_sourcep=((t2_Vdrainp_sourcep*Vds)+(t2*Vds_Vdrainp_sourcep));
   10951                 :          0 : t3_Vdrainb_sourcep=t2_Vdrainb_sourcep*Vds;
   10952                 :          0 : t3_Vbulkp_sourcep=t2_Vbulkp_sourcep*Vds;
   10953                 :          0 : t3_Vsourceb_sourcep=t2_Vsourceb_sourcep*Vds;
   10954                 :            : #endif
   10955                 :          0 : t3=(t2*Vds);
   10956                 :            : #if defined(_DERIVATE)
   10957                 :          0 : t9_Vgatep_sourcep=0.0;
   10958                 :          0 : t9_Vdrainp_sourcep=0.0;
   10959                 :          0 : t9_Vdrainb_sourcep=0.0;
   10960                 :          0 : t9_Vbulkp_sourcep=0.0;
   10961                 :          0 : t9_Vsourceb_sourcep=0.0;
   10962                 :            : #endif
   10963                 :          0 : t9=(0.25*coxwl);
   10964                 :            : #if defined(_DERIVATE)
   10965                 :          0 : t4_Vgatep_sourcep=((t9_Vgatep_sourcep*alphaz)+(t9*alphaz_Vgatep_sourcep));
   10966                 :          0 : t4_Vdrainp_sourcep=((t9_Vdrainp_sourcep*alphaz)+(t9*alphaz_Vdrainp_sourcep));
   10967                 :          0 : t4_Vdrainb_sourcep=((t9_Vdrainb_sourcep*alphaz)+(t9*alphaz_Vdrainb_sourcep));
   10968                 :          0 : t4_Vbulkp_sourcep=((t9_Vbulkp_sourcep*alphaz)+(t9*alphaz_Vbulkp_sourcep));
   10969                 :          0 : t4_Vsourceb_sourcep=((t9_Vsourceb_sourcep*alphaz)+(t9*alphaz_Vsourceb_sourcep));
   10970                 :            : #endif
   10971                 :          0 : t4=(t9*alphaz);
   10972                 :            : #if defined(_DERIVATE)
   10973                 :          0 : t7_Vgatep_sourcep=((-t1_Vgatep_sourcep)-(3.0*t3_Vgatep_sourcep));
   10974                 :          0 : t7_Vdrainp_sourcep=(((2.0*Vds_Vdrainp_sourcep)-t1_Vdrainp_sourcep)-(3.0*t3_Vdrainp_sourcep));
   10975                 :          0 : t7_Vdrainb_sourcep=((-t1_Vdrainb_sourcep)-(3.0*t3_Vdrainb_sourcep));
   10976                 :          0 : t7_Vbulkp_sourcep=((-t1_Vbulkp_sourcep)-(3.0*t3_Vbulkp_sourcep));
   10977                 :          0 : t7_Vsourceb_sourcep=((-t1_Vsourceb_sourcep)-(3.0*t3_Vsourceb_sourcep));
   10978                 :            : #endif
   10979                 :          0 : t7=(((2.0*Vds)-t1)-(3.0*t3));
   10980                 :            : #if defined(_DERIVATE)
   10981                 :          0 : t8_Vgatep_sourcep=(t3_Vgatep_sourcep-t1_Vgatep_sourcep);
   10982                 :          0 : t8_Vdrainp_sourcep=((t3_Vdrainp_sourcep-t1_Vdrainp_sourcep)-(2.0*Vds_Vdrainp_sourcep));
   10983                 :          0 : t8_Vdrainb_sourcep=(t3_Vdrainb_sourcep-t1_Vdrainb_sourcep);
   10984                 :          0 : t8_Vbulkp_sourcep=(t3_Vbulkp_sourcep-t1_Vbulkp_sourcep);
   10985                 :          0 : t8_Vsourceb_sourcep=(t3_Vsourceb_sourcep-t1_Vsourceb_sourcep);
   10986                 :            : #endif
   10987                 :          0 : t8=((t3-t1)-(2.0*Vds));
   10988                 :            : #if defined(_DERIVATE)
   10989                 :          0 : qgate_Vgatep_sourcep=(coxwl*(Vgs_eff_Vgatep_sourcep-(0.5*(-t3_Vgatep_sourcep))));
   10990                 :          0 : qgate_Vdrainp_sourcep=(coxwl*(Vgs_eff_Vdrainp_sourcep-(0.5*(Vds_Vdrainp_sourcep-t3_Vdrainp_sourcep))));
   10991                 :          0 : qgate_Vdrainb_sourcep=(coxwl*(Vgs_eff_Vdrainb_sourcep-(0.5*(-t3_Vdrainb_sourcep))));
   10992                 :          0 : qgate_Vbulkp_sourcep=(coxwl*(Vgs_eff_Vbulkp_sourcep-(0.5*(-t3_Vbulkp_sourcep))));
   10993                 :          0 : qgate_Vsourceb_sourcep=(coxwl*(Vgs_eff_Vsourceb_sourcep-(0.5*(-t3_Vsourceb_sourcep))));
   10994                 :            : #endif
   10995                 :          0 : qgate=(coxwl*(((Vgs_eff-vfb)-phi)-(0.5*(Vds-t3))));
   10996                 :            : #if defined(_DERIVATE)
   10997                 :          0 : t10_Vgatep_sourcep=((t4_Vgatep_sourcep*t8)+(t4*t8_Vgatep_sourcep));
   10998                 :          0 : t10_Vdrainp_sourcep=((t4_Vdrainp_sourcep*t8)+(t4*t8_Vdrainp_sourcep));
   10999                 :          0 : t10_Vdrainb_sourcep=((t4_Vdrainb_sourcep*t8)+(t4*t8_Vdrainb_sourcep));
   11000                 :          0 : t10_Vbulkp_sourcep=((t4_Vbulkp_sourcep*t8)+(t4*t8_Vbulkp_sourcep));
   11001                 :          0 : t10_Vsourceb_sourcep=((t4_Vsourceb_sourcep*t8)+(t4*t8_Vsourceb_sourcep));
   11002                 :            : #endif
   11003                 :          0 : t10=(t4*t8);
   11004                 :            : #if defined(_DERIVATE)
   11005                 :          0 : qdrn_Vgatem_sourcep=0.0;
   11006                 :          0 : qdrn_Vgatep_sourcep=((t4_Vgatep_sourcep*t7)+(t4*t7_Vgatep_sourcep));
   11007                 :          0 : qdrn_Vdrainp_sourcep=((t4_Vdrainp_sourcep*t7)+(t4*t7_Vdrainp_sourcep));
   11008                 :          0 : qdrn_Vdrainb_sourcep=((t4_Vdrainb_sourcep*t7)+(t4*t7_Vdrainb_sourcep));
   11009                 :          0 : qdrn_Vbulkp_sourcep=((t4_Vbulkp_sourcep*t7)+(t4*t7_Vbulkp_sourcep));
   11010                 :          0 : qdrn_Vsourceb_sourcep=((t4_Vsourceb_sourcep*t7)+(t4*t7_Vsourceb_sourcep));
   11011                 :            : #endif
   11012                 :          0 : qdrn=(t4*t7);
   11013                 :            : #if defined(_DERIVATE)
   11014                 :          0 : qbulk_Vgatem_sourcep=0.0;
   11015                 :          0 : qbulk_Vgatep_sourcep=(-((qgate_Vgatep_sourcep+qdrn_Vgatep_sourcep)+t10_Vgatep_sourcep));
   11016                 :          0 : qbulk_Vdrainp_sourcep=(-((qgate_Vdrainp_sourcep+qdrn_Vdrainp_sourcep)+t10_Vdrainp_sourcep));
   11017                 :          0 : qbulk_Vdrainb_sourcep=(-((qgate_Vdrainb_sourcep+qdrn_Vdrainb_sourcep)+t10_Vdrainb_sourcep));
   11018                 :          0 : qbulk_Vbulkp_sourcep=(-((qgate_Vbulkp_sourcep+qdrn_Vbulkp_sourcep)+t10_Vbulkp_sourcep));
   11019                 :          0 : qbulk_Vsourceb_sourcep=(-((qgate_Vsourceb_sourcep+qdrn_Vsourceb_sourcep)+t10_Vsourceb_sourcep));
   11020                 :            : #endif
   11021                 :          0 : qbulk=(-((qgate+qdrn)+t10));
   11022                 :            : }
   11023                 :            : }
   11024                 :            : else
   11025                 :            : {
   11026         [ #  # ]:          0 : if
   11027                 :            : (xpart<0.5)
   11028                 :            : {
   11029         [ #  # ]:          0 : if
   11030                 :            : (Vds>=vdsat)
   11031                 :            : {
   11032                 :            : #if defined(_DERIVATE)
   11033                 :          0 : t1_Vgatep_sourcep=(vdsat_Vgatep_sourcep/3.0);
   11034                 :          0 : t1_Vdrainp_sourcep=(vdsat_Vdrainp_sourcep/3.0);
   11035                 :          0 : t1_Vdrainb_sourcep=(vdsat_Vdrainb_sourcep/3.0);
   11036                 :          0 : t1_Vbulkp_sourcep=(vdsat_Vbulkp_sourcep/3.0);
   11037                 :          0 : t1_Vsourceb_sourcep=(vdsat_Vsourceb_sourcep/3.0);
   11038                 :            : #endif
   11039                 :          0 : t1=(vdsat/3.0);
   11040                 :            : #if defined(_DERIVATE)
   11041                 :          0 : qgate_Vgatep_sourcep=(coxwl*(Vgs_eff_Vgatep_sourcep-t1_Vgatep_sourcep));
   11042                 :          0 : qgate_Vdrainp_sourcep=(coxwl*(Vgs_eff_Vdrainp_sourcep-t1_Vdrainp_sourcep));
   11043                 :          0 : qgate_Vdrainb_sourcep=(coxwl*(Vgs_eff_Vdrainb_sourcep-t1_Vdrainb_sourcep));
   11044                 :          0 : qgate_Vbulkp_sourcep=(coxwl*(Vgs_eff_Vbulkp_sourcep-t1_Vbulkp_sourcep));
   11045                 :          0 : qgate_Vsourceb_sourcep=(coxwl*(Vgs_eff_Vsourceb_sourcep-t1_Vsourceb_sourcep));
   11046                 :            : #endif
   11047                 :          0 : qgate=(coxwl*(((Vgs_eff-vfb)-phi)-t1));
   11048                 :            : #if defined(_DERIVATE)
   11049                 :          0 : t2_Vgatep_sourcep=((-two_third_coxwl)*vgst_Vgatep_sourcep);
   11050                 :          0 : t2_Vdrainp_sourcep=((-two_third_coxwl)*vgst_Vdrainp_sourcep);
   11051                 :          0 : t2_Vdrainb_sourcep=((-two_third_coxwl)*vgst_Vdrainb_sourcep);
   11052                 :          0 : t2_Vbulkp_sourcep=((-two_third_coxwl)*vgst_Vbulkp_sourcep);
   11053                 :          0 : t2_Vsourceb_sourcep=((-two_third_coxwl)*vgst_Vsourceb_sourcep);
   11054                 :            : #endif
   11055                 :          0 : t2=((-two_third_coxwl)*vgst);
   11056                 :            : #if defined(_DERIVATE)
   11057                 :          0 : qbulk_Vgatem_sourcep=0.0;
   11058                 :          0 : qbulk_Vgatep_sourcep=(-(qgate_Vgatep_sourcep+t2_Vgatep_sourcep));
   11059                 :          0 : qbulk_Vdrainp_sourcep=(-(qgate_Vdrainp_sourcep+t2_Vdrainp_sourcep));
   11060                 :          0 : qbulk_Vdrainb_sourcep=(-(qgate_Vdrainb_sourcep+t2_Vdrainb_sourcep));
   11061                 :          0 : qbulk_Vbulkp_sourcep=(-(qgate_Vbulkp_sourcep+t2_Vbulkp_sourcep));
   11062                 :          0 : qbulk_Vsourceb_sourcep=(-(qgate_Vsourceb_sourcep+t2_Vsourceb_sourcep));
   11063                 :            : #endif
   11064                 :          0 : qbulk=(-(qgate+t2));
   11065                 :            : #if defined(_DERIVATE)
   11066                 :          0 : qdrn_Vgatem_sourcep=0.0;
   11067                 :          0 : qdrn_Vgatep_sourcep=(0.4*t2_Vgatep_sourcep);
   11068                 :          0 : qdrn_Vdrainp_sourcep=(0.4*t2_Vdrainp_sourcep);
   11069                 :          0 : qdrn_Vdrainb_sourcep=(0.4*t2_Vdrainb_sourcep);
   11070                 :          0 : qdrn_Vbulkp_sourcep=(0.4*t2_Vbulkp_sourcep);
   11071                 :          0 : qdrn_Vsourceb_sourcep=(0.4*t2_Vsourceb_sourcep);
   11072                 :            : #endif
   11073                 :          0 : qdrn=(0.4*t2);
   11074                 :            : }
   11075                 :            : else
   11076                 :            : {
   11077                 :            : #if defined(_DERIVATE)
   11078                 :          0 : alphaz_Vgatep_sourcep=((vgst_Vgatep_sourcep*vdsat-vgst*vdsat_Vgatep_sourcep)/vdsat/vdsat);
   11079                 :          0 : alphaz_Vdrainp_sourcep=((vgst_Vdrainp_sourcep*vdsat-vgst*vdsat_Vdrainp_sourcep)/vdsat/vdsat);
   11080                 :          0 : alphaz_Vdrainb_sourcep=((vgst_Vdrainb_sourcep*vdsat-vgst*vdsat_Vdrainb_sourcep)/vdsat/vdsat);
   11081                 :          0 : alphaz_Vbulkp_sourcep=((vgst_Vbulkp_sourcep*vdsat-vgst*vdsat_Vbulkp_sourcep)/vdsat/vdsat);
   11082                 :          0 : alphaz_Vsourceb_sourcep=((vgst_Vsourceb_sourcep*vdsat-vgst*vdsat_Vsourceb_sourcep)/vdsat/vdsat);
   11083                 :            : #endif
   11084                 :          0 : alphaz=(vgst/vdsat);
   11085                 :            : #if defined(_DERIVATE)
   11086                 :          0 : t1_Vgatep_sourcep=(2.0*vdsat_Vgatep_sourcep);
   11087                 :          0 : t1_Vdrainp_sourcep=((2.0*vdsat_Vdrainp_sourcep)-Vds_Vdrainp_sourcep);
   11088                 :          0 : t1_Vdrainb_sourcep=(2.0*vdsat_Vdrainb_sourcep);
   11089                 :          0 : t1_Vbulkp_sourcep=(2.0*vdsat_Vbulkp_sourcep);
   11090                 :          0 : t1_Vsourceb_sourcep=(2.0*vdsat_Vsourceb_sourcep);
   11091                 :            : #endif
   11092                 :          0 : t1=((2.0*vdsat)-Vds);
   11093                 :            : #if defined(_DERIVATE)
   11094                 :          0 : t2_Vgatep_sourcep=(-Vds*(3.0*t1_Vgatep_sourcep)/(3.0*t1)/(3.0*t1));
   11095                 :          0 : t2_Vdrainp_sourcep=((Vds_Vdrainp_sourcep*(3.0*t1)-Vds*(3.0*t1_Vdrainp_sourcep))/(3.0*t1)/(3.0*t1));
   11096                 :          0 : t2_Vdrainb_sourcep=(-Vds*(3.0*t1_Vdrainb_sourcep)/(3.0*t1)/(3.0*t1));
   11097                 :          0 : t2_Vbulkp_sourcep=(-Vds*(3.0*t1_Vbulkp_sourcep)/(3.0*t1)/(3.0*t1));
   11098                 :          0 : t2_Vsourceb_sourcep=(-Vds*(3.0*t1_Vsourceb_sourcep)/(3.0*t1)/(3.0*t1));
   11099                 :            : #endif
   11100                 :          0 : t2=(Vds/(3.0*t1));
   11101                 :            : #if defined(_DERIVATE)
   11102                 :          0 : t3_Vgatep_sourcep=t2_Vgatep_sourcep*Vds;
   11103                 :          0 : t3_Vdrainp_sourcep=((t2_Vdrainp_sourcep*Vds)+(t2*Vds_Vdrainp_sourcep));
   11104                 :          0 : t3_Vdrainb_sourcep=t2_Vdrainb_sourcep*Vds;
   11105                 :          0 : t3_Vbulkp_sourcep=t2_Vbulkp_sourcep*Vds;
   11106                 :          0 : t3_Vsourceb_sourcep=t2_Vsourceb_sourcep*Vds;
   11107                 :            : #endif
   11108                 :          0 : t3=(t2*Vds);
   11109                 :            : #if defined(_DERIVATE)
   11110                 :          0 : t9_Vgatep_sourcep=0.0;
   11111                 :          0 : t9_Vdrainp_sourcep=0.0;
   11112                 :          0 : t9_Vdrainb_sourcep=0.0;
   11113                 :          0 : t9_Vbulkp_sourcep=0.0;
   11114                 :          0 : t9_Vsourceb_sourcep=0.0;
   11115                 :            : #endif
   11116                 :          0 : t9=(0.25*coxwl);
   11117                 :            : #if defined(_DERIVATE)
   11118                 :          0 : t4_Vgatep_sourcep=((t9_Vgatep_sourcep*alphaz)+(t9*alphaz_Vgatep_sourcep));
   11119                 :          0 : t4_Vdrainp_sourcep=((t9_Vdrainp_sourcep*alphaz)+(t9*alphaz_Vdrainp_sourcep));
   11120                 :          0 : t4_Vdrainb_sourcep=((t9_Vdrainb_sourcep*alphaz)+(t9*alphaz_Vdrainb_sourcep));
   11121                 :          0 : t4_Vbulkp_sourcep=((t9_Vbulkp_sourcep*alphaz)+(t9*alphaz_Vbulkp_sourcep));
   11122                 :          0 : t4_Vsourceb_sourcep=((t9_Vsourceb_sourcep*alphaz)+(t9*alphaz_Vsourceb_sourcep));
   11123                 :            : #endif
   11124                 :          0 : t4=(t9*alphaz);
   11125                 :            : #if defined(_DERIVATE)
   11126                 :          0 : qgate_Vgatep_sourcep=(coxwl*(Vgs_eff_Vgatep_sourcep-(0.5*(-t3_Vgatep_sourcep))));
   11127                 :          0 : qgate_Vdrainp_sourcep=(coxwl*(Vgs_eff_Vdrainp_sourcep-(0.5*(Vds_Vdrainp_sourcep-t3_Vdrainp_sourcep))));
   11128                 :          0 : qgate_Vdrainb_sourcep=(coxwl*(Vgs_eff_Vdrainb_sourcep-(0.5*(-t3_Vdrainb_sourcep))));
   11129                 :          0 : qgate_Vbulkp_sourcep=(coxwl*(Vgs_eff_Vbulkp_sourcep-(0.5*(-t3_Vbulkp_sourcep))));
   11130                 :          0 : qgate_Vsourceb_sourcep=(coxwl*(Vgs_eff_Vsourceb_sourcep-(0.5*(-t3_Vsourceb_sourcep))));
   11131                 :            : #endif
   11132                 :          0 : qgate=(coxwl*(((Vgs_eff-vfb)-phi)-(0.5*(Vds-t3))));
   11133                 :            : #if defined(_DERIVATE)
   11134                 :          0 : t6_Vgatep_sourcep=((((8.0*vdsat_Vgatep_sourcep)*vdsat)+((8.0*vdsat)*vdsat_Vgatep_sourcep))-(6.0*vdsat_Vgatep_sourcep)*Vds);
   11135                 :          0 : t6_Vdrainp_sourcep=(((((8.0*vdsat_Vdrainp_sourcep)*vdsat)+((8.0*vdsat)*vdsat_Vdrainp_sourcep))-(((6.0*vdsat_Vdrainp_sourcep)*Vds)+((6.0*vdsat)*Vds_Vdrainp_sourcep)))+(((1.2*Vds_Vdrainp_sourcep)*Vds)+((1.2*Vds)*Vds_Vdrainp_sourcep)));
   11136                 :          0 : t6_Vdrainb_sourcep=((((8.0*vdsat_Vdrainb_sourcep)*vdsat)+((8.0*vdsat)*vdsat_Vdrainb_sourcep))-(6.0*vdsat_Vdrainb_sourcep)*Vds);
   11137                 :          0 : t6_Vbulkp_sourcep=((((8.0*vdsat_Vbulkp_sourcep)*vdsat)+((8.0*vdsat)*vdsat_Vbulkp_sourcep))-(6.0*vdsat_Vbulkp_sourcep)*Vds);
   11138                 :          0 : t6_Vsourceb_sourcep=((((8.0*vdsat_Vsourceb_sourcep)*vdsat)+((8.0*vdsat)*vdsat_Vsourceb_sourcep))-(6.0*vdsat_Vsourceb_sourcep)*Vds);
   11139                 :            : #endif
   11140                 :          0 : t6=((((8.0*vdsat)*vdsat)-((6.0*vdsat)*Vds))+((1.2*Vds)*Vds));
   11141                 :            : #if defined(_DERIVATE)
   11142                 :          0 : t8_Vgatep_sourcep=((t2_Vgatep_sourcep*t1-t2*t1_Vgatep_sourcep)/t1/t1);
   11143                 :          0 : t8_Vdrainp_sourcep=((t2_Vdrainp_sourcep*t1-t2*t1_Vdrainp_sourcep)/t1/t1);
   11144                 :          0 : t8_Vdrainb_sourcep=((t2_Vdrainb_sourcep*t1-t2*t1_Vdrainb_sourcep)/t1/t1);
   11145                 :          0 : t8_Vbulkp_sourcep=((t2_Vbulkp_sourcep*t1-t2*t1_Vbulkp_sourcep)/t1/t1);
   11146                 :          0 : t8_Vsourceb_sourcep=((t2_Vsourceb_sourcep*t1-t2*t1_Vsourceb_sourcep)/t1/t1);
   11147                 :            : #endif
   11148                 :          0 : t8=(t2/t1);
   11149                 :            : #if defined(_DERIVATE)
   11150                 :          0 : t7_Vgatep_sourcep=((-t1_Vgatep_sourcep)-((t8_Vgatep_sourcep*t6)+(t8*t6_Vgatep_sourcep)));
   11151                 :          0 : t7_Vdrainp_sourcep=((Vds_Vdrainp_sourcep-t1_Vdrainp_sourcep)-((t8_Vdrainp_sourcep*t6)+(t8*t6_Vdrainp_sourcep)));
   11152                 :          0 : t7_Vdrainb_sourcep=((-t1_Vdrainb_sourcep)-((t8_Vdrainb_sourcep*t6)+(t8*t6_Vdrainb_sourcep)));
   11153                 :          0 : t7_Vbulkp_sourcep=((-t1_Vbulkp_sourcep)-((t8_Vbulkp_sourcep*t6)+(t8*t6_Vbulkp_sourcep)));
   11154                 :          0 : t7_Vsourceb_sourcep=((-t1_Vsourceb_sourcep)-((t8_Vsourceb_sourcep*t6)+(t8*t6_Vsourceb_sourcep)));
   11155                 :            : #endif
   11156                 :          0 : t7=((Vds-t1)-(t8*t6));
   11157                 :            : #if defined(_DERIVATE)
   11158                 :          0 : qdrn_Vgatem_sourcep=0.0;
   11159                 :          0 : qdrn_Vgatep_sourcep=((t4_Vgatep_sourcep*t7)+(t4*t7_Vgatep_sourcep));
   11160                 :          0 : qdrn_Vdrainp_sourcep=((t4_Vdrainp_sourcep*t7)+(t4*t7_Vdrainp_sourcep));
   11161                 :          0 : qdrn_Vdrainb_sourcep=((t4_Vdrainb_sourcep*t7)+(t4*t7_Vdrainb_sourcep));
   11162                 :          0 : qdrn_Vbulkp_sourcep=((t4_Vbulkp_sourcep*t7)+(t4*t7_Vbulkp_sourcep));
   11163                 :          0 : qdrn_Vsourceb_sourcep=((t4_Vsourceb_sourcep*t7)+(t4*t7_Vsourceb_sourcep));
   11164                 :            : #endif
   11165                 :          0 : qdrn=(t4*t7);
   11166                 :            : #if defined(_DERIVATE)
   11167                 :          0 : t7_Vgatep_sourcep=(2.0*(t1_Vgatep_sourcep+t3_Vgatep_sourcep));
   11168                 :          0 : t7_Vdrainp_sourcep=(2.0*(t1_Vdrainp_sourcep+t3_Vdrainp_sourcep));
   11169                 :          0 : t7_Vdrainb_sourcep=(2.0*(t1_Vdrainb_sourcep+t3_Vdrainb_sourcep));
   11170                 :          0 : t7_Vbulkp_sourcep=(2.0*(t1_Vbulkp_sourcep+t3_Vbulkp_sourcep));
   11171                 :          0 : t7_Vsourceb_sourcep=(2.0*(t1_Vsourceb_sourcep+t3_Vsourceb_sourcep));
   11172                 :            : #endif
   11173                 :          0 : t7=(2.0*(t1+t3));
   11174                 :            : #if defined(_DERIVATE)
   11175                 :          0 : qbulk_Vgatem_sourcep=0.0;
   11176                 :          0 : qbulk_Vgatep_sourcep=(-(qgate_Vgatep_sourcep-((t4_Vgatep_sourcep*t7)+(t4*t7_Vgatep_sourcep))));
   11177                 :          0 : qbulk_Vdrainp_sourcep=(-(qgate_Vdrainp_sourcep-((t4_Vdrainp_sourcep*t7)+(t4*t7_Vdrainp_sourcep))));
   11178                 :          0 : qbulk_Vdrainb_sourcep=(-(qgate_Vdrainb_sourcep-((t4_Vdrainb_sourcep*t7)+(t4*t7_Vdrainb_sourcep))));
   11179                 :          0 : qbulk_Vbulkp_sourcep=(-(qgate_Vbulkp_sourcep-((t4_Vbulkp_sourcep*t7)+(t4*t7_Vbulkp_sourcep))));
   11180                 :          0 : qbulk_Vsourceb_sourcep=(-(qgate_Vsourceb_sourcep-((t4_Vsourceb_sourcep*t7)+(t4*t7_Vsourceb_sourcep))));
   11181                 :            : #endif
   11182                 :          0 : qbulk=(-(qgate-(t4*t7)));
   11183                 :            : }
   11184                 :            : }
   11185                 :            : else
   11186                 :            : {
   11187         [ #  # ]:          0 : if
   11188                 :            : (Vds>=vdsat)
   11189                 :            : {
   11190                 :            : #if defined(_DERIVATE)
   11191                 :          0 : t1_Vgatep_sourcep=(vdsat_Vgatep_sourcep/3.0);
   11192                 :          0 : t1_Vdrainp_sourcep=(vdsat_Vdrainp_sourcep/3.0);
   11193                 :          0 : t1_Vdrainb_sourcep=(vdsat_Vdrainb_sourcep/3.0);
   11194                 :          0 : t1_Vbulkp_sourcep=(vdsat_Vbulkp_sourcep/3.0);
   11195                 :          0 : t1_Vsourceb_sourcep=(vdsat_Vsourceb_sourcep/3.0);
   11196                 :            : #endif
   11197                 :          0 : t1=(vdsat/3.0);
   11198                 :            : #if defined(_DERIVATE)
   11199                 :          0 : qgate_Vgatep_sourcep=(coxwl*(Vgs_eff_Vgatep_sourcep-t1_Vgatep_sourcep));
   11200                 :          0 : qgate_Vdrainp_sourcep=(coxwl*(Vgs_eff_Vdrainp_sourcep-t1_Vdrainp_sourcep));
   11201                 :          0 : qgate_Vdrainb_sourcep=(coxwl*(Vgs_eff_Vdrainb_sourcep-t1_Vdrainb_sourcep));
   11202                 :          0 : qgate_Vbulkp_sourcep=(coxwl*(Vgs_eff_Vbulkp_sourcep-t1_Vbulkp_sourcep));
   11203                 :          0 : qgate_Vsourceb_sourcep=(coxwl*(Vgs_eff_Vsourceb_sourcep-t1_Vsourceb_sourcep));
   11204                 :            : #endif
   11205                 :          0 : qgate=(coxwl*(((Vgs_eff-vfb)-phi)-t1));
   11206                 :            : #if defined(_DERIVATE)
   11207                 :          0 : t2_Vgatep_sourcep=((-two_third_coxwl)*vgst_Vgatep_sourcep);
   11208                 :          0 : t2_Vdrainp_sourcep=((-two_third_coxwl)*vgst_Vdrainp_sourcep);
   11209                 :          0 : t2_Vdrainb_sourcep=((-two_third_coxwl)*vgst_Vdrainb_sourcep);
   11210                 :          0 : t2_Vbulkp_sourcep=((-two_third_coxwl)*vgst_Vbulkp_sourcep);
   11211                 :          0 : t2_Vsourceb_sourcep=((-two_third_coxwl)*vgst_Vsourceb_sourcep);
   11212                 :            : #endif
   11213                 :          0 : t2=((-two_third_coxwl)*vgst);
   11214                 :            : #if defined(_DERIVATE)
   11215                 :          0 : qbulk_Vgatem_sourcep=0.0;
   11216                 :          0 : qbulk_Vgatep_sourcep=(-(qgate_Vgatep_sourcep+t2_Vgatep_sourcep));
   11217                 :          0 : qbulk_Vdrainp_sourcep=(-(qgate_Vdrainp_sourcep+t2_Vdrainp_sourcep));
   11218                 :          0 : qbulk_Vdrainb_sourcep=(-(qgate_Vdrainb_sourcep+t2_Vdrainb_sourcep));
   11219                 :          0 : qbulk_Vbulkp_sourcep=(-(qgate_Vbulkp_sourcep+t2_Vbulkp_sourcep));
   11220                 :          0 : qbulk_Vsourceb_sourcep=(-(qgate_Vsourceb_sourcep+t2_Vsourceb_sourcep));
   11221                 :            : #endif
   11222                 :          0 : qbulk=(-(qgate+t2));
   11223                 :            : #if defined(_DERIVATE)
   11224                 :          0 : qdrn_Vgatem_sourcep=0.0;
   11225                 :          0 : qdrn_Vgatep_sourcep=(0.5*t2_Vgatep_sourcep);
   11226                 :          0 : qdrn_Vdrainp_sourcep=(0.5*t2_Vdrainp_sourcep);
   11227                 :          0 : qdrn_Vdrainb_sourcep=(0.5*t2_Vdrainb_sourcep);
   11228                 :          0 : qdrn_Vbulkp_sourcep=(0.5*t2_Vbulkp_sourcep);
   11229                 :          0 : qdrn_Vsourceb_sourcep=(0.5*t2_Vsourceb_sourcep);
   11230                 :            : #endif
   11231                 :          0 : qdrn=(0.5*t2);
   11232                 :            : }
   11233                 :            : else
   11234                 :            : {
   11235                 :            : #if defined(_DERIVATE)
   11236                 :          0 : alphaz_Vgatep_sourcep=((vgst_Vgatep_sourcep*vdsat-vgst*vdsat_Vgatep_sourcep)/vdsat/vdsat);
   11237                 :          0 : alphaz_Vdrainp_sourcep=((vgst_Vdrainp_sourcep*vdsat-vgst*vdsat_Vdrainp_sourcep)/vdsat/vdsat);
   11238                 :          0 : alphaz_Vdrainb_sourcep=((vgst_Vdrainb_sourcep*vdsat-vgst*vdsat_Vdrainb_sourcep)/vdsat/vdsat);
   11239                 :          0 : alphaz_Vbulkp_sourcep=((vgst_Vbulkp_sourcep*vdsat-vgst*vdsat_Vbulkp_sourcep)/vdsat/vdsat);
   11240                 :          0 : alphaz_Vsourceb_sourcep=((vgst_Vsourceb_sourcep*vdsat-vgst*vdsat_Vsourceb_sourcep)/vdsat/vdsat);
   11241                 :            : #endif
   11242                 :          0 : alphaz=(vgst/vdsat);
   11243                 :            : #if defined(_DERIVATE)
   11244                 :          0 : t1_Vgatep_sourcep=(2.0*vdsat_Vgatep_sourcep);
   11245                 :          0 : t1_Vdrainp_sourcep=((2.0*vdsat_Vdrainp_sourcep)-Vds_Vdrainp_sourcep);
   11246                 :          0 : t1_Vdrainb_sourcep=(2.0*vdsat_Vdrainb_sourcep);
   11247                 :          0 : t1_Vbulkp_sourcep=(2.0*vdsat_Vbulkp_sourcep);
   11248                 :          0 : t1_Vsourceb_sourcep=(2.0*vdsat_Vsourceb_sourcep);
   11249                 :            : #endif
   11250                 :          0 : t1=((2.0*vdsat)-Vds);
   11251                 :            : #if defined(_DERIVATE)
   11252                 :          0 : t2_Vgatep_sourcep=(-Vds*(3.0*t1_Vgatep_sourcep)/(3.0*t1)/(3.0*t1));
   11253                 :          0 : t2_Vdrainp_sourcep=((Vds_Vdrainp_sourcep*(3.0*t1)-Vds*(3.0*t1_Vdrainp_sourcep))/(3.0*t1)/(3.0*t1));
   11254                 :          0 : t2_Vdrainb_sourcep=(-Vds*(3.0*t1_Vdrainb_sourcep)/(3.0*t1)/(3.0*t1));
   11255                 :          0 : t2_Vbulkp_sourcep=(-Vds*(3.0*t1_Vbulkp_sourcep)/(3.0*t1)/(3.0*t1));
   11256                 :          0 : t2_Vsourceb_sourcep=(-Vds*(3.0*t1_Vsourceb_sourcep)/(3.0*t1)/(3.0*t1));
   11257                 :            : #endif
   11258                 :          0 : t2=(Vds/(3.0*t1));
   11259                 :            : #if defined(_DERIVATE)
   11260                 :          0 : t3_Vgatep_sourcep=t2_Vgatep_sourcep*Vds;
   11261                 :          0 : t3_Vdrainp_sourcep=((t2_Vdrainp_sourcep*Vds)+(t2*Vds_Vdrainp_sourcep));
   11262                 :          0 : t3_Vdrainb_sourcep=t2_Vdrainb_sourcep*Vds;
   11263                 :          0 : t3_Vbulkp_sourcep=t2_Vbulkp_sourcep*Vds;
   11264                 :          0 : t3_Vsourceb_sourcep=t2_Vsourceb_sourcep*Vds;
   11265                 :            : #endif
   11266                 :          0 : t3=(t2*Vds);
   11267                 :            : #if defined(_DERIVATE)
   11268                 :          0 : t9_Vgatep_sourcep=0.0;
   11269                 :          0 : t9_Vdrainp_sourcep=0.0;
   11270                 :          0 : t9_Vdrainb_sourcep=0.0;
   11271                 :          0 : t9_Vbulkp_sourcep=0.0;
   11272                 :          0 : t9_Vsourceb_sourcep=0.0;
   11273                 :            : #endif
   11274                 :          0 : t9=(0.25*coxwl);
   11275                 :            : #if defined(_DERIVATE)
   11276                 :          0 : t4_Vgatep_sourcep=((t9_Vgatep_sourcep*alphaz)+(t9*alphaz_Vgatep_sourcep));
   11277                 :          0 : t4_Vdrainp_sourcep=((t9_Vdrainp_sourcep*alphaz)+(t9*alphaz_Vdrainp_sourcep));
   11278                 :          0 : t4_Vdrainb_sourcep=((t9_Vdrainb_sourcep*alphaz)+(t9*alphaz_Vdrainb_sourcep));
   11279                 :          0 : t4_Vbulkp_sourcep=((t9_Vbulkp_sourcep*alphaz)+(t9*alphaz_Vbulkp_sourcep));
   11280                 :          0 : t4_Vsourceb_sourcep=((t9_Vsourceb_sourcep*alphaz)+(t9*alphaz_Vsourceb_sourcep));
   11281                 :            : #endif
   11282                 :          0 : t4=(t9*alphaz);
   11283                 :            : #if defined(_DERIVATE)
   11284                 :          0 : qgate_Vgatep_sourcep=(coxwl*(Vgs_eff_Vgatep_sourcep-(0.5*(-t3_Vgatep_sourcep))));
   11285                 :          0 : qgate_Vdrainp_sourcep=(coxwl*(Vgs_eff_Vdrainp_sourcep-(0.5*(Vds_Vdrainp_sourcep-t3_Vdrainp_sourcep))));
   11286                 :          0 : qgate_Vdrainb_sourcep=(coxwl*(Vgs_eff_Vdrainb_sourcep-(0.5*(-t3_Vdrainb_sourcep))));
   11287                 :          0 : qgate_Vbulkp_sourcep=(coxwl*(Vgs_eff_Vbulkp_sourcep-(0.5*(-t3_Vbulkp_sourcep))));
   11288                 :          0 : qgate_Vsourceb_sourcep=(coxwl*(Vgs_eff_Vsourceb_sourcep-(0.5*(-t3_Vsourceb_sourcep))));
   11289                 :            : #endif
   11290                 :          0 : qgate=(coxwl*(((Vgs_eff-vfb)-phi)-(0.5*(Vds-t3))));
   11291                 :            : #if defined(_DERIVATE)
   11292                 :          0 : t7_Vgatep_sourcep=(t1_Vgatep_sourcep+t3_Vgatep_sourcep);
   11293                 :          0 : t7_Vdrainp_sourcep=(t1_Vdrainp_sourcep+t3_Vdrainp_sourcep);
   11294                 :          0 : t7_Vdrainb_sourcep=(t1_Vdrainb_sourcep+t3_Vdrainb_sourcep);
   11295                 :          0 : t7_Vbulkp_sourcep=(t1_Vbulkp_sourcep+t3_Vbulkp_sourcep);
   11296                 :          0 : t7_Vsourceb_sourcep=(t1_Vsourceb_sourcep+t3_Vsourceb_sourcep);
   11297                 :            : #endif
   11298                 :          0 : t7=(t1+t3);
   11299                 :            : #if defined(_DERIVATE)
   11300                 :          0 : qdrn_Vgatem_sourcep=0.0;
   11301                 :          0 : qdrn_Vgatep_sourcep=(((-t4_Vgatep_sourcep)*t7)+((-t4)*t7_Vgatep_sourcep));
   11302                 :          0 : qdrn_Vdrainp_sourcep=(((-t4_Vdrainp_sourcep)*t7)+((-t4)*t7_Vdrainp_sourcep));
   11303                 :          0 : qdrn_Vdrainb_sourcep=(((-t4_Vdrainb_sourcep)*t7)+((-t4)*t7_Vdrainb_sourcep));
   11304                 :          0 : qdrn_Vbulkp_sourcep=(((-t4_Vbulkp_sourcep)*t7)+((-t4)*t7_Vbulkp_sourcep));
   11305                 :          0 : qdrn_Vsourceb_sourcep=(((-t4_Vsourceb_sourcep)*t7)+((-t4)*t7_Vsourceb_sourcep));
   11306                 :            : #endif
   11307                 :          0 : qdrn=((-t4)*t7);
   11308                 :            : #if defined(_DERIVATE)
   11309                 :          0 : qbulk_Vgatem_sourcep=0.0;
   11310                 :          0 : qbulk_Vgatep_sourcep=(-((qgate_Vgatep_sourcep+qdrn_Vgatep_sourcep)+qdrn_Vgatep_sourcep));
   11311                 :          0 : qbulk_Vdrainp_sourcep=(-((qgate_Vdrainp_sourcep+qdrn_Vdrainp_sourcep)+qdrn_Vdrainp_sourcep));
   11312                 :          0 : qbulk_Vdrainb_sourcep=(-((qgate_Vdrainb_sourcep+qdrn_Vdrainb_sourcep)+qdrn_Vdrainb_sourcep));
   11313                 :          0 : qbulk_Vbulkp_sourcep=(-((qgate_Vbulkp_sourcep+qdrn_Vbulkp_sourcep)+qdrn_Vbulkp_sourcep));
   11314                 :          0 : qbulk_Vsourceb_sourcep=(-((qgate_Vsourceb_sourcep+qdrn_Vsourceb_sourcep)+qdrn_Vsourceb_sourcep));
   11315                 :            : #endif
   11316                 :          0 : qbulk=(-((qgate+qdrn)+qdrn));
   11317                 :            : }
   11318                 :            : }
   11319                 :            : }
   11320                 :            : }
   11321                 :            : }
   11322                 :            : }
   11323                 :            : else
   11324                 :            : {
   11325         [ +  + ]:       7356 : if
   11326                 :            : (vbseff<0.0)
   11327                 :            : {
   11328                 :            : #if defined(_DERIVATE)
   11329                 :       3284 : vbseffcv_Vdrainp_sourcep=vbseff_Vdrainp_sourcep;
   11330                 :       3284 : vbseffcv_Vdrainb_sourcep=vbseff_Vdrainb_sourcep;
   11331                 :       3284 : vbseffcv_Vbulkp_sourcep=vbseff_Vbulkp_sourcep;
   11332                 :       3284 : vbseffcv_Vsourceb_sourcep=vbseff_Vsourceb_sourcep;
   11333                 :            : #endif
   11334                 :       3284 : vbseffcv=vbseff;
   11335                 :            : }
   11336                 :            : else
   11337                 :            : {
   11338                 :            : #if defined(_DERIVATE)
   11339                 :       4072 : vbseffcv_Vdrainp_sourcep=(-phis_Vdrainp_sourcep);
   11340                 :       4072 : vbseffcv_Vdrainb_sourcep=(-phis_Vdrainb_sourcep);
   11341                 :       4072 : vbseffcv_Vbulkp_sourcep=(-phis_Vbulkp_sourcep);
   11342                 :       4072 : vbseffcv_Vsourceb_sourcep=(-phis_Vsourceb_sourcep);
   11343                 :            : #endif
   11344                 :       4072 : vbseffcv=(phi-phis);
   11345                 :            : }
   11346                 :       7356 : coxwl=(((coxe*weffcv)*leffcv)*nf);
   11347                 :            : #if defined(_DERIVATE)
   11348                 :       7356 : t0_Vgatep_sourcep=0.0;
   11349                 :       7356 : t0_Vdrainp_sourcep=(vtm*n_Vdrainp_sourcep)*noff;
   11350                 :       7356 : t0_Vdrainb_sourcep=(vtm*n_Vdrainb_sourcep)*noff;
   11351                 :       7356 : t0_Vbulkp_sourcep=(vtm*n_Vbulkp_sourcep)*noff;
   11352                 :       7356 : t0_Vsourceb_sourcep=(vtm*n_Vsourceb_sourcep)*noff;
   11353                 :            : #endif
   11354                 :       7356 : t0=((vtm*n)*noff);
   11355                 :            : #if defined(_DERIVATE)
   11356                 :       7356 : vgstnvt_Vgatep_sourcep=((vgst_Vgatep_sourcep*t0-(vgst-voffcv)*t0_Vgatep_sourcep)/t0/t0);
   11357                 :       7356 : vgstnvt_Vdrainp_sourcep=((vgst_Vdrainp_sourcep*t0-(vgst-voffcv)*t0_Vdrainp_sourcep)/t0/t0);
   11358                 :       7356 : vgstnvt_Vdrainb_sourcep=((vgst_Vdrainb_sourcep*t0-(vgst-voffcv)*t0_Vdrainb_sourcep)/t0/t0);
   11359                 :       7356 : vgstnvt_Vbulkp_sourcep=((vgst_Vbulkp_sourcep*t0-(vgst-voffcv)*t0_Vbulkp_sourcep)/t0/t0);
   11360                 :       7356 : vgstnvt_Vsourceb_sourcep=((vgst_Vsourceb_sourcep*t0-(vgst-voffcv)*t0_Vsourceb_sourcep)/t0/t0);
   11361                 :            : #endif
   11362                 :       7356 : vgstnvt=((vgst-voffcv)/t0);
   11363         [ +  + ]:       7356 : if
   11364                 :            : (vgstnvt>34.0)
   11365                 :            : {
   11366                 :            : #if defined(_DERIVATE)
   11367                 :       4100 : vgsteff_Vgatep_sourcep=vgst_Vgatep_sourcep;
   11368                 :       4100 : vgsteff_Vdrainp_sourcep=vgst_Vdrainp_sourcep;
   11369                 :       4100 : vgsteff_Vdrainb_sourcep=vgst_Vdrainb_sourcep;
   11370                 :       4100 : vgsteff_Vbulkp_sourcep=vgst_Vbulkp_sourcep;
   11371                 :       4100 : vgsteff_Vsourceb_sourcep=vgst_Vsourceb_sourcep;
   11372                 :            : #endif
   11373                 :       4100 : vgsteff=(vgst-voffcv);
   11374                 :            : }
   11375                 :            : else
   11376                 :            : {
   11377         [ -  + ]:       3256 : if
   11378                 :            : (vgstnvt<(-34.0))
   11379                 :            : {
   11380                 :            : {
   11381                 :          0 : double m00_logE(d00_logE0,(1.0+1.713908431e-15))
   11382                 :            : #if defined(_DERIVATE)
   11383                 :          0 : vgsteff_Vgatep_sourcep=t0_Vgatep_sourcep*d00_logE0;
   11384                 :          0 : vgsteff_Vdrainp_sourcep=t0_Vdrainp_sourcep*d00_logE0;
   11385                 :          0 : vgsteff_Vdrainb_sourcep=t0_Vdrainb_sourcep*d00_logE0;
   11386                 :          0 : vgsteff_Vbulkp_sourcep=t0_Vbulkp_sourcep*d00_logE0;
   11387                 :          0 : vgsteff_Vsourceb_sourcep=t0_Vsourceb_sourcep*d00_logE0;
   11388                 :            : #endif
   11389                 :          0 : vgsteff=(t0*d00_logE0);
   11390                 :            : }
   11391                 :            : }
   11392                 :            : else
   11393                 :            : {
   11394                 :            : {
   11395                 :       3256 : double m00_exp(d00_exp0,vgstnvt)
   11396                 :       3256 : double m00_logE(d00_logE1,(1.0+d00_exp0))
   11397                 :            : #if defined(_DERIVATE)
   11398                 :            : #define d10_exp0 d00_exp0
   11399                 :       3256 : double m10_logE(d10_logE1,d00_logE1,(1.0+d00_exp0))
   11400                 :            : #endif
   11401                 :            : #if defined(_DERIVATE)
   11402                 :       3256 : vgsteff_Vgatep_sourcep=((t0_Vgatep_sourcep*d00_logE1)+(t0*vgstnvt_Vgatep_sourcep*d10_exp0*d10_logE1));
   11403                 :       3256 : vgsteff_Vdrainp_sourcep=((t0_Vdrainp_sourcep*d00_logE1)+(t0*vgstnvt_Vdrainp_sourcep*d10_exp0*d10_logE1));
   11404                 :       3256 : vgsteff_Vdrainb_sourcep=((t0_Vdrainb_sourcep*d00_logE1)+(t0*vgstnvt_Vdrainb_sourcep*d10_exp0*d10_logE1));
   11405                 :       3256 : vgsteff_Vbulkp_sourcep=((t0_Vbulkp_sourcep*d00_logE1)+(t0*vgstnvt_Vbulkp_sourcep*d10_exp0*d10_logE1));
   11406                 :       3256 : vgsteff_Vsourceb_sourcep=((t0_Vsourceb_sourcep*d00_logE1)+(t0*vgstnvt_Vsourceb_sourcep*d10_exp0*d10_logE1));
   11407                 :            : #endif
   11408                 :       3256 : vgsteff=(t0*d00_logE1);
   11409                 :            : }
   11410                 :            : }
   11411                 :            : }
   11412         [ -  + ]:       7356 : if
   11413                 :            : (capmod==1)
   11414                 :            : {
   11415                 :            : #if defined(_DERIVATE)
   11416                 :          0 : v3_Vgatep_sourcep=(-Vgs_eff_Vgatep_sourcep);
   11417                 :          0 : v3_Vdrainp_sourcep=((-Vgs_eff_Vdrainp_sourcep)+vbseffcv_Vdrainp_sourcep);
   11418                 :          0 : v3_Vdrainb_sourcep=((-Vgs_eff_Vdrainb_sourcep)+vbseffcv_Vdrainb_sourcep);
   11419                 :          0 : v3_Vbulkp_sourcep=((-Vgs_eff_Vbulkp_sourcep)+vbseffcv_Vbulkp_sourcep);
   11420                 :          0 : v3_Vsourceb_sourcep=((-Vgs_eff_Vsourceb_sourcep)+vbseffcv_Vsourceb_sourcep);
   11421                 :            : #endif
   11422                 :          0 : v3=(((vfbzb-Vgs_eff)+vbseffcv)-0.02);
   11423         [ #  # ]:          0 : if
   11424                 :            : (vfbzb<=0.0)
   11425                 :            : {
   11426                 :            : {
   11427                 :          0 : double m00_sqrt(d00_sqrt0,((v3*v3)-((4.0*0.02)*vfbzb)))
   11428                 :            : #if defined(_DERIVATE)
   11429                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((v3*v3)-((4.0*0.02)*vfbzb)))
   11430                 :            : #endif
   11431                 :            : #if defined(_DERIVATE)
   11432                 :          0 : t0_Vgatep_sourcep=((v3_Vgatep_sourcep*v3)+(v3*v3_Vgatep_sourcep))*d10_sqrt0;
   11433                 :          0 : t0_Vdrainp_sourcep=((v3_Vdrainp_sourcep*v3)+(v3*v3_Vdrainp_sourcep))*d10_sqrt0;
   11434                 :          0 : t0_Vdrainb_sourcep=((v3_Vdrainb_sourcep*v3)+(v3*v3_Vdrainb_sourcep))*d10_sqrt0;
   11435                 :          0 : t0_Vbulkp_sourcep=((v3_Vbulkp_sourcep*v3)+(v3*v3_Vbulkp_sourcep))*d10_sqrt0;
   11436                 :          0 : t0_Vsourceb_sourcep=((v3_Vsourceb_sourcep*v3)+(v3*v3_Vsourceb_sourcep))*d10_sqrt0;
   11437                 :            : #endif
   11438                 :          0 : t0=d00_sqrt0;
   11439                 :            : }
   11440                 :            : }
   11441                 :            : else
   11442                 :            : {
   11443                 :            : {
   11444                 :          0 : double m00_sqrt(d00_sqrt0,((v3*v3)+((4.0*0.02)*vfbzb)))
   11445                 :            : #if defined(_DERIVATE)
   11446                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((v3*v3)+((4.0*0.02)*vfbzb)))
   11447                 :            : #endif
   11448                 :            : #if defined(_DERIVATE)
   11449                 :          0 : t0_Vgatep_sourcep=((v3_Vgatep_sourcep*v3)+(v3*v3_Vgatep_sourcep))*d10_sqrt0;
   11450                 :          0 : t0_Vdrainp_sourcep=((v3_Vdrainp_sourcep*v3)+(v3*v3_Vdrainp_sourcep))*d10_sqrt0;
   11451                 :          0 : t0_Vdrainb_sourcep=((v3_Vdrainb_sourcep*v3)+(v3*v3_Vdrainb_sourcep))*d10_sqrt0;
   11452                 :          0 : t0_Vbulkp_sourcep=((v3_Vbulkp_sourcep*v3)+(v3*v3_Vbulkp_sourcep))*d10_sqrt0;
   11453                 :          0 : t0_Vsourceb_sourcep=((v3_Vsourceb_sourcep*v3)+(v3*v3_Vsourceb_sourcep))*d10_sqrt0;
   11454                 :            : #endif
   11455                 :          0 : t0=d00_sqrt0;
   11456                 :            : }
   11457                 :            : }
   11458                 :            : #if defined(_DERIVATE)
   11459                 :          0 : t1_Vgatep_sourcep=(0.5*((v3_Vgatep_sourcep*t0-v3*t0_Vgatep_sourcep)/t0/t0));
   11460                 :          0 : t1_Vdrainp_sourcep=(0.5*((v3_Vdrainp_sourcep*t0-v3*t0_Vdrainp_sourcep)/t0/t0));
   11461                 :          0 : t1_Vdrainb_sourcep=(0.5*((v3_Vdrainb_sourcep*t0-v3*t0_Vdrainb_sourcep)/t0/t0));
   11462                 :          0 : t1_Vbulkp_sourcep=(0.5*((v3_Vbulkp_sourcep*t0-v3*t0_Vbulkp_sourcep)/t0/t0));
   11463                 :          0 : t1_Vsourceb_sourcep=(0.5*((v3_Vsourceb_sourcep*t0-v3*t0_Vsourceb_sourcep)/t0/t0));
   11464                 :            : #endif
   11465                 :          0 : t1=(0.5*(1.0+(v3/t0)));
   11466                 :            : #if defined(_DERIVATE)
   11467                 :          0 : vfbeff_Vgatep_sourcep=(-(0.5*(v3_Vgatep_sourcep+t0_Vgatep_sourcep)));
   11468                 :          0 : vfbeff_Vdrainp_sourcep=(-(0.5*(v3_Vdrainp_sourcep+t0_Vdrainp_sourcep)));
   11469                 :          0 : vfbeff_Vdrainb_sourcep=(-(0.5*(v3_Vdrainb_sourcep+t0_Vdrainb_sourcep)));
   11470                 :          0 : vfbeff_Vbulkp_sourcep=(-(0.5*(v3_Vbulkp_sourcep+t0_Vbulkp_sourcep)));
   11471                 :          0 : vfbeff_Vsourceb_sourcep=(-(0.5*(v3_Vsourceb_sourcep+t0_Vsourceb_sourcep)));
   11472                 :            : #endif
   11473                 :          0 : vfbeff=(vfbzb-(0.5*(v3+t0)));
   11474                 :            : #if defined(_DERIVATE)
   11475                 :          0 : qac0_Vgatep_sourcep=(coxwl*vfbeff_Vgatep_sourcep);
   11476                 :          0 : qac0_Vdrainp_sourcep=(coxwl*vfbeff_Vdrainp_sourcep);
   11477                 :          0 : qac0_Vdrainb_sourcep=(coxwl*vfbeff_Vdrainb_sourcep);
   11478                 :          0 : qac0_Vbulkp_sourcep=(coxwl*vfbeff_Vbulkp_sourcep);
   11479                 :          0 : qac0_Vsourceb_sourcep=(coxwl*vfbeff_Vsourceb_sourcep);
   11480                 :            : #endif
   11481                 :          0 : qac0=(coxwl*(vfbeff-vfbzb));
   11482                 :            : #if defined(_DERIVATE)
   11483                 :          0 : t0_Vgatep_sourcep=0.0;
   11484                 :          0 : t0_Vdrainp_sourcep=0.0;
   11485                 :          0 : t0_Vdrainb_sourcep=0.0;
   11486                 :          0 : t0_Vbulkp_sourcep=0.0;
   11487                 :          0 : t0_Vsourceb_sourcep=0.0;
   11488                 :            : #endif
   11489                 :          0 : t0=(0.5*k1ox);
   11490                 :            : #if defined(_DERIVATE)
   11491                 :          0 : t3_Vgatep_sourcep=((Vgs_eff_Vgatep_sourcep-vfbeff_Vgatep_sourcep)-vgsteff_Vgatep_sourcep);
   11492                 :          0 : t3_Vdrainp_sourcep=(((Vgs_eff_Vdrainp_sourcep-vfbeff_Vdrainp_sourcep)-vbseffcv_Vdrainp_sourcep)-vgsteff_Vdrainp_sourcep);
   11493                 :          0 : t3_Vdrainb_sourcep=(((Vgs_eff_Vdrainb_sourcep-vfbeff_Vdrainb_sourcep)-vbseffcv_Vdrainb_sourcep)-vgsteff_Vdrainb_sourcep);
   11494                 :          0 : t3_Vbulkp_sourcep=(((Vgs_eff_Vbulkp_sourcep-vfbeff_Vbulkp_sourcep)-vbseffcv_Vbulkp_sourcep)-vgsteff_Vbulkp_sourcep);
   11495                 :          0 : t3_Vsourceb_sourcep=(((Vgs_eff_Vsourceb_sourcep-vfbeff_Vsourceb_sourcep)-vbseffcv_Vsourceb_sourcep)-vgsteff_Vsourceb_sourcep);
   11496                 :            : #endif
   11497                 :          0 : t3=(((Vgs_eff-vfbeff)-vbseffcv)-vgsteff);
   11498         [ #  # ]:          0 : if
   11499                 :            : (k1ox==0.0)
   11500                 :            : {
   11501                 :            : #if defined(_DERIVATE)
   11502                 :          0 : t1_Vgatep_sourcep=0.0;
   11503                 :          0 : t1_Vdrainp_sourcep=0.0;
   11504                 :          0 : t1_Vdrainb_sourcep=0.0;
   11505                 :          0 : t1_Vbulkp_sourcep=0.0;
   11506                 :          0 : t1_Vsourceb_sourcep=0.0;
   11507                 :            : #endif
   11508                 :          0 : t1=0.0;
   11509                 :            : #if defined(_DERIVATE)
   11510                 :          0 : t2_Vgatep_sourcep=0.0;
   11511                 :          0 : t2_Vdrainp_sourcep=0.0;
   11512                 :          0 : t2_Vdrainb_sourcep=0.0;
   11513                 :          0 : t2_Vbulkp_sourcep=0.0;
   11514                 :          0 : t2_Vsourceb_sourcep=0.0;
   11515                 :            : #endif
   11516                 :          0 : t2=0.0;
   11517                 :            : }
   11518                 :            : else
   11519                 :            : {
   11520         [ #  # ]:          0 : if
   11521                 :            : (t3<0.0)
   11522                 :            : {
   11523                 :            : #if defined(_DERIVATE)
   11524                 :          0 : t1_Vgatep_sourcep=(t0_Vgatep_sourcep+(t3_Vgatep_sourcep/k1ox));
   11525                 :          0 : t1_Vdrainp_sourcep=(t0_Vdrainp_sourcep+(t3_Vdrainp_sourcep/k1ox));
   11526                 :          0 : t1_Vdrainb_sourcep=(t0_Vdrainb_sourcep+(t3_Vdrainb_sourcep/k1ox));
   11527                 :          0 : t1_Vbulkp_sourcep=(t0_Vbulkp_sourcep+(t3_Vbulkp_sourcep/k1ox));
   11528                 :          0 : t1_Vsourceb_sourcep=(t0_Vsourceb_sourcep+(t3_Vsourceb_sourcep/k1ox));
   11529                 :            : #endif
   11530                 :          0 : t1=(t0+(t3/k1ox));
   11531                 :            : #if defined(_DERIVATE)
   11532                 :          0 : t2_Vgatep_sourcep=0.0;
   11533                 :          0 : t2_Vdrainp_sourcep=0.0;
   11534                 :          0 : t2_Vdrainb_sourcep=0.0;
   11535                 :          0 : t2_Vbulkp_sourcep=0.0;
   11536                 :          0 : t2_Vsourceb_sourcep=0.0;
   11537                 :            : #endif
   11538                 :          0 : t2=coxwl;
   11539                 :            : }
   11540                 :            : else
   11541                 :            : {
   11542                 :            : {
   11543                 :          0 : double m00_sqrt(d00_sqrt0,((t0*t0)+t3))
   11544                 :            : #if defined(_DERIVATE)
   11545                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+t3))
   11546                 :            : #endif
   11547                 :            : #if defined(_DERIVATE)
   11548                 :          0 : t1_Vgatep_sourcep=(((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))+t3_Vgatep_sourcep)*d10_sqrt0;
   11549                 :          0 : t1_Vdrainp_sourcep=(((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))+t3_Vdrainp_sourcep)*d10_sqrt0;
   11550                 :          0 : t1_Vdrainb_sourcep=(((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))+t3_Vdrainb_sourcep)*d10_sqrt0;
   11551                 :          0 : t1_Vbulkp_sourcep=(((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))+t3_Vbulkp_sourcep)*d10_sqrt0;
   11552                 :          0 : t1_Vsourceb_sourcep=(((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))+t3_Vsourceb_sourcep)*d10_sqrt0;
   11553                 :            : #endif
   11554                 :          0 : t1=d00_sqrt0;
   11555                 :            : }
   11556                 :            : #if defined(_DERIVATE)
   11557                 :          0 : t2_Vgatep_sourcep=(((coxwl*t0_Vgatep_sourcep)*t1-(coxwl*t0)*t1_Vgatep_sourcep)/t1/t1);
   11558                 :          0 : t2_Vdrainp_sourcep=(((coxwl*t0_Vdrainp_sourcep)*t1-(coxwl*t0)*t1_Vdrainp_sourcep)/t1/t1);
   11559                 :          0 : t2_Vdrainb_sourcep=(((coxwl*t0_Vdrainb_sourcep)*t1-(coxwl*t0)*t1_Vdrainb_sourcep)/t1/t1);
   11560                 :          0 : t2_Vbulkp_sourcep=(((coxwl*t0_Vbulkp_sourcep)*t1-(coxwl*t0)*t1_Vbulkp_sourcep)/t1/t1);
   11561                 :          0 : t2_Vsourceb_sourcep=(((coxwl*t0_Vsourceb_sourcep)*t1-(coxwl*t0)*t1_Vsourceb_sourcep)/t1/t1);
   11562                 :            : #endif
   11563                 :          0 : t2=((coxwl*t0)/t1);
   11564                 :            : }
   11565                 :            : }
   11566                 :            : #if defined(_DERIVATE)
   11567                 :          0 : qsub0_Vgatep_sourcep=((coxwl*k1ox)*(t1_Vgatep_sourcep-t0_Vgatep_sourcep));
   11568                 :          0 : qsub0_Vdrainp_sourcep=((coxwl*k1ox)*(t1_Vdrainp_sourcep-t0_Vdrainp_sourcep));
   11569                 :          0 : qsub0_Vdrainb_sourcep=((coxwl*k1ox)*(t1_Vdrainb_sourcep-t0_Vdrainb_sourcep));
   11570                 :          0 : qsub0_Vbulkp_sourcep=((coxwl*k1ox)*(t1_Vbulkp_sourcep-t0_Vbulkp_sourcep));
   11571                 :          0 : qsub0_Vsourceb_sourcep=((coxwl*k1ox)*(t1_Vsourceb_sourcep-t0_Vsourceb_sourcep));
   11572                 :            : #endif
   11573                 :          0 : qsub0=((coxwl*k1ox)*(t1-t0));
   11574                 :            : #if defined(_DERIVATE)
   11575                 :          0 : abulkcv_Vgatep_sourcep=abulk0_Vgatep_sourcep*abulkcvfactor;
   11576                 :          0 : abulkcv_Vdrainp_sourcep=abulk0_Vdrainp_sourcep*abulkcvfactor;
   11577                 :          0 : abulkcv_Vdrainb_sourcep=abulk0_Vdrainb_sourcep*abulkcvfactor;
   11578                 :          0 : abulkcv_Vbulkp_sourcep=abulk0_Vbulkp_sourcep*abulkcvfactor;
   11579                 :          0 : abulkcv_Vsourceb_sourcep=abulk0_Vsourceb_sourcep*abulkcvfactor;
   11580                 :            : #endif
   11581                 :          0 : abulkcv=(abulk0*abulkcvfactor);
   11582                 :            : #if defined(_DERIVATE)
   11583                 :          0 : vdsatcv_Vgatep_sourcep=((vgsteff_Vgatep_sourcep*abulkcv-vgsteff*abulkcv_Vgatep_sourcep)/abulkcv/abulkcv);
   11584                 :          0 : vdsatcv_Vdrainp_sourcep=((vgsteff_Vdrainp_sourcep*abulkcv-vgsteff*abulkcv_Vdrainp_sourcep)/abulkcv/abulkcv);
   11585                 :          0 : vdsatcv_Vdrainb_sourcep=((vgsteff_Vdrainb_sourcep*abulkcv-vgsteff*abulkcv_Vdrainb_sourcep)/abulkcv/abulkcv);
   11586                 :          0 : vdsatcv_Vbulkp_sourcep=((vgsteff_Vbulkp_sourcep*abulkcv-vgsteff*abulkcv_Vbulkp_sourcep)/abulkcv/abulkcv);
   11587                 :          0 : vdsatcv_Vsourceb_sourcep=((vgsteff_Vsourceb_sourcep*abulkcv-vgsteff*abulkcv_Vsourceb_sourcep)/abulkcv/abulkcv);
   11588                 :            : #endif
   11589                 :          0 : vdsatcv=(vgsteff/abulkcv);
   11590                 :            : #if defined(_DERIVATE)
   11591                 :          0 : t0_Vgatep_sourcep=vdsatcv_Vgatep_sourcep;
   11592                 :          0 : t0_Vdrainp_sourcep=(vdsatcv_Vdrainp_sourcep-Vds_Vdrainp_sourcep);
   11593                 :          0 : t0_Vdrainb_sourcep=vdsatcv_Vdrainb_sourcep;
   11594                 :          0 : t0_Vbulkp_sourcep=vdsatcv_Vbulkp_sourcep;
   11595                 :          0 : t0_Vsourceb_sourcep=vdsatcv_Vsourceb_sourcep;
   11596                 :            : #endif
   11597                 :          0 : t0=((vdsatcv-Vds)-0.02);
   11598                 :            : {
   11599                 :          0 : double m00_sqrt(d00_sqrt0,((t0*t0)+((4.0*0.02)*vdsatcv)))
   11600                 :            : #if defined(_DERIVATE)
   11601                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+((4.0*0.02)*vdsatcv)))
   11602                 :            : #endif
   11603                 :            : #if defined(_DERIVATE)
   11604                 :          0 : t1_Vgatep_sourcep=(((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))+((4.0*0.02)*vdsatcv_Vgatep_sourcep))*d10_sqrt0;
   11605                 :          0 : t1_Vdrainp_sourcep=(((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))+((4.0*0.02)*vdsatcv_Vdrainp_sourcep))*d10_sqrt0;
   11606                 :          0 : t1_Vdrainb_sourcep=(((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))+((4.0*0.02)*vdsatcv_Vdrainb_sourcep))*d10_sqrt0;
   11607                 :          0 : t1_Vbulkp_sourcep=(((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))+((4.0*0.02)*vdsatcv_Vbulkp_sourcep))*d10_sqrt0;
   11608                 :          0 : t1_Vsourceb_sourcep=(((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))+((4.0*0.02)*vdsatcv_Vsourceb_sourcep))*d10_sqrt0;
   11609                 :            : #endif
   11610                 :          0 : t1=d00_sqrt0;
   11611                 :            : }
   11612         [ #  # ]:          0 : if
   11613                 :            : (t0>=0.0)
   11614                 :            : {
   11615                 :            : #if defined(_DERIVATE)
   11616                 :          0 : vdseffcv_Vgatep_sourcep=(vdsatcv_Vgatep_sourcep-(0.5*(t0_Vgatep_sourcep+t1_Vgatep_sourcep)));
   11617                 :          0 : vdseffcv_Vdrainp_sourcep=(vdsatcv_Vdrainp_sourcep-(0.5*(t0_Vdrainp_sourcep+t1_Vdrainp_sourcep)));
   11618                 :          0 : vdseffcv_Vdrainb_sourcep=(vdsatcv_Vdrainb_sourcep-(0.5*(t0_Vdrainb_sourcep+t1_Vdrainb_sourcep)));
   11619                 :          0 : vdseffcv_Vbulkp_sourcep=(vdsatcv_Vbulkp_sourcep-(0.5*(t0_Vbulkp_sourcep+t1_Vbulkp_sourcep)));
   11620                 :          0 : vdseffcv_Vsourceb_sourcep=(vdsatcv_Vsourceb_sourcep-(0.5*(t0_Vsourceb_sourcep+t1_Vsourceb_sourcep)));
   11621                 :            : #endif
   11622                 :          0 : vdseffcv=(vdsatcv-(0.5*(t0+t1)));
   11623                 :            : }
   11624                 :            : else
   11625                 :            : {
   11626                 :            : #if defined(_DERIVATE)
   11627                 :          0 : t3_Vgatep_sourcep=(-(0.02+0.02)*(t1_Vgatep_sourcep-t0_Vgatep_sourcep)/(t1-t0)/(t1-t0));
   11628                 :          0 : t3_Vdrainp_sourcep=(-(0.02+0.02)*(t1_Vdrainp_sourcep-t0_Vdrainp_sourcep)/(t1-t0)/(t1-t0));
   11629                 :          0 : t3_Vdrainb_sourcep=(-(0.02+0.02)*(t1_Vdrainb_sourcep-t0_Vdrainb_sourcep)/(t1-t0)/(t1-t0));
   11630                 :          0 : t3_Vbulkp_sourcep=(-(0.02+0.02)*(t1_Vbulkp_sourcep-t0_Vbulkp_sourcep)/(t1-t0)/(t1-t0));
   11631                 :          0 : t3_Vsourceb_sourcep=(-(0.02+0.02)*(t1_Vsourceb_sourcep-t0_Vsourceb_sourcep)/(t1-t0)/(t1-t0));
   11632                 :            : #endif
   11633                 :          0 : t3=((0.02+0.02)/(t1-t0));
   11634                 :            : #if defined(_DERIVATE)
   11635                 :          0 : t4_Vgatep_sourcep=(-t3_Vgatep_sourcep);
   11636                 :          0 : t4_Vdrainp_sourcep=(-t3_Vdrainp_sourcep);
   11637                 :          0 : t4_Vdrainb_sourcep=(-t3_Vdrainb_sourcep);
   11638                 :          0 : t4_Vbulkp_sourcep=(-t3_Vbulkp_sourcep);
   11639                 :          0 : t4_Vsourceb_sourcep=(-t3_Vsourceb_sourcep);
   11640                 :            : #endif
   11641                 :          0 : t4=(1.0-t3);
   11642                 :            : #if defined(_DYNAMIC)
   11643                 :            : #if defined(_DERIVATE)
   11644                 :          0 : t5_Vgatep_sourcep=((((vdsatcv_Vgatep_sourcep*t3)+(vdsatcv*t3_Vgatep_sourcep))*(t1-t0)-(vdsatcv*t3)*(t1_Vgatep_sourcep-t0_Vgatep_sourcep))/(t1-t0)/(t1-t0));
   11645                 :          0 : t5_Vdrainp_sourcep=((((vdsatcv_Vdrainp_sourcep*t3)+(vdsatcv*t3_Vdrainp_sourcep))*(t1-t0)-(vdsatcv*t3)*(t1_Vdrainp_sourcep-t0_Vdrainp_sourcep))/(t1-t0)/(t1-t0));
   11646                 :          0 : t5_Vdrainb_sourcep=((((vdsatcv_Vdrainb_sourcep*t3)+(vdsatcv*t3_Vdrainb_sourcep))*(t1-t0)-(vdsatcv*t3)*(t1_Vdrainb_sourcep-t0_Vdrainb_sourcep))/(t1-t0)/(t1-t0));
   11647                 :          0 : t5_Vbulkp_sourcep=((((vdsatcv_Vbulkp_sourcep*t3)+(vdsatcv*t3_Vbulkp_sourcep))*(t1-t0)-(vdsatcv*t3)*(t1_Vbulkp_sourcep-t0_Vbulkp_sourcep))/(t1-t0)/(t1-t0));
   11648                 :          0 : t5_Vsourceb_sourcep=((((vdsatcv_Vsourceb_sourcep*t3)+(vdsatcv*t3_Vsourceb_sourcep))*(t1-t0)-(vdsatcv*t3)*(t1_Vsourceb_sourcep-t0_Vsourceb_sourcep))/(t1-t0)/(t1-t0));
   11649                 :            : #endif
   11650                 :          0 : t5=((vdsatcv*t3)/(t1-t0));
   11651                 :            : #endif
   11652                 :            : #if defined(_DERIVATE)
   11653                 :          0 : vdseffcv_Vgatep_sourcep=((vdsatcv_Vgatep_sourcep*t4)+(vdsatcv*t4_Vgatep_sourcep));
   11654                 :          0 : vdseffcv_Vdrainp_sourcep=((vdsatcv_Vdrainp_sourcep*t4)+(vdsatcv*t4_Vdrainp_sourcep));
   11655                 :          0 : vdseffcv_Vdrainb_sourcep=((vdsatcv_Vdrainb_sourcep*t4)+(vdsatcv*t4_Vdrainb_sourcep));
   11656                 :          0 : vdseffcv_Vbulkp_sourcep=((vdsatcv_Vbulkp_sourcep*t4)+(vdsatcv*t4_Vbulkp_sourcep));
   11657                 :          0 : vdseffcv_Vsourceb_sourcep=((vdsatcv_Vsourceb_sourcep*t4)+(vdsatcv*t4_Vsourceb_sourcep));
   11658                 :            : #endif
   11659                 :          0 : vdseffcv=(vdsatcv*t4);
   11660                 :            : }
   11661         [ #  # ]:          0 : if
   11662                 :            : (Vds==0.0)
   11663                 :            : {
   11664                 :            : #if defined(_DERIVATE)
   11665                 :          0 : vdseffcv_Vgatep_sourcep=0.0;
   11666                 :          0 : vdseffcv_Vdrainp_sourcep=0.0;
   11667                 :          0 : vdseffcv_Vdrainb_sourcep=0.0;
   11668                 :          0 : vdseffcv_Vbulkp_sourcep=0.0;
   11669                 :          0 : vdseffcv_Vsourceb_sourcep=0.0;
   11670                 :            : #endif
   11671                 :          0 : vdseffcv=0.0;
   11672                 :            : }
   11673                 :            : #if defined(_DERIVATE)
   11674                 :          0 : t0_Vgatep_sourcep=((abulkcv_Vgatep_sourcep*vdseffcv)+(abulkcv*vdseffcv_Vgatep_sourcep));
   11675                 :          0 : t0_Vdrainp_sourcep=((abulkcv_Vdrainp_sourcep*vdseffcv)+(abulkcv*vdseffcv_Vdrainp_sourcep));
   11676                 :          0 : t0_Vdrainb_sourcep=((abulkcv_Vdrainb_sourcep*vdseffcv)+(abulkcv*vdseffcv_Vdrainb_sourcep));
   11677                 :          0 : t0_Vbulkp_sourcep=((abulkcv_Vbulkp_sourcep*vdseffcv)+(abulkcv*vdseffcv_Vbulkp_sourcep));
   11678                 :          0 : t0_Vsourceb_sourcep=((abulkcv_Vsourceb_sourcep*vdseffcv)+(abulkcv*vdseffcv_Vsourceb_sourcep));
   11679                 :            : #endif
   11680                 :          0 : t0=(abulkcv*vdseffcv);
   11681                 :            : #if defined(_DERIVATE)
   11682                 :          0 : t1_Vgatep_sourcep=(12.0*(vgsteff_Vgatep_sourcep-(0.5*t0_Vgatep_sourcep)));
   11683                 :          0 : t1_Vdrainp_sourcep=(12.0*(vgsteff_Vdrainp_sourcep-(0.5*t0_Vdrainp_sourcep)));
   11684                 :          0 : t1_Vdrainb_sourcep=(12.0*(vgsteff_Vdrainb_sourcep-(0.5*t0_Vdrainb_sourcep)));
   11685                 :          0 : t1_Vbulkp_sourcep=(12.0*(vgsteff_Vbulkp_sourcep-(0.5*t0_Vbulkp_sourcep)));
   11686                 :          0 : t1_Vsourceb_sourcep=(12.0*(vgsteff_Vsourceb_sourcep-(0.5*t0_Vsourceb_sourcep)));
   11687                 :            : #endif
   11688                 :          0 : t1=(12.0*((vgsteff-(0.5*t0))+1.0e-20));
   11689                 :            : #if defined(_DERIVATE)
   11690                 :          0 : t2_Vgatep_sourcep=((t0_Vgatep_sourcep*t1-t0*t1_Vgatep_sourcep)/t1/t1);
   11691                 :          0 : t2_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t1-t0*t1_Vdrainp_sourcep)/t1/t1);
   11692                 :          0 : t2_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t1-t0*t1_Vdrainb_sourcep)/t1/t1);
   11693                 :          0 : t2_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t1-t0*t1_Vbulkp_sourcep)/t1/t1);
   11694                 :          0 : t2_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t1-t0*t1_Vsourceb_sourcep)/t1/t1);
   11695                 :            : #endif
   11696                 :          0 : t2=(t0/t1);
   11697                 :            : #if defined(_DERIVATE)
   11698                 :          0 : t3_Vgatep_sourcep=((t0_Vgatep_sourcep*t2)+(t0*t2_Vgatep_sourcep));
   11699                 :          0 : t3_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t2)+(t0*t2_Vdrainp_sourcep));
   11700                 :          0 : t3_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t2)+(t0*t2_Vdrainb_sourcep));
   11701                 :          0 : t3_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t2)+(t0*t2_Vbulkp_sourcep));
   11702                 :          0 : t3_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t2)+(t0*t2_Vsourceb_sourcep));
   11703                 :            : #endif
   11704                 :          0 : t3=(t0*t2);
   11705                 :            : #if defined(_DERIVATE)
   11706                 :          0 : qgate_Vgatep_sourcep=(coxwl*((vgsteff_Vgatep_sourcep-(0.5*t0_Vgatep_sourcep))+t3_Vgatep_sourcep));
   11707                 :          0 : qgate_Vdrainp_sourcep=(coxwl*((vgsteff_Vdrainp_sourcep-(0.5*t0_Vdrainp_sourcep))+t3_Vdrainp_sourcep));
   11708                 :          0 : qgate_Vdrainb_sourcep=(coxwl*((vgsteff_Vdrainb_sourcep-(0.5*t0_Vdrainb_sourcep))+t3_Vdrainb_sourcep));
   11709                 :          0 : qgate_Vbulkp_sourcep=(coxwl*((vgsteff_Vbulkp_sourcep-(0.5*t0_Vbulkp_sourcep))+t3_Vbulkp_sourcep));
   11710                 :          0 : qgate_Vsourceb_sourcep=(coxwl*((vgsteff_Vsourceb_sourcep-(0.5*t0_Vsourceb_sourcep))+t3_Vsourceb_sourcep));
   11711                 :            : #endif
   11712                 :          0 : qgate=(coxwl*((vgsteff-(0.5*t0))+t3));
   11713                 :            : #if defined(_DERIVATE)
   11714                 :          0 : t7_Vgatep_sourcep=(-abulkcv_Vgatep_sourcep);
   11715                 :          0 : t7_Vdrainp_sourcep=(-abulkcv_Vdrainp_sourcep);
   11716                 :          0 : t7_Vdrainb_sourcep=(-abulkcv_Vdrainb_sourcep);
   11717                 :          0 : t7_Vbulkp_sourcep=(-abulkcv_Vbulkp_sourcep);
   11718                 :          0 : t7_Vsourceb_sourcep=(-abulkcv_Vsourceb_sourcep);
   11719                 :            : #endif
   11720                 :          0 : t7=(1.0-abulkcv);
   11721                 :            : #if defined(_DERIVATE)
   11722                 :          0 : qbulk_Vgatem_sourcep=0.0;
   11723                 :          0 : qbulk_Vgatep_sourcep=(((coxwl*t7_Vgatep_sourcep)*((0.5*vdseffcv)-t3))+((coxwl*t7)*((0.5*vdseffcv_Vgatep_sourcep)-t3_Vgatep_sourcep)));
   11724                 :          0 : qbulk_Vdrainp_sourcep=(((coxwl*t7_Vdrainp_sourcep)*((0.5*vdseffcv)-t3))+((coxwl*t7)*((0.5*vdseffcv_Vdrainp_sourcep)-t3_Vdrainp_sourcep)));
   11725                 :          0 : qbulk_Vdrainb_sourcep=(((coxwl*t7_Vdrainb_sourcep)*((0.5*vdseffcv)-t3))+((coxwl*t7)*((0.5*vdseffcv_Vdrainb_sourcep)-t3_Vdrainb_sourcep)));
   11726                 :          0 : qbulk_Vbulkp_sourcep=(((coxwl*t7_Vbulkp_sourcep)*((0.5*vdseffcv)-t3))+((coxwl*t7)*((0.5*vdseffcv_Vbulkp_sourcep)-t3_Vbulkp_sourcep)));
   11727                 :          0 : qbulk_Vsourceb_sourcep=(((coxwl*t7_Vsourceb_sourcep)*((0.5*vdseffcv)-t3))+((coxwl*t7)*((0.5*vdseffcv_Vsourceb_sourcep)-t3_Vsourceb_sourcep)));
   11728                 :            : #endif
   11729                 :          0 : qbulk=((coxwl*t7)*((0.5*vdseffcv)-t3));
   11730         [ #  # ]:          0 : if
   11731                 :            : (xpart>0.5)
   11732                 :            : {
   11733                 :            : #if defined(_DERIVATE)
   11734                 :          0 : t1_Vgatep_sourcep=(t1_Vgatep_sourcep+t1_Vgatep_sourcep);
   11735                 :          0 : t1_Vdrainp_sourcep=(t1_Vdrainp_sourcep+t1_Vdrainp_sourcep);
   11736                 :          0 : t1_Vdrainb_sourcep=(t1_Vdrainb_sourcep+t1_Vdrainb_sourcep);
   11737                 :          0 : t1_Vbulkp_sourcep=(t1_Vbulkp_sourcep+t1_Vbulkp_sourcep);
   11738                 :          0 : t1_Vsourceb_sourcep=(t1_Vsourceb_sourcep+t1_Vsourceb_sourcep);
   11739                 :            : #endif
   11740                 :          0 : t1=(t1+t1);
   11741                 :            : #if defined(_DERIVATE)
   11742                 :          0 : qsrc_Vgatem_sourcep=0.0;
   11743                 :          0 : qsrc_Vgatep_sourcep=((-coxwl)*(((0.5*vgsteff_Vgatep_sourcep)+(0.25*t0_Vgatep_sourcep))-((((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))*t1-(t0*t0)*t1_Vgatep_sourcep)/t1/t1)));
   11744                 :          0 : qsrc_Vdrainp_sourcep=((-coxwl)*(((0.5*vgsteff_Vdrainp_sourcep)+(0.25*t0_Vdrainp_sourcep))-((((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))*t1-(t0*t0)*t1_Vdrainp_sourcep)/t1/t1)));
   11745                 :          0 : qsrc_Vdrainb_sourcep=((-coxwl)*(((0.5*vgsteff_Vdrainb_sourcep)+(0.25*t0_Vdrainb_sourcep))-((((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))*t1-(t0*t0)*t1_Vdrainb_sourcep)/t1/t1)));
   11746                 :          0 : qsrc_Vbulkp_sourcep=((-coxwl)*(((0.5*vgsteff_Vbulkp_sourcep)+(0.25*t0_Vbulkp_sourcep))-((((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))*t1-(t0*t0)*t1_Vbulkp_sourcep)/t1/t1)));
   11747                 :          0 : qsrc_Vsourceb_sourcep=((-coxwl)*(((0.5*vgsteff_Vsourceb_sourcep)+(0.25*t0_Vsourceb_sourcep))-((((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))*t1-(t0*t0)*t1_Vsourceb_sourcep)/t1/t1)));
   11748                 :            : #endif
   11749                 :          0 : qsrc=((-coxwl)*(((0.5*vgsteff)+(0.25*t0))-((t0*t0)/t1)));
   11750                 :            : }
   11751                 :            : else
   11752                 :            : {
   11753         [ #  # ]:          0 : if
   11754                 :            : (xpart<0.5)
   11755                 :            : {
   11756                 :            : #if defined(_DERIVATE)
   11757                 :          0 : t1_Vgatep_sourcep=(t1_Vgatep_sourcep/12.0);
   11758                 :          0 : t1_Vdrainp_sourcep=(t1_Vdrainp_sourcep/12.0);
   11759                 :          0 : t1_Vdrainb_sourcep=(t1_Vdrainb_sourcep/12.0);
   11760                 :          0 : t1_Vbulkp_sourcep=(t1_Vbulkp_sourcep/12.0);
   11761                 :          0 : t1_Vsourceb_sourcep=(t1_Vsourceb_sourcep/12.0);
   11762                 :            : #endif
   11763                 :          0 : t1=(t1/12.0);
   11764                 :            : #if defined(_DERIVATE)
   11765                 :          0 : t2_Vgatep_sourcep=(-(0.5*coxwl)*((t1_Vgatep_sourcep*t1)+(t1*t1_Vgatep_sourcep))/(t1*t1)/(t1*t1));
   11766                 :          0 : t2_Vdrainp_sourcep=(-(0.5*coxwl)*((t1_Vdrainp_sourcep*t1)+(t1*t1_Vdrainp_sourcep))/(t1*t1)/(t1*t1));
   11767                 :          0 : t2_Vdrainb_sourcep=(-(0.5*coxwl)*((t1_Vdrainb_sourcep*t1)+(t1*t1_Vdrainb_sourcep))/(t1*t1)/(t1*t1));
   11768                 :          0 : t2_Vbulkp_sourcep=(-(0.5*coxwl)*((t1_Vbulkp_sourcep*t1)+(t1*t1_Vbulkp_sourcep))/(t1*t1)/(t1*t1));
   11769                 :          0 : t2_Vsourceb_sourcep=(-(0.5*coxwl)*((t1_Vsourceb_sourcep*t1)+(t1*t1_Vsourceb_sourcep))/(t1*t1)/(t1*t1));
   11770                 :            : #endif
   11771                 :          0 : t2=((0.5*coxwl)/(t1*t1));
   11772                 :            : #if defined(_DERIVATE)
   11773                 :          0 : t3_Vgatep_sourcep=(((vgsteff_Vgatep_sourcep*((((2.0*t0)*t0)/3.0)+(vgsteff*(vgsteff-((4.0*t0)/3.0)))))+(vgsteff*(((((2.0*t0_Vgatep_sourcep)*t0)+((2.0*t0)*t0_Vgatep_sourcep))/3.0)+((vgsteff_Vgatep_sourcep*(vgsteff-((4.0*t0)/3.0)))+(vgsteff*(vgsteff_Vgatep_sourcep-((4.0*t0_Vgatep_sourcep)/3.0)))))))-((((((2.0*t0_Vgatep_sourcep)*t0)+((2.0*t0)*t0_Vgatep_sourcep))*t0)+(((2.0*t0)*t0)*t0_Vgatep_sourcep))/15.0));
   11774                 :          0 : t3_Vdrainp_sourcep=(((vgsteff_Vdrainp_sourcep*((((2.0*t0)*t0)/3.0)+(vgsteff*(vgsteff-((4.0*t0)/3.0)))))+(vgsteff*(((((2.0*t0_Vdrainp_sourcep)*t0)+((2.0*t0)*t0_Vdrainp_sourcep))/3.0)+((vgsteff_Vdrainp_sourcep*(vgsteff-((4.0*t0)/3.0)))+(vgsteff*(vgsteff_Vdrainp_sourcep-((4.0*t0_Vdrainp_sourcep)/3.0)))))))-((((((2.0*t0_Vdrainp_sourcep)*t0)+((2.0*t0)*t0_Vdrainp_sourcep))*t0)+(((2.0*t0)*t0)*t0_Vdrainp_sourcep))/15.0));
   11775                 :          0 : t3_Vdrainb_sourcep=(((vgsteff_Vdrainb_sourcep*((((2.0*t0)*t0)/3.0)+(vgsteff*(vgsteff-((4.0*t0)/3.0)))))+(vgsteff*(((((2.0*t0_Vdrainb_sourcep)*t0)+((2.0*t0)*t0_Vdrainb_sourcep))/3.0)+((vgsteff_Vdrainb_sourcep*(vgsteff-((4.0*t0)/3.0)))+(vgsteff*(vgsteff_Vdrainb_sourcep-((4.0*t0_Vdrainb_sourcep)/3.0)))))))-((((((2.0*t0_Vdrainb_sourcep)*t0)+((2.0*t0)*t0_Vdrainb_sourcep))*t0)+(((2.0*t0)*t0)*t0_Vdrainb_sourcep))/15.0));
   11776                 :          0 : t3_Vbulkp_sourcep=(((vgsteff_Vbulkp_sourcep*((((2.0*t0)*t0)/3.0)+(vgsteff*(vgsteff-((4.0*t0)/3.0)))))+(vgsteff*(((((2.0*t0_Vbulkp_sourcep)*t0)+((2.0*t0)*t0_Vbulkp_sourcep))/3.0)+((vgsteff_Vbulkp_sourcep*(vgsteff-((4.0*t0)/3.0)))+(vgsteff*(vgsteff_Vbulkp_sourcep-((4.0*t0_Vbulkp_sourcep)/3.0)))))))-((((((2.0*t0_Vbulkp_sourcep)*t0)+((2.0*t0)*t0_Vbulkp_sourcep))*t0)+(((2.0*t0)*t0)*t0_Vbulkp_sourcep))/15.0));
   11777                 :          0 : t3_Vsourceb_sourcep=(((vgsteff_Vsourceb_sourcep*((((2.0*t0)*t0)/3.0)+(vgsteff*(vgsteff-((4.0*t0)/3.0)))))+(vgsteff*(((((2.0*t0_Vsourceb_sourcep)*t0)+((2.0*t0)*t0_Vsourceb_sourcep))/3.0)+((vgsteff_Vsourceb_sourcep*(vgsteff-((4.0*t0)/3.0)))+(vgsteff*(vgsteff_Vsourceb_sourcep-((4.0*t0_Vsourceb_sourcep)/3.0)))))))-((((((2.0*t0_Vsourceb_sourcep)*t0)+((2.0*t0)*t0_Vsourceb_sourcep))*t0)+(((2.0*t0)*t0)*t0_Vsourceb_sourcep))/15.0));
   11778                 :            : #endif
   11779                 :          0 : t3=((vgsteff*((((2.0*t0)*t0)/3.0)+(vgsteff*(vgsteff-((4.0*t0)/3.0)))))-((((2.0*t0)*t0)*t0)/15.0));
   11780                 :            : #if defined(_DERIVATE)
   11781                 :          0 : qsrc_Vgatem_sourcep=0.0;
   11782                 :          0 : qsrc_Vgatep_sourcep=(((-t2_Vgatep_sourcep)*t3)+((-t2)*t3_Vgatep_sourcep));
   11783                 :          0 : qsrc_Vdrainp_sourcep=(((-t2_Vdrainp_sourcep)*t3)+((-t2)*t3_Vdrainp_sourcep));
   11784                 :          0 : qsrc_Vdrainb_sourcep=(((-t2_Vdrainb_sourcep)*t3)+((-t2)*t3_Vdrainb_sourcep));
   11785                 :          0 : qsrc_Vbulkp_sourcep=(((-t2_Vbulkp_sourcep)*t3)+((-t2)*t3_Vbulkp_sourcep));
   11786                 :          0 : qsrc_Vsourceb_sourcep=(((-t2_Vsourceb_sourcep)*t3)+((-t2)*t3_Vsourceb_sourcep));
   11787                 :            : #endif
   11788                 :          0 : qsrc=((-t2)*t3);
   11789                 :            : }
   11790                 :            : else
   11791                 :            : {
   11792                 :            : #if defined(_DERIVATE)
   11793                 :          0 : qsrc_Vgatem_sourcep=0.0;
   11794                 :          0 : qsrc_Vgatep_sourcep=((-0.5)*(qgate_Vgatep_sourcep+qbulk_Vgatep_sourcep));
   11795                 :          0 : qsrc_Vdrainp_sourcep=((-0.5)*(qgate_Vdrainp_sourcep+qbulk_Vdrainp_sourcep));
   11796                 :          0 : qsrc_Vdrainb_sourcep=((-0.5)*(qgate_Vdrainb_sourcep+qbulk_Vdrainb_sourcep));
   11797                 :          0 : qsrc_Vbulkp_sourcep=((-0.5)*(qgate_Vbulkp_sourcep+qbulk_Vbulkp_sourcep));
   11798                 :          0 : qsrc_Vsourceb_sourcep=((-0.5)*(qgate_Vsourceb_sourcep+qbulk_Vsourceb_sourcep));
   11799                 :            : #endif
   11800                 :          0 : qsrc=((-0.5)*(qgate+qbulk));
   11801                 :            : }
   11802                 :            : }
   11803                 :            : #if defined(_DERIVATE)
   11804                 :          0 : qgate_Vgatep_sourcep=((qgate_Vgatep_sourcep+qac0_Vgatep_sourcep)+qsub0_Vgatep_sourcep);
   11805                 :          0 : qgate_Vdrainp_sourcep=((qgate_Vdrainp_sourcep+qac0_Vdrainp_sourcep)+qsub0_Vdrainp_sourcep);
   11806                 :          0 : qgate_Vdrainb_sourcep=((qgate_Vdrainb_sourcep+qac0_Vdrainb_sourcep)+qsub0_Vdrainb_sourcep);
   11807                 :          0 : qgate_Vbulkp_sourcep=((qgate_Vbulkp_sourcep+qac0_Vbulkp_sourcep)+qsub0_Vbulkp_sourcep);
   11808                 :          0 : qgate_Vsourceb_sourcep=((qgate_Vsourceb_sourcep+qac0_Vsourceb_sourcep)+qsub0_Vsourceb_sourcep);
   11809                 :            : #endif
   11810                 :          0 : qgate=((qgate+qac0)+qsub0);
   11811                 :            : #if defined(_DERIVATE)
   11812                 :          0 : qbulk_Vgatem_sourcep=0.0;
   11813                 :          0 : qbulk_Vgatep_sourcep=(qbulk_Vgatep_sourcep-(qac0_Vgatep_sourcep+qsub0_Vgatep_sourcep));
   11814                 :          0 : qbulk_Vdrainp_sourcep=(qbulk_Vdrainp_sourcep-(qac0_Vdrainp_sourcep+qsub0_Vdrainp_sourcep));
   11815                 :          0 : qbulk_Vdrainb_sourcep=(qbulk_Vdrainb_sourcep-(qac0_Vdrainb_sourcep+qsub0_Vdrainb_sourcep));
   11816                 :          0 : qbulk_Vbulkp_sourcep=(qbulk_Vbulkp_sourcep-(qac0_Vbulkp_sourcep+qsub0_Vbulkp_sourcep));
   11817                 :          0 : qbulk_Vsourceb_sourcep=(qbulk_Vsourceb_sourcep-(qac0_Vsourceb_sourcep+qsub0_Vsourceb_sourcep));
   11818                 :            : #endif
   11819                 :          0 : qbulk=(qbulk-(qac0+qsub0));
   11820                 :            : #if defined(_DERIVATE)
   11821                 :          0 : qdrn_Vgatem_sourcep=0.0;
   11822                 :          0 : qdrn_Vgatep_sourcep=(-((qgate_Vgatep_sourcep+qbulk_Vgatep_sourcep)+qsrc_Vgatep_sourcep));
   11823                 :          0 : qdrn_Vdrainp_sourcep=(-((qgate_Vdrainp_sourcep+qbulk_Vdrainp_sourcep)+qsrc_Vdrainp_sourcep));
   11824                 :          0 : qdrn_Vdrainb_sourcep=(-((qgate_Vdrainb_sourcep+qbulk_Vdrainb_sourcep)+qsrc_Vdrainb_sourcep));
   11825                 :          0 : qdrn_Vbulkp_sourcep=(-((qgate_Vbulkp_sourcep+qbulk_Vbulkp_sourcep)+qsrc_Vbulkp_sourcep));
   11826                 :          0 : qdrn_Vsourceb_sourcep=(-((qgate_Vsourceb_sourcep+qbulk_Vsourceb_sourcep)+qsrc_Vsourceb_sourcep));
   11827                 :            : #endif
   11828                 :          0 : qdrn=(-((qgate+qbulk)+qsrc));
   11829                 :            : }
   11830                 :            : else
   11831                 :            : {
   11832         [ +  - ]:       7356 : if
   11833                 :            : (capmod==2)
   11834                 :            : {
   11835                 :            : #if defined(_DERIVATE)
   11836                 :       7356 : v3_Vgatep_sourcep=(-Vgs_eff_Vgatep_sourcep);
   11837                 :       7356 : v3_Vdrainp_sourcep=((-Vgs_eff_Vdrainp_sourcep)+vbseffcv_Vdrainp_sourcep);
   11838                 :       7356 : v3_Vdrainb_sourcep=((-Vgs_eff_Vdrainb_sourcep)+vbseffcv_Vdrainb_sourcep);
   11839                 :       7356 : v3_Vbulkp_sourcep=((-Vgs_eff_Vbulkp_sourcep)+vbseffcv_Vbulkp_sourcep);
   11840                 :       7356 : v3_Vsourceb_sourcep=((-Vgs_eff_Vsourceb_sourcep)+vbseffcv_Vsourceb_sourcep);
   11841                 :            : #endif
   11842                 :       7356 : v3=(((vfbzb-Vgs_eff)+vbseffcv)-0.02);
   11843         [ +  - ]:       7356 : if
   11844                 :            : (vfbzb<=0.0)
   11845                 :            : {
   11846                 :            : {
   11847                 :       7356 : double m00_sqrt(d00_sqrt0,((v3*v3)-((4.0*0.02)*vfbzb)))
   11848                 :            : #if defined(_DERIVATE)
   11849                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((v3*v3)-((4.0*0.02)*vfbzb)))
   11850                 :            : #endif
   11851                 :            : #if defined(_DERIVATE)
   11852                 :       7356 : t0_Vgatep_sourcep=((v3_Vgatep_sourcep*v3)+(v3*v3_Vgatep_sourcep))*d10_sqrt0;
   11853                 :       7356 : t0_Vdrainp_sourcep=((v3_Vdrainp_sourcep*v3)+(v3*v3_Vdrainp_sourcep))*d10_sqrt0;
   11854                 :       7356 : t0_Vdrainb_sourcep=((v3_Vdrainb_sourcep*v3)+(v3*v3_Vdrainb_sourcep))*d10_sqrt0;
   11855                 :       7356 : t0_Vbulkp_sourcep=((v3_Vbulkp_sourcep*v3)+(v3*v3_Vbulkp_sourcep))*d10_sqrt0;
   11856                 :       7356 : t0_Vsourceb_sourcep=((v3_Vsourceb_sourcep*v3)+(v3*v3_Vsourceb_sourcep))*d10_sqrt0;
   11857                 :            : #endif
   11858                 :       7356 : t0=d00_sqrt0;
   11859                 :            : }
   11860                 :            : }
   11861                 :            : else
   11862                 :            : {
   11863                 :            : {
   11864                 :          0 : double m00_sqrt(d00_sqrt0,((v3*v3)+((4.0*0.02)*vfbzb)))
   11865                 :            : #if defined(_DERIVATE)
   11866                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((v3*v3)+((4.0*0.02)*vfbzb)))
   11867                 :            : #endif
   11868                 :            : #if defined(_DERIVATE)
   11869                 :          0 : t0_Vgatep_sourcep=((v3_Vgatep_sourcep*v3)+(v3*v3_Vgatep_sourcep))*d10_sqrt0;
   11870                 :          0 : t0_Vdrainp_sourcep=((v3_Vdrainp_sourcep*v3)+(v3*v3_Vdrainp_sourcep))*d10_sqrt0;
   11871                 :          0 : t0_Vdrainb_sourcep=((v3_Vdrainb_sourcep*v3)+(v3*v3_Vdrainb_sourcep))*d10_sqrt0;
   11872                 :          0 : t0_Vbulkp_sourcep=((v3_Vbulkp_sourcep*v3)+(v3*v3_Vbulkp_sourcep))*d10_sqrt0;
   11873                 :          0 : t0_Vsourceb_sourcep=((v3_Vsourceb_sourcep*v3)+(v3*v3_Vsourceb_sourcep))*d10_sqrt0;
   11874                 :            : #endif
   11875                 :          0 : t0=d00_sqrt0;
   11876                 :            : }
   11877                 :            : }
   11878                 :            : #if defined(_DERIVATE)
   11879                 :       7356 : t1_Vgatep_sourcep=(0.5*((v3_Vgatep_sourcep*t0-v3*t0_Vgatep_sourcep)/t0/t0));
   11880                 :       7356 : t1_Vdrainp_sourcep=(0.5*((v3_Vdrainp_sourcep*t0-v3*t0_Vdrainp_sourcep)/t0/t0));
   11881                 :       7356 : t1_Vdrainb_sourcep=(0.5*((v3_Vdrainb_sourcep*t0-v3*t0_Vdrainb_sourcep)/t0/t0));
   11882                 :       7356 : t1_Vbulkp_sourcep=(0.5*((v3_Vbulkp_sourcep*t0-v3*t0_Vbulkp_sourcep)/t0/t0));
   11883                 :       7356 : t1_Vsourceb_sourcep=(0.5*((v3_Vsourceb_sourcep*t0-v3*t0_Vsourceb_sourcep)/t0/t0));
   11884                 :            : #endif
   11885                 :       7356 : t1=(0.5*(1.0+(v3/t0)));
   11886                 :            : #if defined(_DERIVATE)
   11887                 :       7356 : vfbeff_Vgatep_sourcep=(-(0.5*(v3_Vgatep_sourcep+t0_Vgatep_sourcep)));
   11888                 :       7356 : vfbeff_Vdrainp_sourcep=(-(0.5*(v3_Vdrainp_sourcep+t0_Vdrainp_sourcep)));
   11889                 :       7356 : vfbeff_Vdrainb_sourcep=(-(0.5*(v3_Vdrainb_sourcep+t0_Vdrainb_sourcep)));
   11890                 :       7356 : vfbeff_Vbulkp_sourcep=(-(0.5*(v3_Vbulkp_sourcep+t0_Vbulkp_sourcep)));
   11891                 :       7356 : vfbeff_Vsourceb_sourcep=(-(0.5*(v3_Vsourceb_sourcep+t0_Vsourceb_sourcep)));
   11892                 :            : #endif
   11893                 :       7356 : vfbeff=(vfbzb-(0.5*(v3+t0)));
   11894                 :       7356 : tox=(1.0e8*toxp);
   11895                 :            : #if defined(_DERIVATE)
   11896                 :       7356 : t0_Vgatep_sourcep=(Vgs_eff_Vgatep_sourcep/tox);
   11897                 :       7356 : t0_Vdrainp_sourcep=((Vgs_eff_Vdrainp_sourcep-vbseffcv_Vdrainp_sourcep)/tox);
   11898                 :       7356 : t0_Vdrainb_sourcep=((Vgs_eff_Vdrainb_sourcep-vbseffcv_Vdrainb_sourcep)/tox);
   11899                 :       7356 : t0_Vbulkp_sourcep=((Vgs_eff_Vbulkp_sourcep-vbseffcv_Vbulkp_sourcep)/tox);
   11900                 :       7356 : t0_Vsourceb_sourcep=((Vgs_eff_Vsourceb_sourcep-vbseffcv_Vsourceb_sourcep)/tox);
   11901                 :            : #endif
   11902                 :       7356 : t0=(((Vgs_eff-vbseffcv)-vfbzb)/tox);
   11903                 :            : #if defined(_DERIVATE)
   11904                 :       7356 : tmp_Vgatep_sourcep=t0_Vgatep_sourcep*acde;
   11905                 :       7356 : tmp_Vdrainp_sourcep=t0_Vdrainp_sourcep*acde;
   11906                 :       7356 : tmp_Vdrainb_sourcep=t0_Vdrainb_sourcep*acde;
   11907                 :       7356 : tmp_Vbulkp_sourcep=t0_Vbulkp_sourcep*acde;
   11908                 :       7356 : tmp_Vsourceb_sourcep=t0_Vsourceb_sourcep*acde;
   11909                 :            : #endif
   11910                 :       7356 : tmp=(t0*acde);
   11911 [ +  - ][ +  - ]:       7356 : if
   11912                 :            : (((-34.0)<tmp)&&(tmp<34.0))
   11913                 :            : {
   11914                 :            : {
   11915                 :       7356 : double m00_exp(d00_exp0,tmp)
   11916                 :            : #if defined(_DERIVATE)
   11917                 :            : #define d10_exp0 d00_exp0
   11918                 :            : #endif
   11919                 :            : #if defined(_DERIVATE)
   11920                 :       7356 : tcen_Vgatep_sourcep=(ldeb*tmp_Vgatep_sourcep*d10_exp0);
   11921                 :       7356 : tcen_Vdrainp_sourcep=(ldeb*tmp_Vdrainp_sourcep*d10_exp0);
   11922                 :       7356 : tcen_Vdrainb_sourcep=(ldeb*tmp_Vdrainb_sourcep*d10_exp0);
   11923                 :       7356 : tcen_Vbulkp_sourcep=(ldeb*tmp_Vbulkp_sourcep*d10_exp0);
   11924                 :       7356 : tcen_Vsourceb_sourcep=(ldeb*tmp_Vsourceb_sourcep*d10_exp0);
   11925                 :            : #endif
   11926                 :       7356 : tcen=(ldeb*d00_exp0);
   11927                 :       7356 : }
   11928                 :            : }
   11929                 :            : else
   11930                 :            : {
   11931         [ #  # ]:          0 : if
   11932                 :            : (tmp<=(-34.0))
   11933                 :            : {
   11934                 :            : #if defined(_DERIVATE)
   11935                 :          0 : tcen_Vgatep_sourcep=0.0;
   11936                 :          0 : tcen_Vdrainp_sourcep=0.0;
   11937                 :          0 : tcen_Vdrainb_sourcep=0.0;
   11938                 :          0 : tcen_Vbulkp_sourcep=0.0;
   11939                 :          0 : tcen_Vsourceb_sourcep=0.0;
   11940                 :            : #endif
   11941                 :          0 : tcen=(ldeb*1.713908431e-15);
   11942                 :            : }
   11943                 :            : else
   11944                 :            : {
   11945                 :            : #if defined(_DERIVATE)
   11946                 :          0 : tcen_Vgatep_sourcep=0.0;
   11947                 :          0 : tcen_Vdrainp_sourcep=0.0;
   11948                 :          0 : tcen_Vdrainb_sourcep=0.0;
   11949                 :          0 : tcen_Vbulkp_sourcep=0.0;
   11950                 :          0 : tcen_Vsourceb_sourcep=0.0;
   11951                 :            : #endif
   11952                 :          0 : tcen=(ldeb*5.834617425e14);
   11953                 :            : }
   11954                 :            : }
   11955                 :       7356 : link=(1.0e-3*toxp);
   11956                 :            : #if defined(_DERIVATE)
   11957                 :       7356 : v3_Vgatep_sourcep=(-tcen_Vgatep_sourcep);
   11958                 :       7356 : v3_Vdrainp_sourcep=(-tcen_Vdrainp_sourcep);
   11959                 :       7356 : v3_Vdrainb_sourcep=(-tcen_Vdrainb_sourcep);
   11960                 :       7356 : v3_Vbulkp_sourcep=(-tcen_Vbulkp_sourcep);
   11961                 :       7356 : v3_Vsourceb_sourcep=(-tcen_Vsourceb_sourcep);
   11962                 :            : #endif
   11963                 :       7356 : v3=((ldeb-tcen)-link);
   11964                 :            : {
   11965                 :       7356 : double m00_sqrt(d00_sqrt0,((v3*v3)+((4.0*link)*ldeb)))
   11966                 :            : #if defined(_DERIVATE)
   11967                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((v3*v3)+((4.0*link)*ldeb)))
   11968                 :            : #endif
   11969                 :            : #if defined(_DERIVATE)
   11970                 :       7356 : v4_Vgatep_sourcep=((v3_Vgatep_sourcep*v3)+(v3*v3_Vgatep_sourcep))*d10_sqrt0;
   11971                 :       7356 : v4_Vdrainp_sourcep=((v3_Vdrainp_sourcep*v3)+(v3*v3_Vdrainp_sourcep))*d10_sqrt0;
   11972                 :       7356 : v4_Vdrainb_sourcep=((v3_Vdrainb_sourcep*v3)+(v3*v3_Vdrainb_sourcep))*d10_sqrt0;
   11973                 :       7356 : v4_Vbulkp_sourcep=((v3_Vbulkp_sourcep*v3)+(v3*v3_Vbulkp_sourcep))*d10_sqrt0;
   11974                 :       7356 : v4_Vsourceb_sourcep=((v3_Vsourceb_sourcep*v3)+(v3*v3_Vsourceb_sourcep))*d10_sqrt0;
   11975                 :            : #endif
   11976                 :       7356 : v4=d00_sqrt0;
   11977                 :            : }
   11978                 :            : #if defined(_DERIVATE)
   11979                 :       7356 : tcen_Vgatep_sourcep=(-(0.5*(v3_Vgatep_sourcep+v4_Vgatep_sourcep)));
   11980                 :       7356 : tcen_Vdrainp_sourcep=(-(0.5*(v3_Vdrainp_sourcep+v4_Vdrainp_sourcep)));
   11981                 :       7356 : tcen_Vdrainb_sourcep=(-(0.5*(v3_Vdrainb_sourcep+v4_Vdrainb_sourcep)));
   11982                 :       7356 : tcen_Vbulkp_sourcep=(-(0.5*(v3_Vbulkp_sourcep+v4_Vbulkp_sourcep)));
   11983                 :       7356 : tcen_Vsourceb_sourcep=(-(0.5*(v3_Vsourceb_sourcep+v4_Vsourceb_sourcep)));
   11984                 :            : #endif
   11985                 :       7356 : tcen=(ldeb-(0.5*(v3+v4)));
   11986                 :            : #if defined(_DERIVATE)
   11987                 :       7356 : ccen_Vgatep_sourcep=(-1.03594e-10*tcen_Vgatep_sourcep/tcen/tcen);
   11988                 :       7356 : ccen_Vdrainp_sourcep=(-1.03594e-10*tcen_Vdrainp_sourcep/tcen/tcen);
   11989                 :       7356 : ccen_Vdrainb_sourcep=(-1.03594e-10*tcen_Vdrainb_sourcep/tcen/tcen);
   11990                 :       7356 : ccen_Vbulkp_sourcep=(-1.03594e-10*tcen_Vbulkp_sourcep/tcen/tcen);
   11991                 :       7356 : ccen_Vsourceb_sourcep=(-1.03594e-10*tcen_Vsourceb_sourcep/tcen/tcen);
   11992                 :            : #endif
   11993                 :       7356 : ccen=(1.03594e-10/tcen);
   11994                 :            : #if defined(_DERIVATE)
   11995                 :       7356 : t2_Vgatep_sourcep=(-coxp*ccen_Vgatep_sourcep/(coxp+ccen)/(coxp+ccen));
   11996                 :       7356 : t2_Vdrainp_sourcep=(-coxp*ccen_Vdrainp_sourcep/(coxp+ccen)/(coxp+ccen));
   11997                 :       7356 : t2_Vdrainb_sourcep=(-coxp*ccen_Vdrainb_sourcep/(coxp+ccen)/(coxp+ccen));
   11998                 :       7356 : t2_Vbulkp_sourcep=(-coxp*ccen_Vbulkp_sourcep/(coxp+ccen)/(coxp+ccen));
   11999                 :       7356 : t2_Vsourceb_sourcep=(-coxp*ccen_Vsourceb_sourcep/(coxp+ccen)/(coxp+ccen));
   12000                 :            : #endif
   12001                 :       7356 : t2=(coxp/(coxp+ccen));
   12002                 :            : #if defined(_DERIVATE)
   12003                 :       7356 : coxeff_Vgatep_sourcep=((t2_Vgatep_sourcep*ccen)+(t2*ccen_Vgatep_sourcep));
   12004                 :       7356 : coxeff_Vdrainp_sourcep=((t2_Vdrainp_sourcep*ccen)+(t2*ccen_Vdrainp_sourcep));
   12005                 :       7356 : coxeff_Vdrainb_sourcep=((t2_Vdrainb_sourcep*ccen)+(t2*ccen_Vdrainb_sourcep));
   12006                 :       7356 : coxeff_Vbulkp_sourcep=((t2_Vbulkp_sourcep*ccen)+(t2*ccen_Vbulkp_sourcep));
   12007                 :       7356 : coxeff_Vsourceb_sourcep=((t2_Vsourceb_sourcep*ccen)+(t2*ccen_Vsourceb_sourcep));
   12008                 :            : #endif
   12009                 :       7356 : coxeff=(t2*ccen);
   12010                 :            : #if defined(_DERIVATE)
   12011                 :       7356 : coxwlcen_Vgatep_sourcep=((coxwl*coxeff_Vgatep_sourcep)/coxe);
   12012                 :       7356 : coxwlcen_Vdrainp_sourcep=((coxwl*coxeff_Vdrainp_sourcep)/coxe);
   12013                 :       7356 : coxwlcen_Vdrainb_sourcep=((coxwl*coxeff_Vdrainb_sourcep)/coxe);
   12014                 :       7356 : coxwlcen_Vbulkp_sourcep=((coxwl*coxeff_Vbulkp_sourcep)/coxe);
   12015                 :       7356 : coxwlcen_Vsourceb_sourcep=((coxwl*coxeff_Vsourceb_sourcep)/coxe);
   12016                 :            : #endif
   12017                 :       7356 : coxwlcen=((coxwl*coxeff)/coxe);
   12018                 :            : #if defined(_DERIVATE)
   12019                 :       7356 : qac0_Vgatep_sourcep=((coxwlcen_Vgatep_sourcep*(vfbeff-vfbzb))+(coxwlcen*vfbeff_Vgatep_sourcep));
   12020                 :       7356 : qac0_Vdrainp_sourcep=((coxwlcen_Vdrainp_sourcep*(vfbeff-vfbzb))+(coxwlcen*vfbeff_Vdrainp_sourcep));
   12021                 :       7356 : qac0_Vdrainb_sourcep=((coxwlcen_Vdrainb_sourcep*(vfbeff-vfbzb))+(coxwlcen*vfbeff_Vdrainb_sourcep));
   12022                 :       7356 : qac0_Vbulkp_sourcep=((coxwlcen_Vbulkp_sourcep*(vfbeff-vfbzb))+(coxwlcen*vfbeff_Vbulkp_sourcep));
   12023                 :       7356 : qac0_Vsourceb_sourcep=((coxwlcen_Vsourceb_sourcep*(vfbeff-vfbzb))+(coxwlcen*vfbeff_Vsourceb_sourcep));
   12024                 :            : #endif
   12025                 :       7356 : qac0=(coxwlcen*(vfbeff-vfbzb));
   12026                 :            : #if defined(_DERIVATE)
   12027                 :       7356 : t0_Vgatep_sourcep=0.0;
   12028                 :       7356 : t0_Vdrainp_sourcep=0.0;
   12029                 :       7356 : t0_Vdrainb_sourcep=0.0;
   12030                 :       7356 : t0_Vbulkp_sourcep=0.0;
   12031                 :       7356 : t0_Vsourceb_sourcep=0.0;
   12032                 :            : #endif
   12033                 :       7356 : t0=(0.5*k1ox);
   12034                 :            : #if defined(_DERIVATE)
   12035                 :       7356 : t3_Vgatep_sourcep=((Vgs_eff_Vgatep_sourcep-vfbeff_Vgatep_sourcep)-vgsteff_Vgatep_sourcep);
   12036                 :       7356 : t3_Vdrainp_sourcep=(((Vgs_eff_Vdrainp_sourcep-vfbeff_Vdrainp_sourcep)-vbseffcv_Vdrainp_sourcep)-vgsteff_Vdrainp_sourcep);
   12037                 :       7356 : t3_Vdrainb_sourcep=(((Vgs_eff_Vdrainb_sourcep-vfbeff_Vdrainb_sourcep)-vbseffcv_Vdrainb_sourcep)-vgsteff_Vdrainb_sourcep);
   12038                 :       7356 : t3_Vbulkp_sourcep=(((Vgs_eff_Vbulkp_sourcep-vfbeff_Vbulkp_sourcep)-vbseffcv_Vbulkp_sourcep)-vgsteff_Vbulkp_sourcep);
   12039                 :       7356 : t3_Vsourceb_sourcep=(((Vgs_eff_Vsourceb_sourcep-vfbeff_Vsourceb_sourcep)-vbseffcv_Vsourceb_sourcep)-vgsteff_Vsourceb_sourcep);
   12040                 :            : #endif
   12041                 :       7356 : t3=(((Vgs_eff-vfbeff)-vbseffcv)-vgsteff);
   12042         [ -  + ]:       7356 : if
   12043                 :            : (k1ox==0.0)
   12044                 :            : {
   12045                 :            : #if defined(_DERIVATE)
   12046                 :          0 : t1_Vgatep_sourcep=0.0;
   12047                 :          0 : t1_Vdrainp_sourcep=0.0;
   12048                 :          0 : t1_Vdrainb_sourcep=0.0;
   12049                 :          0 : t1_Vbulkp_sourcep=0.0;
   12050                 :          0 : t1_Vsourceb_sourcep=0.0;
   12051                 :            : #endif
   12052                 :          0 : t1=0.0;
   12053                 :            : #if defined(_DERIVATE)
   12054                 :          0 : t2_Vgatep_sourcep=0.0;
   12055                 :          0 : t2_Vdrainp_sourcep=0.0;
   12056                 :          0 : t2_Vdrainb_sourcep=0.0;
   12057                 :          0 : t2_Vbulkp_sourcep=0.0;
   12058                 :          0 : t2_Vsourceb_sourcep=0.0;
   12059                 :            : #endif
   12060                 :          0 : t2=0.0;
   12061                 :            : }
   12062                 :            : else
   12063                 :            : {
   12064         [ -  + ]:       7356 : if
   12065                 :            : (t3<0.0)
   12066                 :            : {
   12067                 :            : #if defined(_DERIVATE)
   12068                 :          0 : t1_Vgatep_sourcep=(t0_Vgatep_sourcep+(t3_Vgatep_sourcep/k1ox));
   12069                 :          0 : t1_Vdrainp_sourcep=(t0_Vdrainp_sourcep+(t3_Vdrainp_sourcep/k1ox));
   12070                 :          0 : t1_Vdrainb_sourcep=(t0_Vdrainb_sourcep+(t3_Vdrainb_sourcep/k1ox));
   12071                 :          0 : t1_Vbulkp_sourcep=(t0_Vbulkp_sourcep+(t3_Vbulkp_sourcep/k1ox));
   12072                 :          0 : t1_Vsourceb_sourcep=(t0_Vsourceb_sourcep+(t3_Vsourceb_sourcep/k1ox));
   12073                 :            : #endif
   12074                 :          0 : t1=(t0+(t3/k1ox));
   12075                 :            : #if defined(_DERIVATE)
   12076                 :          0 : t2_Vgatep_sourcep=coxwlcen_Vgatep_sourcep;
   12077                 :          0 : t2_Vdrainp_sourcep=coxwlcen_Vdrainp_sourcep;
   12078                 :          0 : t2_Vdrainb_sourcep=coxwlcen_Vdrainb_sourcep;
   12079                 :          0 : t2_Vbulkp_sourcep=coxwlcen_Vbulkp_sourcep;
   12080                 :          0 : t2_Vsourceb_sourcep=coxwlcen_Vsourceb_sourcep;
   12081                 :            : #endif
   12082                 :          0 : t2=coxwlcen;
   12083                 :            : }
   12084                 :            : else
   12085                 :            : {
   12086                 :            : {
   12087                 :       7356 : double m00_sqrt(d00_sqrt0,((t0*t0)+t3))
   12088                 :            : #if defined(_DERIVATE)
   12089                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+t3))
   12090                 :            : #endif
   12091                 :            : #if defined(_DERIVATE)
   12092                 :       7356 : t1_Vgatep_sourcep=(((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))+t3_Vgatep_sourcep)*d10_sqrt0;
   12093                 :       7356 : t1_Vdrainp_sourcep=(((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))+t3_Vdrainp_sourcep)*d10_sqrt0;
   12094                 :       7356 : t1_Vdrainb_sourcep=(((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))+t3_Vdrainb_sourcep)*d10_sqrt0;
   12095                 :       7356 : t1_Vbulkp_sourcep=(((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))+t3_Vbulkp_sourcep)*d10_sqrt0;
   12096                 :       7356 : t1_Vsourceb_sourcep=(((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))+t3_Vsourceb_sourcep)*d10_sqrt0;
   12097                 :            : #endif
   12098                 :       7356 : t1=d00_sqrt0;
   12099                 :            : }
   12100                 :            : #if defined(_DERIVATE)
   12101                 :       7356 : t2_Vgatep_sourcep=((((coxwlcen_Vgatep_sourcep*t0)+(coxwlcen*t0_Vgatep_sourcep))*t1-(coxwlcen*t0)*t1_Vgatep_sourcep)/t1/t1);
   12102                 :       7356 : t2_Vdrainp_sourcep=((((coxwlcen_Vdrainp_sourcep*t0)+(coxwlcen*t0_Vdrainp_sourcep))*t1-(coxwlcen*t0)*t1_Vdrainp_sourcep)/t1/t1);
   12103                 :       7356 : t2_Vdrainb_sourcep=((((coxwlcen_Vdrainb_sourcep*t0)+(coxwlcen*t0_Vdrainb_sourcep))*t1-(coxwlcen*t0)*t1_Vdrainb_sourcep)/t1/t1);
   12104                 :       7356 : t2_Vbulkp_sourcep=((((coxwlcen_Vbulkp_sourcep*t0)+(coxwlcen*t0_Vbulkp_sourcep))*t1-(coxwlcen*t0)*t1_Vbulkp_sourcep)/t1/t1);
   12105                 :       7356 : t2_Vsourceb_sourcep=((((coxwlcen_Vsourceb_sourcep*t0)+(coxwlcen*t0_Vsourceb_sourcep))*t1-(coxwlcen*t0)*t1_Vsourceb_sourcep)/t1/t1);
   12106                 :            : #endif
   12107                 :       7356 : t2=((coxwlcen*t0)/t1);
   12108                 :            : }
   12109                 :            : }
   12110                 :            : #if defined(_DERIVATE)
   12111                 :       7356 : qsub0_Vgatep_sourcep=((coxwlcen_Vgatep_sourcep*k1ox*(t1-t0))+((coxwlcen*k1ox)*(t1_Vgatep_sourcep-t0_Vgatep_sourcep)));
   12112                 :       7356 : qsub0_Vdrainp_sourcep=((coxwlcen_Vdrainp_sourcep*k1ox*(t1-t0))+((coxwlcen*k1ox)*(t1_Vdrainp_sourcep-t0_Vdrainp_sourcep)));
   12113                 :       7356 : qsub0_Vdrainb_sourcep=((coxwlcen_Vdrainb_sourcep*k1ox*(t1-t0))+((coxwlcen*k1ox)*(t1_Vdrainb_sourcep-t0_Vdrainb_sourcep)));
   12114                 :       7356 : qsub0_Vbulkp_sourcep=((coxwlcen_Vbulkp_sourcep*k1ox*(t1-t0))+((coxwlcen*k1ox)*(t1_Vbulkp_sourcep-t0_Vbulkp_sourcep)));
   12115                 :       7356 : qsub0_Vsourceb_sourcep=((coxwlcen_Vsourceb_sourcep*k1ox*(t1-t0))+((coxwlcen*k1ox)*(t1_Vsourceb_sourcep-t0_Vsourceb_sourcep)));
   12116                 :            : #endif
   12117                 :       7356 : qsub0=((coxwlcen*k1ox)*(t1-t0));
   12118         [ -  + ]:       7356 : if
   12119                 :            : (k1ox<=0.0)
   12120                 :            : {
   12121                 :            : #if defined(_DERIVATE)
   12122                 :          0 : denomi_Vgatep_sourcep=0.0;
   12123                 :          0 : denomi_Vdrainp_sourcep=0.0;
   12124                 :          0 : denomi_Vdrainb_sourcep=0.0;
   12125                 :          0 : denomi_Vbulkp_sourcep=0.0;
   12126                 :          0 : denomi_Vsourceb_sourcep=0.0;
   12127                 :            : #endif
   12128                 :          0 : denomi=((0.25*moin)*vtm);
   12129                 :            : #if defined(_DERIVATE)
   12130                 :          0 : t0_Vgatep_sourcep=0.0;
   12131                 :          0 : t0_Vdrainp_sourcep=0.0;
   12132                 :          0 : t0_Vdrainb_sourcep=0.0;
   12133                 :          0 : t0_Vbulkp_sourcep=0.0;
   12134                 :          0 : t0_Vsourceb_sourcep=0.0;
   12135                 :            : #endif
   12136                 :          0 : t0=(0.5*sqrtphi);
   12137                 :            : }
   12138                 :            : else
   12139                 :            : {
   12140                 :            : #if defined(_DERIVATE)
   12141                 :       7356 : denomi_Vgatep_sourcep=0.0;
   12142                 :       7356 : denomi_Vdrainp_sourcep=0.0;
   12143                 :       7356 : denomi_Vdrainb_sourcep=0.0;
   12144                 :       7356 : denomi_Vbulkp_sourcep=0.0;
   12145                 :       7356 : denomi_Vsourceb_sourcep=0.0;
   12146                 :            : #endif
   12147                 :       7356 : denomi=(((moin*vtm)*k1ox)*k1ox);
   12148                 :            : #if defined(_DERIVATE)
   12149                 :       7356 : t0_Vgatep_sourcep=0.0;
   12150                 :       7356 : t0_Vdrainp_sourcep=0.0;
   12151                 :       7356 : t0_Vdrainb_sourcep=0.0;
   12152                 :       7356 : t0_Vbulkp_sourcep=0.0;
   12153                 :       7356 : t0_Vsourceb_sourcep=0.0;
   12154                 :            : #endif
   12155                 :       7356 : t0=(k1ox*sqrtphi);
   12156                 :            : }
   12157                 :            : #if defined(_DERIVATE)
   12158                 :       7356 : t1_Vgatep_sourcep=((2.0*t0_Vgatep_sourcep)+vgsteff_Vgatep_sourcep);
   12159                 :       7356 : t1_Vdrainp_sourcep=((2.0*t0_Vdrainp_sourcep)+vgsteff_Vdrainp_sourcep);
   12160                 :       7356 : t1_Vdrainb_sourcep=((2.0*t0_Vdrainb_sourcep)+vgsteff_Vdrainb_sourcep);
   12161                 :       7356 : t1_Vbulkp_sourcep=((2.0*t0_Vbulkp_sourcep)+vgsteff_Vbulkp_sourcep);
   12162                 :       7356 : t1_Vsourceb_sourcep=((2.0*t0_Vsourceb_sourcep)+vgsteff_Vsourceb_sourcep);
   12163                 :            : #endif
   12164                 :       7356 : t1=((2.0*t0)+vgsteff);
   12165                 :            : {
   12166                 :       7356 : double m00_logE(d00_logE0,(1.0+((t1*vgsteff)/denomi)))
   12167                 :            : #if defined(_DERIVATE)
   12168                 :       7356 : double m10_logE(d10_logE0,d00_logE0,(1.0+((t1*vgsteff)/denomi)))
   12169                 :            : #endif
   12170                 :            : #if defined(_DERIVATE)
   12171                 :       7356 : deltaphi_Vgatep_sourcep=(vtm*((((t1_Vgatep_sourcep*vgsteff)+(t1*vgsteff_Vgatep_sourcep))*denomi-(t1*vgsteff)*denomi_Vgatep_sourcep)/denomi/denomi)*d10_logE0);
   12172                 :       7356 : deltaphi_Vdrainp_sourcep=(vtm*((((t1_Vdrainp_sourcep*vgsteff)+(t1*vgsteff_Vdrainp_sourcep))*denomi-(t1*vgsteff)*denomi_Vdrainp_sourcep)/denomi/denomi)*d10_logE0);
   12173                 :       7356 : deltaphi_Vdrainb_sourcep=(vtm*((((t1_Vdrainb_sourcep*vgsteff)+(t1*vgsteff_Vdrainb_sourcep))*denomi-(t1*vgsteff)*denomi_Vdrainb_sourcep)/denomi/denomi)*d10_logE0);
   12174                 :       7356 : deltaphi_Vbulkp_sourcep=(vtm*((((t1_Vbulkp_sourcep*vgsteff)+(t1*vgsteff_Vbulkp_sourcep))*denomi-(t1*vgsteff)*denomi_Vbulkp_sourcep)/denomi/denomi)*d10_logE0);
   12175                 :       7356 : deltaphi_Vsourceb_sourcep=(vtm*((((t1_Vsourceb_sourcep*vgsteff)+(t1*vgsteff_Vsourceb_sourcep))*denomi-(t1*vgsteff)*denomi_Vsourceb_sourcep)/denomi/denomi)*d10_logE0);
   12176                 :            : #endif
   12177                 :       7356 : deltaphi=(vtm*d00_logE0);
   12178                 :            : }
   12179                 :       7356 : tox=(tox+tox);
   12180                 :            : #if defined(_DERIVATE)
   12181                 :       7356 : t0_Vgatep_sourcep=(vgsteff_Vgatep_sourcep/tox);
   12182                 :       7356 : t0_Vdrainp_sourcep=(vgsteff_Vdrainp_sourcep/tox);
   12183                 :       7356 : t0_Vdrainb_sourcep=(vgsteff_Vdrainb_sourcep/tox);
   12184                 :       7356 : t0_Vbulkp_sourcep=(vgsteff_Vbulkp_sourcep/tox);
   12185                 :       7356 : t0_Vsourceb_sourcep=(vgsteff_Vsourceb_sourcep/tox);
   12186                 :            : #endif
   12187                 :       7356 : t0=((vgsteff+vtfbphi2)/tox);
   12188                 :            : {
   12189                 :       7356 : double m00_logE(d00_logE0,t0)
   12190                 :       7356 : double m00_exp(d00_exp1,(0.7*d00_logE0))
   12191                 :            : #if defined(_DERIVATE)
   12192                 :       7356 : double m10_logE(d10_logE0,d00_logE0,t0)
   12193                 :            : #define d10_exp1 d00_exp1
   12194                 :            : #endif
   12195                 :            : #if defined(_DERIVATE)
   12196                 :       7356 : tmp_Vgatep_sourcep=(0.7*t0_Vgatep_sourcep*d10_logE0)*d10_exp1;
   12197                 :       7356 : tmp_Vdrainp_sourcep=(0.7*t0_Vdrainp_sourcep*d10_logE0)*d10_exp1;
   12198                 :       7356 : tmp_Vdrainb_sourcep=(0.7*t0_Vdrainb_sourcep*d10_logE0)*d10_exp1;
   12199                 :       7356 : tmp_Vbulkp_sourcep=(0.7*t0_Vbulkp_sourcep*d10_logE0)*d10_exp1;
   12200                 :       7356 : tmp_Vsourceb_sourcep=(0.7*t0_Vsourceb_sourcep*d10_logE0)*d10_exp1;
   12201                 :            : #endif
   12202                 :       7356 : tmp=d00_exp1;
   12203                 :            : }
   12204                 :            : #if defined(_DERIVATE)
   12205                 :       7356 : t1_Vgatep_sourcep=tmp_Vgatep_sourcep;
   12206                 :       7356 : t1_Vdrainp_sourcep=tmp_Vdrainp_sourcep;
   12207                 :       7356 : t1_Vdrainb_sourcep=tmp_Vdrainb_sourcep;
   12208                 :       7356 : t1_Vbulkp_sourcep=tmp_Vbulkp_sourcep;
   12209                 :       7356 : t1_Vsourceb_sourcep=tmp_Vsourceb_sourcep;
   12210                 :            : #endif
   12211                 :       7356 : t1=(1.0+tmp);
   12212                 :            : #if defined(_DERIVATE)
   12213                 :       7356 : tcen_Vgatep_sourcep=(-1.9e-9*t1_Vgatep_sourcep/t1/t1);
   12214                 :       7356 : tcen_Vdrainp_sourcep=(-1.9e-9*t1_Vdrainp_sourcep/t1/t1);
   12215                 :       7356 : tcen_Vdrainb_sourcep=(-1.9e-9*t1_Vdrainb_sourcep/t1/t1);
   12216                 :       7356 : tcen_Vbulkp_sourcep=(-1.9e-9*t1_Vbulkp_sourcep/t1/t1);
   12217                 :       7356 : tcen_Vsourceb_sourcep=(-1.9e-9*t1_Vsourceb_sourcep/t1/t1);
   12218                 :            : #endif
   12219                 :       7356 : tcen=(1.9e-9/t1);
   12220                 :            : #if defined(_DERIVATE)
   12221                 :       7356 : ccen_Vgatep_sourcep=(-1.03594e-10*tcen_Vgatep_sourcep/tcen/tcen);
   12222                 :       7356 : ccen_Vdrainp_sourcep=(-1.03594e-10*tcen_Vdrainp_sourcep/tcen/tcen);
   12223                 :       7356 : ccen_Vdrainb_sourcep=(-1.03594e-10*tcen_Vdrainb_sourcep/tcen/tcen);
   12224                 :       7356 : ccen_Vbulkp_sourcep=(-1.03594e-10*tcen_Vbulkp_sourcep/tcen/tcen);
   12225                 :       7356 : ccen_Vsourceb_sourcep=(-1.03594e-10*tcen_Vsourceb_sourcep/tcen/tcen);
   12226                 :            : #endif
   12227                 :       7356 : ccen=(1.03594e-10/tcen);
   12228                 :            : #if defined(_DERIVATE)
   12229                 :       7356 : t0_Vgatep_sourcep=(-coxp*ccen_Vgatep_sourcep/(coxp+ccen)/(coxp+ccen));
   12230                 :       7356 : t0_Vdrainp_sourcep=(-coxp*ccen_Vdrainp_sourcep/(coxp+ccen)/(coxp+ccen));
   12231                 :       7356 : t0_Vdrainb_sourcep=(-coxp*ccen_Vdrainb_sourcep/(coxp+ccen)/(coxp+ccen));
   12232                 :       7356 : t0_Vbulkp_sourcep=(-coxp*ccen_Vbulkp_sourcep/(coxp+ccen)/(coxp+ccen));
   12233                 :       7356 : t0_Vsourceb_sourcep=(-coxp*ccen_Vsourceb_sourcep/(coxp+ccen)/(coxp+ccen));
   12234                 :            : #endif
   12235                 :       7356 : t0=(coxp/(coxp+ccen));
   12236                 :            : #if defined(_DERIVATE)
   12237                 :       7356 : coxeff_Vgatep_sourcep=((t0_Vgatep_sourcep*ccen)+(t0*ccen_Vgatep_sourcep));
   12238                 :       7356 : coxeff_Vdrainp_sourcep=((t0_Vdrainp_sourcep*ccen)+(t0*ccen_Vdrainp_sourcep));
   12239                 :       7356 : coxeff_Vdrainb_sourcep=((t0_Vdrainb_sourcep*ccen)+(t0*ccen_Vdrainb_sourcep));
   12240                 :       7356 : coxeff_Vbulkp_sourcep=((t0_Vbulkp_sourcep*ccen)+(t0*ccen_Vbulkp_sourcep));
   12241                 :       7356 : coxeff_Vsourceb_sourcep=((t0_Vsourceb_sourcep*ccen)+(t0*ccen_Vsourceb_sourcep));
   12242                 :            : #endif
   12243                 :       7356 : coxeff=(t0*ccen);
   12244                 :            : #if defined(_DERIVATE)
   12245                 :       7356 : coxwlcen_Vgatep_sourcep=((coxwl*coxeff_Vgatep_sourcep)/coxe);
   12246                 :       7356 : coxwlcen_Vdrainp_sourcep=((coxwl*coxeff_Vdrainp_sourcep)/coxe);
   12247                 :       7356 : coxwlcen_Vdrainb_sourcep=((coxwl*coxeff_Vdrainb_sourcep)/coxe);
   12248                 :       7356 : coxwlcen_Vbulkp_sourcep=((coxwl*coxeff_Vbulkp_sourcep)/coxe);
   12249                 :       7356 : coxwlcen_Vsourceb_sourcep=((coxwl*coxeff_Vsourceb_sourcep)/coxe);
   12250                 :            : #endif
   12251                 :       7356 : coxwlcen=((coxwl*coxeff)/coxe);
   12252                 :            : #if defined(_DERIVATE)
   12253                 :       7356 : abulkcv_Vgatep_sourcep=abulk0_Vgatep_sourcep*abulkcvfactor;
   12254                 :       7356 : abulkcv_Vdrainp_sourcep=abulk0_Vdrainp_sourcep*abulkcvfactor;
   12255                 :       7356 : abulkcv_Vdrainb_sourcep=abulk0_Vdrainb_sourcep*abulkcvfactor;
   12256                 :       7356 : abulkcv_Vbulkp_sourcep=abulk0_Vbulkp_sourcep*abulkcvfactor;
   12257                 :       7356 : abulkcv_Vsourceb_sourcep=abulk0_Vsourceb_sourcep*abulkcvfactor;
   12258                 :            : #endif
   12259                 :       7356 : abulkcv=(abulk0*abulkcvfactor);
   12260                 :            : #if defined(_DERIVATE)
   12261                 :       7356 : vdsatcv_Vgatep_sourcep=(((vgsteff_Vgatep_sourcep-deltaphi_Vgatep_sourcep)*abulkcv-(vgsteff-deltaphi)*abulkcv_Vgatep_sourcep)/abulkcv/abulkcv);
   12262                 :       7356 : vdsatcv_Vdrainp_sourcep=(((vgsteff_Vdrainp_sourcep-deltaphi_Vdrainp_sourcep)*abulkcv-(vgsteff-deltaphi)*abulkcv_Vdrainp_sourcep)/abulkcv/abulkcv);
   12263                 :       7356 : vdsatcv_Vdrainb_sourcep=(((vgsteff_Vdrainb_sourcep-deltaphi_Vdrainb_sourcep)*abulkcv-(vgsteff-deltaphi)*abulkcv_Vdrainb_sourcep)/abulkcv/abulkcv);
   12264                 :       7356 : vdsatcv_Vbulkp_sourcep=(((vgsteff_Vbulkp_sourcep-deltaphi_Vbulkp_sourcep)*abulkcv-(vgsteff-deltaphi)*abulkcv_Vbulkp_sourcep)/abulkcv/abulkcv);
   12265                 :       7356 : vdsatcv_Vsourceb_sourcep=(((vgsteff_Vsourceb_sourcep-deltaphi_Vsourceb_sourcep)*abulkcv-(vgsteff-deltaphi)*abulkcv_Vsourceb_sourcep)/abulkcv/abulkcv);
   12266                 :            : #endif
   12267                 :       7356 : vdsatcv=((vgsteff-deltaphi)/abulkcv);
   12268                 :            : #if defined(_DERIVATE)
   12269                 :       7356 : t0_Vgatep_sourcep=vdsatcv_Vgatep_sourcep;
   12270                 :       7356 : t0_Vdrainp_sourcep=(vdsatcv_Vdrainp_sourcep-Vds_Vdrainp_sourcep);
   12271                 :       7356 : t0_Vdrainb_sourcep=vdsatcv_Vdrainb_sourcep;
   12272                 :       7356 : t0_Vbulkp_sourcep=vdsatcv_Vbulkp_sourcep;
   12273                 :       7356 : t0_Vsourceb_sourcep=vdsatcv_Vsourceb_sourcep;
   12274                 :            : #endif
   12275                 :       7356 : t0=((vdsatcv-Vds)-0.02);
   12276                 :            : {
   12277                 :       7356 : double m00_sqrt(d00_sqrt0,((t0*t0)+((4.0*0.02)*vdsatcv)))
   12278                 :            : #if defined(_DERIVATE)
   12279                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+((4.0*0.02)*vdsatcv)))
   12280                 :            : #endif
   12281                 :            : #if defined(_DERIVATE)
   12282                 :       7356 : t1_Vgatep_sourcep=(((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))+((4.0*0.02)*vdsatcv_Vgatep_sourcep))*d10_sqrt0;
   12283                 :       7356 : t1_Vdrainp_sourcep=(((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))+((4.0*0.02)*vdsatcv_Vdrainp_sourcep))*d10_sqrt0;
   12284                 :       7356 : t1_Vdrainb_sourcep=(((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))+((4.0*0.02)*vdsatcv_Vdrainb_sourcep))*d10_sqrt0;
   12285                 :       7356 : t1_Vbulkp_sourcep=(((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))+((4.0*0.02)*vdsatcv_Vbulkp_sourcep))*d10_sqrt0;
   12286                 :       7356 : t1_Vsourceb_sourcep=(((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))+((4.0*0.02)*vdsatcv_Vsourceb_sourcep))*d10_sqrt0;
   12287                 :            : #endif
   12288                 :       7356 : t1=d00_sqrt0;
   12289                 :            : }
   12290         [ +  + ]:       7356 : if
   12291                 :            : (t0>=0.0)
   12292                 :            : {
   12293                 :            : #if defined(_DERIVATE)
   12294                 :       1996 : vdseffcv_Vgatep_sourcep=(vdsatcv_Vgatep_sourcep-(0.5*(t0_Vgatep_sourcep+t1_Vgatep_sourcep)));
   12295                 :       1996 : vdseffcv_Vdrainp_sourcep=(vdsatcv_Vdrainp_sourcep-(0.5*(t0_Vdrainp_sourcep+t1_Vdrainp_sourcep)));
   12296                 :       1996 : vdseffcv_Vdrainb_sourcep=(vdsatcv_Vdrainb_sourcep-(0.5*(t0_Vdrainb_sourcep+t1_Vdrainb_sourcep)));
   12297                 :       1996 : vdseffcv_Vbulkp_sourcep=(vdsatcv_Vbulkp_sourcep-(0.5*(t0_Vbulkp_sourcep+t1_Vbulkp_sourcep)));
   12298                 :       1996 : vdseffcv_Vsourceb_sourcep=(vdsatcv_Vsourceb_sourcep-(0.5*(t0_Vsourceb_sourcep+t1_Vsourceb_sourcep)));
   12299                 :            : #endif
   12300                 :       1996 : vdseffcv=(vdsatcv-(0.5*(t0+t1)));
   12301                 :            : }
   12302                 :            : else
   12303                 :            : {
   12304                 :            : #if defined(_DERIVATE)
   12305                 :       5360 : t3_Vgatep_sourcep=(-(0.02+0.02)*(t1_Vgatep_sourcep-t0_Vgatep_sourcep)/(t1-t0)/(t1-t0));
   12306                 :       5360 : t3_Vdrainp_sourcep=(-(0.02+0.02)*(t1_Vdrainp_sourcep-t0_Vdrainp_sourcep)/(t1-t0)/(t1-t0));
   12307                 :       5360 : t3_Vdrainb_sourcep=(-(0.02+0.02)*(t1_Vdrainb_sourcep-t0_Vdrainb_sourcep)/(t1-t0)/(t1-t0));
   12308                 :       5360 : t3_Vbulkp_sourcep=(-(0.02+0.02)*(t1_Vbulkp_sourcep-t0_Vbulkp_sourcep)/(t1-t0)/(t1-t0));
   12309                 :       5360 : t3_Vsourceb_sourcep=(-(0.02+0.02)*(t1_Vsourceb_sourcep-t0_Vsourceb_sourcep)/(t1-t0)/(t1-t0));
   12310                 :            : #endif
   12311                 :       5360 : t3=((0.02+0.02)/(t1-t0));
   12312                 :            : #if defined(_DERIVATE)
   12313                 :       5360 : t4_Vgatep_sourcep=(-t3_Vgatep_sourcep);
   12314                 :       5360 : t4_Vdrainp_sourcep=(-t3_Vdrainp_sourcep);
   12315                 :       5360 : t4_Vdrainb_sourcep=(-t3_Vdrainb_sourcep);
   12316                 :       5360 : t4_Vbulkp_sourcep=(-t3_Vbulkp_sourcep);
   12317                 :       5360 : t4_Vsourceb_sourcep=(-t3_Vsourceb_sourcep);
   12318                 :            : #endif
   12319                 :       5360 : t4=(1.0-t3);
   12320                 :            : #if defined(_DERIVATE)
   12321                 :       5360 : vdseffcv_Vgatep_sourcep=((vdsatcv_Vgatep_sourcep*t4)+(vdsatcv*t4_Vgatep_sourcep));
   12322                 :       5360 : vdseffcv_Vdrainp_sourcep=((vdsatcv_Vdrainp_sourcep*t4)+(vdsatcv*t4_Vdrainp_sourcep));
   12323                 :       5360 : vdseffcv_Vdrainb_sourcep=((vdsatcv_Vdrainb_sourcep*t4)+(vdsatcv*t4_Vdrainb_sourcep));
   12324                 :       5360 : vdseffcv_Vbulkp_sourcep=((vdsatcv_Vbulkp_sourcep*t4)+(vdsatcv*t4_Vbulkp_sourcep));
   12325                 :       5360 : vdseffcv_Vsourceb_sourcep=((vdsatcv_Vsourceb_sourcep*t4)+(vdsatcv*t4_Vsourceb_sourcep));
   12326                 :            : #endif
   12327                 :       5360 : vdseffcv=(vdsatcv*t4);
   12328                 :            : }
   12329         [ +  + ]:       7356 : if
   12330                 :            : (Vds==0.0)
   12331                 :            : {
   12332                 :            : #if defined(_DERIVATE)
   12333                 :       2112 : vdseffcv_Vgatep_sourcep=0.0;
   12334                 :       2112 : vdseffcv_Vdrainp_sourcep=0.0;
   12335                 :       2112 : vdseffcv_Vdrainb_sourcep=0.0;
   12336                 :       2112 : vdseffcv_Vbulkp_sourcep=0.0;
   12337                 :       2112 : vdseffcv_Vsourceb_sourcep=0.0;
   12338                 :            : #endif
   12339                 :       2112 : vdseffcv=0.0;
   12340                 :            : }
   12341                 :            : #if defined(_DERIVATE)
   12342                 :       7356 : t0_Vgatep_sourcep=((abulkcv_Vgatep_sourcep*vdseffcv)+(abulkcv*vdseffcv_Vgatep_sourcep));
   12343                 :       7356 : t0_Vdrainp_sourcep=((abulkcv_Vdrainp_sourcep*vdseffcv)+(abulkcv*vdseffcv_Vdrainp_sourcep));
   12344                 :       7356 : t0_Vdrainb_sourcep=((abulkcv_Vdrainb_sourcep*vdseffcv)+(abulkcv*vdseffcv_Vdrainb_sourcep));
   12345                 :       7356 : t0_Vbulkp_sourcep=((abulkcv_Vbulkp_sourcep*vdseffcv)+(abulkcv*vdseffcv_Vbulkp_sourcep));
   12346                 :       7356 : t0_Vsourceb_sourcep=((abulkcv_Vsourceb_sourcep*vdseffcv)+(abulkcv*vdseffcv_Vsourceb_sourcep));
   12347                 :            : #endif
   12348                 :       7356 : t0=(abulkcv*vdseffcv);
   12349                 :            : #if defined(_DERIVATE)
   12350                 :       7356 : t1_Vgatep_sourcep=(vgsteff_Vgatep_sourcep-deltaphi_Vgatep_sourcep);
   12351                 :       7356 : t1_Vdrainp_sourcep=(vgsteff_Vdrainp_sourcep-deltaphi_Vdrainp_sourcep);
   12352                 :       7356 : t1_Vdrainb_sourcep=(vgsteff_Vdrainb_sourcep-deltaphi_Vdrainb_sourcep);
   12353                 :       7356 : t1_Vbulkp_sourcep=(vgsteff_Vbulkp_sourcep-deltaphi_Vbulkp_sourcep);
   12354                 :       7356 : t1_Vsourceb_sourcep=(vgsteff_Vsourceb_sourcep-deltaphi_Vsourceb_sourcep);
   12355                 :            : #endif
   12356                 :       7356 : t1=(vgsteff-deltaphi);
   12357                 :            : #if defined(_DERIVATE)
   12358                 :       7356 : t2_Vgatep_sourcep=(12.0*(t1_Vgatep_sourcep-(0.5*t0_Vgatep_sourcep)));
   12359                 :       7356 : t2_Vdrainp_sourcep=(12.0*(t1_Vdrainp_sourcep-(0.5*t0_Vdrainp_sourcep)));
   12360                 :       7356 : t2_Vdrainb_sourcep=(12.0*(t1_Vdrainb_sourcep-(0.5*t0_Vdrainb_sourcep)));
   12361                 :       7356 : t2_Vbulkp_sourcep=(12.0*(t1_Vbulkp_sourcep-(0.5*t0_Vbulkp_sourcep)));
   12362                 :       7356 : t2_Vsourceb_sourcep=(12.0*(t1_Vsourceb_sourcep-(0.5*t0_Vsourceb_sourcep)));
   12363                 :            : #endif
   12364                 :       7356 : t2=(12.0*((t1-(0.5*t0))+1.0e-20));
   12365                 :            : #if defined(_DERIVATE)
   12366                 :       7356 : t3_Vgatep_sourcep=((t0_Vgatep_sourcep*t2-t0*t2_Vgatep_sourcep)/t2/t2);
   12367                 :       7356 : t3_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t2-t0*t2_Vdrainp_sourcep)/t2/t2);
   12368                 :       7356 : t3_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t2-t0*t2_Vdrainb_sourcep)/t2/t2);
   12369                 :       7356 : t3_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t2-t0*t2_Vbulkp_sourcep)/t2/t2);
   12370                 :       7356 : t3_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t2-t0*t2_Vsourceb_sourcep)/t2/t2);
   12371                 :            : #endif
   12372                 :       7356 : t3=(t0/t2);
   12373                 :            : #if defined(_DERIVATE)
   12374                 :       7356 : qgate_Vgatep_sourcep=((coxwlcen_Vgatep_sourcep*(t1-(t0*(0.5-t3))))+(coxwlcen*(t1_Vgatep_sourcep-((t0_Vgatep_sourcep*(0.5-t3))+(t0*(-t3_Vgatep_sourcep))))));
   12375                 :       7356 : qgate_Vdrainp_sourcep=((coxwlcen_Vdrainp_sourcep*(t1-(t0*(0.5-t3))))+(coxwlcen*(t1_Vdrainp_sourcep-((t0_Vdrainp_sourcep*(0.5-t3))+(t0*(-t3_Vdrainp_sourcep))))));
   12376                 :       7356 : qgate_Vdrainb_sourcep=((coxwlcen_Vdrainb_sourcep*(t1-(t0*(0.5-t3))))+(coxwlcen*(t1_Vdrainb_sourcep-((t0_Vdrainb_sourcep*(0.5-t3))+(t0*(-t3_Vdrainb_sourcep))))));
   12377                 :       7356 : qgate_Vbulkp_sourcep=((coxwlcen_Vbulkp_sourcep*(t1-(t0*(0.5-t3))))+(coxwlcen*(t1_Vbulkp_sourcep-((t0_Vbulkp_sourcep*(0.5-t3))+(t0*(-t3_Vbulkp_sourcep))))));
   12378                 :       7356 : qgate_Vsourceb_sourcep=((coxwlcen_Vsourceb_sourcep*(t1-(t0*(0.5-t3))))+(coxwlcen*(t1_Vsourceb_sourcep-((t0_Vsourceb_sourcep*(0.5-t3))+(t0*(-t3_Vsourceb_sourcep))))));
   12379                 :            : #endif
   12380                 :       7356 : qgate=(coxwlcen*(t1-(t0*(0.5-t3))));
   12381                 :            : #if defined(_DERIVATE)
   12382                 :       7356 : t7_Vgatep_sourcep=(-abulkcv_Vgatep_sourcep);
   12383                 :       7356 : t7_Vdrainp_sourcep=(-abulkcv_Vdrainp_sourcep);
   12384                 :       7356 : t7_Vdrainb_sourcep=(-abulkcv_Vdrainb_sourcep);
   12385                 :       7356 : t7_Vbulkp_sourcep=(-abulkcv_Vbulkp_sourcep);
   12386                 :       7356 : t7_Vsourceb_sourcep=(-abulkcv_Vsourceb_sourcep);
   12387                 :            : #endif
   12388                 :       7356 : t7=(1.0-abulkcv);
   12389                 :            : #if defined(_DERIVATE)
   12390                 :       7356 : qbulk_Vgatem_sourcep=0.0;
   12391                 :       7356 : qbulk_Vgatep_sourcep=((((coxwlcen_Vgatep_sourcep*t7)+(coxwlcen*t7_Vgatep_sourcep))*((0.5*vdseffcv)-((t0*vdseffcv)/t2)))+((coxwlcen*t7)*((0.5*vdseffcv_Vgatep_sourcep)-((((t0_Vgatep_sourcep*vdseffcv)+(t0*vdseffcv_Vgatep_sourcep))*t2-(t0*vdseffcv)*t2_Vgatep_sourcep)/t2/t2))));
   12392                 :       7356 : qbulk_Vdrainp_sourcep=((((coxwlcen_Vdrainp_sourcep*t7)+(coxwlcen*t7_Vdrainp_sourcep))*((0.5*vdseffcv)-((t0*vdseffcv)/t2)))+((coxwlcen*t7)*((0.5*vdseffcv_Vdrainp_sourcep)-((((t0_Vdrainp_sourcep*vdseffcv)+(t0*vdseffcv_Vdrainp_sourcep))*t2-(t0*vdseffcv)*t2_Vdrainp_sourcep)/t2/t2))));
   12393                 :       7356 : qbulk_Vdrainb_sourcep=((((coxwlcen_Vdrainb_sourcep*t7)+(coxwlcen*t7_Vdrainb_sourcep))*((0.5*vdseffcv)-((t0*vdseffcv)/t2)))+((coxwlcen*t7)*((0.5*vdseffcv_Vdrainb_sourcep)-((((t0_Vdrainb_sourcep*vdseffcv)+(t0*vdseffcv_Vdrainb_sourcep))*t2-(t0*vdseffcv)*t2_Vdrainb_sourcep)/t2/t2))));
   12394                 :       7356 : qbulk_Vbulkp_sourcep=((((coxwlcen_Vbulkp_sourcep*t7)+(coxwlcen*t7_Vbulkp_sourcep))*((0.5*vdseffcv)-((t0*vdseffcv)/t2)))+((coxwlcen*t7)*((0.5*vdseffcv_Vbulkp_sourcep)-((((t0_Vbulkp_sourcep*vdseffcv)+(t0*vdseffcv_Vbulkp_sourcep))*t2-(t0*vdseffcv)*t2_Vbulkp_sourcep)/t2/t2))));
   12395                 :       7356 : qbulk_Vsourceb_sourcep=((((coxwlcen_Vsourceb_sourcep*t7)+(coxwlcen*t7_Vsourceb_sourcep))*((0.5*vdseffcv)-((t0*vdseffcv)/t2)))+((coxwlcen*t7)*((0.5*vdseffcv_Vsourceb_sourcep)-((((t0_Vsourceb_sourcep*vdseffcv)+(t0*vdseffcv_Vsourceb_sourcep))*t2-(t0*vdseffcv)*t2_Vsourceb_sourcep)/t2/t2))));
   12396                 :            : #endif
   12397                 :       7356 : qbulk=((coxwlcen*t7)*((0.5*vdseffcv)-((t0*vdseffcv)/t2)));
   12398         [ -  + ]:       7356 : if
   12399                 :            : (xpart>0.5)
   12400                 :            : {
   12401                 :            : #if defined(_DERIVATE)
   12402                 :          0 : qsrc_Vgatem_sourcep=0.0;
   12403                 :          0 : qsrc_Vgatep_sourcep=(((-coxwlcen_Vgatep_sourcep)*(((t1/2.0)+(t0/4.0))-(((0.5*t0)*t0)/t2)))+((-coxwlcen)*(((t1_Vgatep_sourcep/2.0)+(t0_Vgatep_sourcep/4.0))-(((((0.5*t0_Vgatep_sourcep)*t0)+((0.5*t0)*t0_Vgatep_sourcep))*t2-((0.5*t0)*t0)*t2_Vgatep_sourcep)/t2/t2))));
   12404                 :          0 : qsrc_Vdrainp_sourcep=(((-coxwlcen_Vdrainp_sourcep)*(((t1/2.0)+(t0/4.0))-(((0.5*t0)*t0)/t2)))+((-coxwlcen)*(((t1_Vdrainp_sourcep/2.0)+(t0_Vdrainp_sourcep/4.0))-(((((0.5*t0_Vdrainp_sourcep)*t0)+((0.5*t0)*t0_Vdrainp_sourcep))*t2-((0.5*t0)*t0)*t2_Vdrainp_sourcep)/t2/t2))));
   12405                 :          0 : qsrc_Vdrainb_sourcep=(((-coxwlcen_Vdrainb_sourcep)*(((t1/2.0)+(t0/4.0))-(((0.5*t0)*t0)/t2)))+((-coxwlcen)*(((t1_Vdrainb_sourcep/2.0)+(t0_Vdrainb_sourcep/4.0))-(((((0.5*t0_Vdrainb_sourcep)*t0)+((0.5*t0)*t0_Vdrainb_sourcep))*t2-((0.5*t0)*t0)*t2_Vdrainb_sourcep)/t2/t2))));
   12406                 :          0 : qsrc_Vbulkp_sourcep=(((-coxwlcen_Vbulkp_sourcep)*(((t1/2.0)+(t0/4.0))-(((0.5*t0)*t0)/t2)))+((-coxwlcen)*(((t1_Vbulkp_sourcep/2.0)+(t0_Vbulkp_sourcep/4.0))-(((((0.5*t0_Vbulkp_sourcep)*t0)+((0.5*t0)*t0_Vbulkp_sourcep))*t2-((0.5*t0)*t0)*t2_Vbulkp_sourcep)/t2/t2))));
   12407                 :          0 : qsrc_Vsourceb_sourcep=(((-coxwlcen_Vsourceb_sourcep)*(((t1/2.0)+(t0/4.0))-(((0.5*t0)*t0)/t2)))+((-coxwlcen)*(((t1_Vsourceb_sourcep/2.0)+(t0_Vsourceb_sourcep/4.0))-(((((0.5*t0_Vsourceb_sourcep)*t0)+((0.5*t0)*t0_Vsourceb_sourcep))*t2-((0.5*t0)*t0)*t2_Vsourceb_sourcep)/t2/t2))));
   12408                 :            : #endif
   12409                 :          0 : qsrc=((-coxwlcen)*(((t1/2.0)+(t0/4.0))-(((0.5*t0)*t0)/t2)));
   12410                 :            : }
   12411                 :            : else
   12412                 :            : {
   12413         [ +  - ]:       7356 : if
   12414                 :            : (xpart<0.5)
   12415                 :            : {
   12416                 :            : #if defined(_DERIVATE)
   12417                 :       7356 : t2_Vgatep_sourcep=(t2_Vgatep_sourcep/12.0);
   12418                 :       7356 : t2_Vdrainp_sourcep=(t2_Vdrainp_sourcep/12.0);
   12419                 :       7356 : t2_Vdrainb_sourcep=(t2_Vdrainb_sourcep/12.0);
   12420                 :       7356 : t2_Vbulkp_sourcep=(t2_Vbulkp_sourcep/12.0);
   12421                 :       7356 : t2_Vsourceb_sourcep=(t2_Vsourceb_sourcep/12.0);
   12422                 :            : #endif
   12423                 :       7356 : t2=(t2/12.0);
   12424                 :            : #if defined(_DERIVATE)
   12425                 :       7356 : t3_Vgatep_sourcep=(((0.5*coxwlcen_Vgatep_sourcep)*(t2*t2)-(0.5*coxwlcen)*((t2_Vgatep_sourcep*t2)+(t2*t2_Vgatep_sourcep)))/(t2*t2)/(t2*t2));
   12426                 :       7356 : t3_Vdrainp_sourcep=(((0.5*coxwlcen_Vdrainp_sourcep)*(t2*t2)-(0.5*coxwlcen)*((t2_Vdrainp_sourcep*t2)+(t2*t2_Vdrainp_sourcep)))/(t2*t2)/(t2*t2));
   12427                 :       7356 : t3_Vdrainb_sourcep=(((0.5*coxwlcen_Vdrainb_sourcep)*(t2*t2)-(0.5*coxwlcen)*((t2_Vdrainb_sourcep*t2)+(t2*t2_Vdrainb_sourcep)))/(t2*t2)/(t2*t2));
   12428                 :       7356 : t3_Vbulkp_sourcep=(((0.5*coxwlcen_Vbulkp_sourcep)*(t2*t2)-(0.5*coxwlcen)*((t2_Vbulkp_sourcep*t2)+(t2*t2_Vbulkp_sourcep)))/(t2*t2)/(t2*t2));
   12429                 :       7356 : t3_Vsourceb_sourcep=(((0.5*coxwlcen_Vsourceb_sourcep)*(t2*t2)-(0.5*coxwlcen)*((t2_Vsourceb_sourcep*t2)+(t2*t2_Vsourceb_sourcep)))/(t2*t2)/(t2*t2));
   12430                 :            : #endif
   12431                 :       7356 : t3=((0.5*coxwlcen)/(t2*t2));
   12432                 :            : #if defined(_DERIVATE)
   12433                 :       7356 : t4_Vgatep_sourcep=(((t1_Vgatep_sourcep*((((2.0*t0)*t0)/3.0)+(t1*(t1-((4.0*t0)/3.0)))))+(t1*(((((2.0*t0_Vgatep_sourcep)*t0)+((2.0*t0)*t0_Vgatep_sourcep))/3.0)+((t1_Vgatep_sourcep*(t1-((4.0*t0)/3.0)))+(t1*(t1_Vgatep_sourcep-((4.0*t0_Vgatep_sourcep)/3.0)))))))-((((((2.0*t0_Vgatep_sourcep)*t0)+((2.0*t0)*t0_Vgatep_sourcep))*t0)+(((2.0*t0)*t0)*t0_Vgatep_sourcep))/15.0));
   12434                 :       7356 : t4_Vdrainp_sourcep=(((t1_Vdrainp_sourcep*((((2.0*t0)*t0)/3.0)+(t1*(t1-((4.0*t0)/3.0)))))+(t1*(((((2.0*t0_Vdrainp_sourcep)*t0)+((2.0*t0)*t0_Vdrainp_sourcep))/3.0)+((t1_Vdrainp_sourcep*(t1-((4.0*t0)/3.0)))+(t1*(t1_Vdrainp_sourcep-((4.0*t0_Vdrainp_sourcep)/3.0)))))))-((((((2.0*t0_Vdrainp_sourcep)*t0)+((2.0*t0)*t0_Vdrainp_sourcep))*t0)+(((2.0*t0)*t0)*t0_Vdrainp_sourcep))/15.0));
   12435                 :       7356 : t4_Vdrainb_sourcep=(((t1_Vdrainb_sourcep*((((2.0*t0)*t0)/3.0)+(t1*(t1-((4.0*t0)/3.0)))))+(t1*(((((2.0*t0_Vdrainb_sourcep)*t0)+((2.0*t0)*t0_Vdrainb_sourcep))/3.0)+((t1_Vdrainb_sourcep*(t1-((4.0*t0)/3.0)))+(t1*(t1_Vdrainb_sourcep-((4.0*t0_Vdrainb_sourcep)/3.0)))))))-((((((2.0*t0_Vdrainb_sourcep)*t0)+((2.0*t0)*t0_Vdrainb_sourcep))*t0)+(((2.0*t0)*t0)*t0_Vdrainb_sourcep))/15.0));
   12436                 :       7356 : t4_Vbulkp_sourcep=(((t1_Vbulkp_sourcep*((((2.0*t0)*t0)/3.0)+(t1*(t1-((4.0*t0)/3.0)))))+(t1*(((((2.0*t0_Vbulkp_sourcep)*t0)+((2.0*t0)*t0_Vbulkp_sourcep))/3.0)+((t1_Vbulkp_sourcep*(t1-((4.0*t0)/3.0)))+(t1*(t1_Vbulkp_sourcep-((4.0*t0_Vbulkp_sourcep)/3.0)))))))-((((((2.0*t0_Vbulkp_sourcep)*t0)+((2.0*t0)*t0_Vbulkp_sourcep))*t0)+(((2.0*t0)*t0)*t0_Vbulkp_sourcep))/15.0));
   12437                 :       7356 : t4_Vsourceb_sourcep=(((t1_Vsourceb_sourcep*((((2.0*t0)*t0)/3.0)+(t1*(t1-((4.0*t0)/3.0)))))+(t1*(((((2.0*t0_Vsourceb_sourcep)*t0)+((2.0*t0)*t0_Vsourceb_sourcep))/3.0)+((t1_Vsourceb_sourcep*(t1-((4.0*t0)/3.0)))+(t1*(t1_Vsourceb_sourcep-((4.0*t0_Vsourceb_sourcep)/3.0)))))))-((((((2.0*t0_Vsourceb_sourcep)*t0)+((2.0*t0)*t0_Vsourceb_sourcep))*t0)+(((2.0*t0)*t0)*t0_Vsourceb_sourcep))/15.0));
   12438                 :            : #endif
   12439                 :       7356 : t4=((t1*((((2.0*t0)*t0)/3.0)+(t1*(t1-((4.0*t0)/3.0)))))-((((2.0*t0)*t0)*t0)/15.0));
   12440                 :            : #if defined(_DERIVATE)
   12441                 :       7356 : qsrc_Vgatem_sourcep=0.0;
   12442                 :       7356 : qsrc_Vgatep_sourcep=(((-t3_Vgatep_sourcep)*t4)+((-t3)*t4_Vgatep_sourcep));
   12443                 :       7356 : qsrc_Vdrainp_sourcep=(((-t3_Vdrainp_sourcep)*t4)+((-t3)*t4_Vdrainp_sourcep));
   12444                 :       7356 : qsrc_Vdrainb_sourcep=(((-t3_Vdrainb_sourcep)*t4)+((-t3)*t4_Vdrainb_sourcep));
   12445                 :       7356 : qsrc_Vbulkp_sourcep=(((-t3_Vbulkp_sourcep)*t4)+((-t3)*t4_Vbulkp_sourcep));
   12446                 :       7356 : qsrc_Vsourceb_sourcep=(((-t3_Vsourceb_sourcep)*t4)+((-t3)*t4_Vsourceb_sourcep));
   12447                 :            : #endif
   12448                 :       7356 : qsrc=((-t3)*t4);
   12449                 :            : }
   12450                 :            : else
   12451                 :            : {
   12452                 :            : #if defined(_DERIVATE)
   12453                 :          0 : qsrc_Vgatem_sourcep=0.0;
   12454                 :          0 : qsrc_Vgatep_sourcep=((-0.5)*qgate_Vgatep_sourcep);
   12455                 :          0 : qsrc_Vdrainp_sourcep=((-0.5)*qgate_Vdrainp_sourcep);
   12456                 :          0 : qsrc_Vdrainb_sourcep=((-0.5)*qgate_Vdrainb_sourcep);
   12457                 :          0 : qsrc_Vbulkp_sourcep=((-0.5)*qgate_Vbulkp_sourcep);
   12458                 :          0 : qsrc_Vsourceb_sourcep=((-0.5)*qgate_Vsourceb_sourcep);
   12459                 :            : #endif
   12460                 :          0 : qsrc=((-0.5)*qgate);
   12461                 :            : }
   12462                 :            : }
   12463                 :            : #if defined(_DERIVATE)
   12464                 :       7356 : qgate_Vgatep_sourcep=(((qgate_Vgatep_sourcep+qac0_Vgatep_sourcep)+qsub0_Vgatep_sourcep)-qbulk_Vgatep_sourcep);
   12465                 :       7356 : qgate_Vdrainp_sourcep=(((qgate_Vdrainp_sourcep+qac0_Vdrainp_sourcep)+qsub0_Vdrainp_sourcep)-qbulk_Vdrainp_sourcep);
   12466                 :       7356 : qgate_Vdrainb_sourcep=(((qgate_Vdrainb_sourcep+qac0_Vdrainb_sourcep)+qsub0_Vdrainb_sourcep)-qbulk_Vdrainb_sourcep);
   12467                 :       7356 : qgate_Vbulkp_sourcep=(((qgate_Vbulkp_sourcep+qac0_Vbulkp_sourcep)+qsub0_Vbulkp_sourcep)-qbulk_Vbulkp_sourcep);
   12468                 :       7356 : qgate_Vsourceb_sourcep=(((qgate_Vsourceb_sourcep+qac0_Vsourceb_sourcep)+qsub0_Vsourceb_sourcep)-qbulk_Vsourceb_sourcep);
   12469                 :            : #endif
   12470                 :       7356 : qgate=(((qgate+qac0)+qsub0)-qbulk);
   12471                 :            : #if defined(_DERIVATE)
   12472                 :       7356 : qbulk_Vgatem_sourcep=0.0;
   12473                 :       7356 : qbulk_Vgatep_sourcep=(qbulk_Vgatep_sourcep-(qac0_Vgatep_sourcep+qsub0_Vgatep_sourcep));
   12474                 :       7356 : qbulk_Vdrainp_sourcep=(qbulk_Vdrainp_sourcep-(qac0_Vdrainp_sourcep+qsub0_Vdrainp_sourcep));
   12475                 :       7356 : qbulk_Vdrainb_sourcep=(qbulk_Vdrainb_sourcep-(qac0_Vdrainb_sourcep+qsub0_Vdrainb_sourcep));
   12476                 :       7356 : qbulk_Vbulkp_sourcep=(qbulk_Vbulkp_sourcep-(qac0_Vbulkp_sourcep+qsub0_Vbulkp_sourcep));
   12477                 :       7356 : qbulk_Vsourceb_sourcep=(qbulk_Vsourceb_sourcep-(qac0_Vsourceb_sourcep+qsub0_Vsourceb_sourcep));
   12478                 :            : #endif
   12479                 :       7356 : qbulk=(qbulk-(qac0+qsub0));
   12480                 :            : #if defined(_DERIVATE)
   12481                 :       7356 : qdrn_Vgatem_sourcep=0.0;
   12482                 :       7356 : qdrn_Vgatep_sourcep=(-((qgate_Vgatep_sourcep+qbulk_Vgatep_sourcep)+qsrc_Vgatep_sourcep));
   12483                 :       7356 : qdrn_Vdrainp_sourcep=(-((qgate_Vdrainp_sourcep+qbulk_Vdrainp_sourcep)+qsrc_Vdrainp_sourcep));
   12484                 :       7356 : qdrn_Vdrainb_sourcep=(-((qgate_Vdrainb_sourcep+qbulk_Vdrainb_sourcep)+qsrc_Vdrainb_sourcep));
   12485                 :       7356 : qdrn_Vbulkp_sourcep=(-((qgate_Vbulkp_sourcep+qbulk_Vbulkp_sourcep)+qsrc_Vbulkp_sourcep));
   12486                 :       7356 : qdrn_Vsourceb_sourcep=(-((qgate_Vsourceb_sourcep+qbulk_Vsourceb_sourcep)+qsrc_Vsourceb_sourcep));
   12487                 :            : #endif
   12488                 :       7356 : qdrn=(-((qgate+qbulk)+qsrc));
   12489                 :            : }
   12490                 :            : }
   12491                 :            : }
   12492                 :            : }
   12493         [ +  - ]:       7356 : if
   12494                 :            : (ccn==1)
   12495                 :            : {
   12496                 :            : #if defined(_DERIVATE)
   12497                 :       7356 : qsrc_Vgatem_sourcep=0.0;
   12498                 :       7356 : qsrc_Vgatep_sourcep=(-((qgate_Vgatep_sourcep+qbulk_Vgatep_sourcep)+qdrn_Vgatep_sourcep));
   12499                 :       7356 : qsrc_Vdrainp_sourcep=(-((qgate_Vdrainp_sourcep+qbulk_Vdrainp_sourcep)+qdrn_Vdrainp_sourcep));
   12500                 :       7356 : qsrc_Vdrainb_sourcep=(-((qgate_Vdrainb_sourcep+qbulk_Vdrainb_sourcep)+qdrn_Vdrainb_sourcep));
   12501                 :       7356 : qsrc_Vbulkp_sourcep=(-((qgate_Vbulkp_sourcep+qbulk_Vbulkp_sourcep)+qdrn_Vbulkp_sourcep));
   12502                 :       7356 : qsrc_Vsourceb_sourcep=(-((qgate_Vsourceb_sourcep+qbulk_Vsourceb_sourcep)+qdrn_Vsourceb_sourcep));
   12503                 :            : #endif
   12504                 :       7356 : qsrc=(-((qgate+qbulk)+qdrn));
   12505                 :            : }
   12506         [ +  - ]:       7356 : if
   12507                 :            : (ccn==1)
   12508                 :            : {
   12509                 :       7356 : czbd=(cjd_temp*adeff);
   12510                 :       7356 : czbs=(cjs_temp*aseff);
   12511                 :       7356 : czbdsw=(cjswd_temp*pdeff);
   12512                 :       7356 : czbdswg=((cjswgd_temp*weffcj)*nf);
   12513                 :       7356 : czbssw=(cjsws_temp*pseff);
   12514                 :       7356 : czbsswg=((cjswgs_temp*weffcj)*nf);
   12515         [ +  + ]:       7356 : if
   12516                 :            : (vbs_jct==0.0)
   12517                 :            : {
   12518                 :            : #if defined(_DERIVATE)
   12519                 :       2112 : qbs_Vgatep_sourcep=0.0;
   12520                 :       2112 : qbs_Vdrainp_sourcep=0.0;
   12521                 :       2112 : qbs_Vdrainb_sourcep=0.0;
   12522                 :       2112 : qbs_Vbulkp_sourcep=0.0;
   12523                 :       2112 : qbs_Vsourceb_sourcep=0.0;
   12524                 :            : #endif
   12525                 :       2112 : qbs=0.0;
   12526                 :            : }
   12527                 :            : else
   12528                 :            : {
   12529         [ +  + ]:       5244 : if
   12530                 :            : (vbs_jct<0.0)
   12531                 :            : {
   12532         [ +  - ]:       3284 : if
   12533                 :            : (czbs>0.0)
   12534                 :            : {
   12535                 :            : #if defined(_DERIVATE)
   12536                 :       3284 : arg_Vdrainp_sourcep=0.0;
   12537                 :       3284 : arg_Vdrainb_sourcep=0.0;
   12538                 :       3284 : arg_Vbulkp_sourcep=(-(vbs_jct_Vbulkp_sourcep/phibs));
   12539                 :       3284 : arg_Vsourceb_sourcep=(-(vbs_jct_Vsourceb_sourcep/phibs));
   12540                 :            : #endif
   12541                 :       3284 : arg=(1.0-(vbs_jct/phibs));
   12542         [ +  - ]:       3284 : if
   12543                 :            : (mjs==0.5)
   12544                 :            : {
   12545                 :            : {
   12546                 :       3284 : double m00_sqrt(d00_sqrt0,arg)
   12547                 :            : #if defined(_DERIVATE)
   12548                 :       3284 : double m10_sqrt(d10_sqrt0,d00_sqrt0,arg)
   12549                 :            : #endif
   12550                 :            : #if defined(_DERIVATE)
   12551                 :       3284 : sarg_Vdrainp_sourcep=0.0;
   12552                 :       3284 : sarg_Vdrainb_sourcep=0.0;
   12553                 :       3284 : sarg_Vbulkp_sourcep=(-arg_Vbulkp_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12554                 :       3284 : sarg_Vsourceb_sourcep=(-arg_Vsourceb_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12555                 :            : #endif
   12556                 :       3284 : sarg=(1.0/d00_sqrt0);
   12557                 :            : }
   12558                 :            : }
   12559                 :            : else
   12560                 :            : {
   12561                 :            : {
   12562                 :          0 : double m00_logE(d00_logE0,arg)
   12563                 :          0 : double m00_exp(d00_exp1,((-mjs)*d00_logE0))
   12564                 :            : #if defined(_DERIVATE)
   12565                 :          0 : double m10_logE(d10_logE0,d00_logE0,arg)
   12566                 :            : #define d10_exp1 d00_exp1
   12567                 :            : #endif
   12568                 :            : #if defined(_DERIVATE)
   12569                 :          0 : sarg_Vdrainp_sourcep=0.0;
   12570                 :          0 : sarg_Vdrainb_sourcep=0.0;
   12571                 :          0 : sarg_Vbulkp_sourcep=((-mjs)*arg_Vbulkp_sourcep*d10_logE0)*d10_exp1;
   12572                 :          0 : sarg_Vsourceb_sourcep=((-mjs)*arg_Vsourceb_sourcep*d10_logE0)*d10_exp1;
   12573                 :            : #endif
   12574                 :          0 : sarg=d00_exp1;
   12575                 :            : }
   12576                 :            : }
   12577                 :            : #if defined(_DERIVATE)
   12578                 :       3284 : qbs_Vgatep_sourcep=0.0;
   12579                 :       3284 : qbs_Vdrainp_sourcep=0.0;
   12580                 :       3284 : qbs_Vdrainb_sourcep=0.0;
   12581                 :       3284 : qbs_Vbulkp_sourcep=(((phibs*czbs)*(-((arg_Vbulkp_sourcep*sarg)+(arg*sarg_Vbulkp_sourcep))))/(1.0-mjs));
   12582                 :       3284 : qbs_Vsourceb_sourcep=(((phibs*czbs)*(-((arg_Vsourceb_sourcep*sarg)+(arg*sarg_Vsourceb_sourcep))))/(1.0-mjs));
   12583                 :            : #endif
   12584                 :       3284 : qbs=(((phibs*czbs)*(1.0-(arg*sarg)))/(1.0-mjs));
   12585                 :            : }
   12586                 :            : else
   12587                 :            : {
   12588                 :            : #if defined(_DERIVATE)
   12589                 :          0 : qbs_Vgatep_sourcep=0.0;
   12590                 :          0 : qbs_Vdrainp_sourcep=0.0;
   12591                 :          0 : qbs_Vdrainb_sourcep=0.0;
   12592                 :          0 : qbs_Vbulkp_sourcep=0.0;
   12593                 :          0 : qbs_Vsourceb_sourcep=0.0;
   12594                 :            : #endif
   12595                 :          0 : qbs=0.0;
   12596                 :            : }
   12597         [ +  - ]:       3284 : if
   12598                 :            : (czbssw>0.0)
   12599                 :            : {
   12600                 :            : #if defined(_DERIVATE)
   12601                 :       3284 : arg_Vdrainp_sourcep=0.0;
   12602                 :       3284 : arg_Vdrainb_sourcep=0.0;
   12603                 :       3284 : arg_Vbulkp_sourcep=(-(vbs_jct_Vbulkp_sourcep/phibsws));
   12604                 :       3284 : arg_Vsourceb_sourcep=(-(vbs_jct_Vsourceb_sourcep/phibsws));
   12605                 :            : #endif
   12606                 :       3284 : arg=(1.0-(vbs_jct/phibsws));
   12607         [ -  + ]:       3284 : if
   12608                 :            : (mjsws==0.5)
   12609                 :            : {
   12610                 :            : {
   12611                 :          0 : double m00_sqrt(d00_sqrt0,arg)
   12612                 :            : #if defined(_DERIVATE)
   12613                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,arg)
   12614                 :            : #endif
   12615                 :            : #if defined(_DERIVATE)
   12616                 :          0 : sarg_Vdrainp_sourcep=0.0;
   12617                 :          0 : sarg_Vdrainb_sourcep=0.0;
   12618                 :          0 : sarg_Vbulkp_sourcep=(-arg_Vbulkp_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12619                 :          0 : sarg_Vsourceb_sourcep=(-arg_Vsourceb_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12620                 :            : #endif
   12621                 :          0 : sarg=(1.0/d00_sqrt0);
   12622                 :            : }
   12623                 :            : }
   12624                 :            : else
   12625                 :            : {
   12626                 :            : {
   12627                 :       3284 : double m00_logE(d00_logE0,arg)
   12628                 :       3284 : double m00_exp(d00_exp1,((-mjsws)*d00_logE0))
   12629                 :            : #if defined(_DERIVATE)
   12630                 :       3284 : double m10_logE(d10_logE0,d00_logE0,arg)
   12631                 :            : #define d10_exp1 d00_exp1
   12632                 :            : #endif
   12633                 :            : #if defined(_DERIVATE)
   12634                 :       3284 : sarg_Vdrainp_sourcep=0.0;
   12635                 :       3284 : sarg_Vdrainb_sourcep=0.0;
   12636                 :       3284 : sarg_Vbulkp_sourcep=((-mjsws)*arg_Vbulkp_sourcep*d10_logE0)*d10_exp1;
   12637                 :       3284 : sarg_Vsourceb_sourcep=((-mjsws)*arg_Vsourceb_sourcep*d10_logE0)*d10_exp1;
   12638                 :            : #endif
   12639                 :       3284 : sarg=d00_exp1;
   12640                 :            : }
   12641                 :            : }
   12642                 :            : #if defined(_DERIVATE)
   12643                 :       3284 : qbs_Vgatep_sourcep=0.0;
   12644                 :       3284 : qbs_Vdrainp_sourcep=0.0;
   12645                 :       3284 : qbs_Vdrainb_sourcep=0.0;
   12646                 :       3284 : qbs_Vbulkp_sourcep=(qbs_Vbulkp_sourcep+(((phibsws*czbssw)*(-((arg_Vbulkp_sourcep*sarg)+(arg*sarg_Vbulkp_sourcep))))/(1.0-mjsws)));
   12647                 :       3284 : qbs_Vsourceb_sourcep=(qbs_Vsourceb_sourcep+(((phibsws*czbssw)*(-((arg_Vsourceb_sourcep*sarg)+(arg*sarg_Vsourceb_sourcep))))/(1.0-mjsws)));
   12648                 :            : #endif
   12649                 :       3284 : qbs=(qbs+(((phibsws*czbssw)*(1.0-(arg*sarg)))/(1.0-mjsws)));
   12650                 :            : }
   12651         [ +  - ]:       3284 : if
   12652                 :            : (czbsswg>0.0)
   12653                 :            : {
   12654                 :            : #if defined(_DERIVATE)
   12655                 :       3284 : arg_Vdrainp_sourcep=0.0;
   12656                 :       3284 : arg_Vdrainb_sourcep=0.0;
   12657                 :       3284 : arg_Vbulkp_sourcep=(-(vbs_jct_Vbulkp_sourcep/phibswgs));
   12658                 :       3284 : arg_Vsourceb_sourcep=(-(vbs_jct_Vsourceb_sourcep/phibswgs));
   12659                 :            : #endif
   12660                 :       3284 : arg=(1.0-(vbs_jct/phibswgs));
   12661         [ -  + ]:       3284 : if
   12662                 :            : (mjswgs==0.5)
   12663                 :            : {
   12664                 :            : {
   12665                 :          0 : double m00_sqrt(d00_sqrt0,arg)
   12666                 :            : #if defined(_DERIVATE)
   12667                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,arg)
   12668                 :            : #endif
   12669                 :            : #if defined(_DERIVATE)
   12670                 :          0 : sarg_Vdrainp_sourcep=0.0;
   12671                 :          0 : sarg_Vdrainb_sourcep=0.0;
   12672                 :          0 : sarg_Vbulkp_sourcep=(-arg_Vbulkp_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12673                 :          0 : sarg_Vsourceb_sourcep=(-arg_Vsourceb_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12674                 :            : #endif
   12675                 :          0 : sarg=(1.0/d00_sqrt0);
   12676                 :            : }
   12677                 :            : }
   12678                 :            : else
   12679                 :            : {
   12680                 :            : {
   12681                 :       3284 : double m00_logE(d00_logE0,arg)
   12682                 :       3284 : double m00_exp(d00_exp1,((-mjswgs)*d00_logE0))
   12683                 :            : #if defined(_DERIVATE)
   12684                 :       3284 : double m10_logE(d10_logE0,d00_logE0,arg)
   12685                 :            : #define d10_exp1 d00_exp1
   12686                 :            : #endif
   12687                 :            : #if defined(_DERIVATE)
   12688                 :       3284 : sarg_Vdrainp_sourcep=0.0;
   12689                 :       3284 : sarg_Vdrainb_sourcep=0.0;
   12690                 :       3284 : sarg_Vbulkp_sourcep=((-mjswgs)*arg_Vbulkp_sourcep*d10_logE0)*d10_exp1;
   12691                 :       3284 : sarg_Vsourceb_sourcep=((-mjswgs)*arg_Vsourceb_sourcep*d10_logE0)*d10_exp1;
   12692                 :            : #endif
   12693                 :       3284 : sarg=d00_exp1;
   12694                 :            : }
   12695                 :            : }
   12696                 :            : #if defined(_DERIVATE)
   12697                 :       3284 : qbs_Vgatep_sourcep=0.0;
   12698                 :       3284 : qbs_Vdrainp_sourcep=0.0;
   12699                 :       3284 : qbs_Vdrainb_sourcep=0.0;
   12700                 :       3284 : qbs_Vbulkp_sourcep=(qbs_Vbulkp_sourcep+(((phibswgs*czbsswg)*(-((arg_Vbulkp_sourcep*sarg)+(arg*sarg_Vbulkp_sourcep))))/(1.0-mjswgs)));
   12701                 :       3284 : qbs_Vsourceb_sourcep=(qbs_Vsourceb_sourcep+(((phibswgs*czbsswg)*(-((arg_Vsourceb_sourcep*sarg)+(arg*sarg_Vsourceb_sourcep))))/(1.0-mjswgs)));
   12702                 :            : #endif
   12703                 :       3284 : qbs=(qbs+(((phibswgs*czbsswg)*(1.0-(arg*sarg)))/(1.0-mjswgs)));
   12704                 :            : }
   12705                 :            : }
   12706                 :            : else
   12707                 :            : {
   12708                 :            : #if defined(_DERIVATE)
   12709                 :       1960 : t0_Vgatep_sourcep=0.0;
   12710                 :       1960 : t0_Vdrainp_sourcep=0.0;
   12711                 :       1960 : t0_Vdrainb_sourcep=0.0;
   12712                 :       1960 : t0_Vbulkp_sourcep=0.0;
   12713                 :       1960 : t0_Vsourceb_sourcep=0.0;
   12714                 :            : #endif
   12715                 :       1960 : t0=((czbs+czbssw)+czbsswg);
   12716                 :            : #if defined(_DERIVATE)
   12717                 :       1960 : t1_Vgatep_sourcep=0.0;
   12718                 :       1960 : t1_Vdrainp_sourcep=0.0;
   12719                 :       1960 : t1_Vdrainb_sourcep=0.0;
   12720                 :       1960 : t1_Vbulkp_sourcep=vbs_jct_Vbulkp_sourcep*((((czbs*mjs)/phibs)+((czbssw*mjsws)/phibsws))+((czbsswg*mjswgs)/phibswgs));
   12721                 :       1960 : t1_Vsourceb_sourcep=vbs_jct_Vsourceb_sourcep*((((czbs*mjs)/phibs)+((czbssw*mjsws)/phibsws))+((czbsswg*mjswgs)/phibswgs));
   12722                 :            : #endif
   12723                 :       1960 : t1=(vbs_jct*((((czbs*mjs)/phibs)+((czbssw*mjsws)/phibsws))+((czbsswg*mjswgs)/phibswgs)));
   12724                 :            : #if defined(_DERIVATE)
   12725                 :       1960 : qbs_Vgatep_sourcep=(vbs_jct*(t0_Vgatep_sourcep+(0.5*t1_Vgatep_sourcep)));
   12726                 :       1960 : qbs_Vdrainp_sourcep=(vbs_jct*(t0_Vdrainp_sourcep+(0.5*t1_Vdrainp_sourcep)));
   12727                 :       1960 : qbs_Vdrainb_sourcep=(vbs_jct*(t0_Vdrainb_sourcep+(0.5*t1_Vdrainb_sourcep)));
   12728                 :       1960 : qbs_Vbulkp_sourcep=((vbs_jct_Vbulkp_sourcep*(t0+(0.5*t1)))+(vbs_jct*(t0_Vbulkp_sourcep+(0.5*t1_Vbulkp_sourcep))));
   12729                 :       1960 : qbs_Vsourceb_sourcep=((vbs_jct_Vsourceb_sourcep*(t0+(0.5*t1)))+(vbs_jct*(t0_Vsourceb_sourcep+(0.5*t1_Vsourceb_sourcep))));
   12730                 :            : #endif
   12731                 :       1960 : qbs=(vbs_jct*(t0+(0.5*t1)));
   12732                 :            : }
   12733                 :            : }
   12734         [ +  + ]:       7356 : if
   12735                 :            : (vbd_jct==0.0)
   12736                 :            : {
   12737                 :            : #if defined(_DERIVATE)
   12738                 :       2112 : qbd_Vgatep_sourcep=0.0;
   12739                 :       2112 : qbd_Vdrainp_sourcep=0.0;
   12740                 :       2112 : qbd_Vdrainb_sourcep=0.0;
   12741                 :       2112 : qbd_Vbulkp_sourcep=0.0;
   12742                 :       2112 : qbd_Vsourceb_sourcep=0.0;
   12743                 :            : #endif
   12744                 :       2112 : qbd=0.0;
   12745                 :            : }
   12746                 :            : else
   12747                 :            : {
   12748         [ +  - ]:       5244 : if
   12749                 :            : (vbd_jct<0.0)
   12750                 :            : {
   12751         [ +  - ]:       5244 : if
   12752                 :            : (czbd>0.0)
   12753                 :            : {
   12754                 :            : #if defined(_DERIVATE)
   12755                 :       5244 : arg_Vdrainp_sourcep=(-(vbd_jct_Vdrainp_sourcep/phibd));
   12756                 :       5244 : arg_Vdrainb_sourcep=(-(vbd_jct_Vdrainb_sourcep/phibd));
   12757                 :       5244 : arg_Vbulkp_sourcep=(-(vbd_jct_Vbulkp_sourcep/phibd));
   12758                 :       5244 : arg_Vsourceb_sourcep=0.0;
   12759                 :            : #endif
   12760                 :       5244 : arg=(1.0-(vbd_jct/phibd));
   12761         [ +  - ]:       5244 : if
   12762                 :            : (mjd==0.5)
   12763                 :            : {
   12764                 :            : {
   12765                 :       5244 : double m00_sqrt(d00_sqrt0,arg)
   12766                 :            : #if defined(_DERIVATE)
   12767                 :       5244 : double m10_sqrt(d10_sqrt0,d00_sqrt0,arg)
   12768                 :            : #endif
   12769                 :            : #if defined(_DERIVATE)
   12770                 :       5244 : sarg_Vdrainp_sourcep=(-arg_Vdrainp_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12771                 :       5244 : sarg_Vdrainb_sourcep=(-arg_Vdrainb_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12772                 :       5244 : sarg_Vbulkp_sourcep=(-arg_Vbulkp_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12773                 :       5244 : sarg_Vsourceb_sourcep=(-arg_Vsourceb_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12774                 :            : #endif
   12775                 :       5244 : sarg=(1.0/d00_sqrt0);
   12776                 :            : }
   12777                 :            : }
   12778                 :            : else
   12779                 :            : {
   12780                 :            : {
   12781                 :          0 : double m00_logE(d00_logE0,arg)
   12782                 :          0 : double m00_exp(d00_exp1,((-mjd)*d00_logE0))
   12783                 :            : #if defined(_DERIVATE)
   12784                 :          0 : double m10_logE(d10_logE0,d00_logE0,arg)
   12785                 :            : #define d10_exp1 d00_exp1
   12786                 :            : #endif
   12787                 :            : #if defined(_DERIVATE)
   12788                 :          0 : sarg_Vdrainp_sourcep=((-mjd)*arg_Vdrainp_sourcep*d10_logE0)*d10_exp1;
   12789                 :          0 : sarg_Vdrainb_sourcep=((-mjd)*arg_Vdrainb_sourcep*d10_logE0)*d10_exp1;
   12790                 :          0 : sarg_Vbulkp_sourcep=((-mjd)*arg_Vbulkp_sourcep*d10_logE0)*d10_exp1;
   12791                 :          0 : sarg_Vsourceb_sourcep=((-mjd)*arg_Vsourceb_sourcep*d10_logE0)*d10_exp1;
   12792                 :            : #endif
   12793                 :          0 : sarg=d00_exp1;
   12794                 :            : }
   12795                 :            : }
   12796                 :            : #if defined(_DERIVATE)
   12797                 :       5244 : qbd_Vgatep_sourcep=0.0;
   12798                 :       5244 : qbd_Vdrainp_sourcep=(((phibd*czbd)*(-((arg_Vdrainp_sourcep*sarg)+(arg*sarg_Vdrainp_sourcep))))/(1.0-mjd));
   12799                 :       5244 : qbd_Vdrainb_sourcep=(((phibd*czbd)*(-((arg_Vdrainb_sourcep*sarg)+(arg*sarg_Vdrainb_sourcep))))/(1.0-mjd));
   12800                 :       5244 : qbd_Vbulkp_sourcep=(((phibd*czbd)*(-((arg_Vbulkp_sourcep*sarg)+(arg*sarg_Vbulkp_sourcep))))/(1.0-mjd));
   12801                 :       5244 : qbd_Vsourceb_sourcep=(((phibd*czbd)*(-((arg_Vsourceb_sourcep*sarg)+(arg*sarg_Vsourceb_sourcep))))/(1.0-mjd));
   12802                 :            : #endif
   12803                 :       5244 : qbd=(((phibd*czbd)*(1.0-(arg*sarg)))/(1.0-mjd));
   12804                 :            : }
   12805                 :            : else
   12806                 :            : {
   12807                 :            : #if defined(_DERIVATE)
   12808                 :          0 : qbd_Vgatep_sourcep=0.0;
   12809                 :          0 : qbd_Vdrainp_sourcep=0.0;
   12810                 :          0 : qbd_Vdrainb_sourcep=0.0;
   12811                 :          0 : qbd_Vbulkp_sourcep=0.0;
   12812                 :          0 : qbd_Vsourceb_sourcep=0.0;
   12813                 :            : #endif
   12814                 :          0 : qbd=0.0;
   12815                 :            : }
   12816         [ +  - ]:       5244 : if
   12817                 :            : (czbdsw>0.0)
   12818                 :            : {
   12819                 :            : #if defined(_DERIVATE)
   12820                 :       5244 : arg_Vdrainp_sourcep=(-(vbd_jct_Vdrainp_sourcep/phibswd));
   12821                 :       5244 : arg_Vdrainb_sourcep=(-(vbd_jct_Vdrainb_sourcep/phibswd));
   12822                 :       5244 : arg_Vbulkp_sourcep=(-(vbd_jct_Vbulkp_sourcep/phibswd));
   12823                 :       5244 : arg_Vsourceb_sourcep=0.0;
   12824                 :            : #endif
   12825                 :       5244 : arg=(1.0-(vbd_jct/phibswd));
   12826         [ -  + ]:       5244 : if
   12827                 :            : (mjswd==0.5)
   12828                 :            : {
   12829                 :            : {
   12830                 :          0 : double m00_sqrt(d00_sqrt0,arg)
   12831                 :            : #if defined(_DERIVATE)
   12832                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,arg)
   12833                 :            : #endif
   12834                 :            : #if defined(_DERIVATE)
   12835                 :          0 : sarg_Vdrainp_sourcep=(-arg_Vdrainp_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12836                 :          0 : sarg_Vdrainb_sourcep=(-arg_Vdrainb_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12837                 :          0 : sarg_Vbulkp_sourcep=(-arg_Vbulkp_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12838                 :          0 : sarg_Vsourceb_sourcep=(-arg_Vsourceb_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12839                 :            : #endif
   12840                 :          0 : sarg=(1.0/d00_sqrt0);
   12841                 :            : }
   12842                 :            : }
   12843                 :            : else
   12844                 :            : {
   12845                 :            : {
   12846                 :       5244 : double m00_logE(d00_logE0,arg)
   12847                 :       5244 : double m00_exp(d00_exp1,((-mjswd)*d00_logE0))
   12848                 :            : #if defined(_DERIVATE)
   12849                 :       5244 : double m10_logE(d10_logE0,d00_logE0,arg)
   12850                 :            : #define d10_exp1 d00_exp1
   12851                 :            : #endif
   12852                 :            : #if defined(_DERIVATE)
   12853                 :       5244 : sarg_Vdrainp_sourcep=((-mjswd)*arg_Vdrainp_sourcep*d10_logE0)*d10_exp1;
   12854                 :       5244 : sarg_Vdrainb_sourcep=((-mjswd)*arg_Vdrainb_sourcep*d10_logE0)*d10_exp1;
   12855                 :       5244 : sarg_Vbulkp_sourcep=((-mjswd)*arg_Vbulkp_sourcep*d10_logE0)*d10_exp1;
   12856                 :       5244 : sarg_Vsourceb_sourcep=((-mjswd)*arg_Vsourceb_sourcep*d10_logE0)*d10_exp1;
   12857                 :            : #endif
   12858                 :       5244 : sarg=d00_exp1;
   12859                 :            : }
   12860                 :            : }
   12861                 :            : #if defined(_DERIVATE)
   12862                 :       5244 : qbd_Vgatep_sourcep=0.0;
   12863                 :       5244 : qbd_Vdrainp_sourcep=(qbd_Vdrainp_sourcep+(((phibswd*czbdsw)*(-((arg_Vdrainp_sourcep*sarg)+(arg*sarg_Vdrainp_sourcep))))/(1.0-mjswd)));
   12864                 :       5244 : qbd_Vdrainb_sourcep=(qbd_Vdrainb_sourcep+(((phibswd*czbdsw)*(-((arg_Vdrainb_sourcep*sarg)+(arg*sarg_Vdrainb_sourcep))))/(1.0-mjswd)));
   12865                 :       5244 : qbd_Vbulkp_sourcep=(qbd_Vbulkp_sourcep+(((phibswd*czbdsw)*(-((arg_Vbulkp_sourcep*sarg)+(arg*sarg_Vbulkp_sourcep))))/(1.0-mjswd)));
   12866                 :       5244 : qbd_Vsourceb_sourcep=(qbd_Vsourceb_sourcep+(((phibswd*czbdsw)*(-((arg_Vsourceb_sourcep*sarg)+(arg*sarg_Vsourceb_sourcep))))/(1.0-mjswd)));
   12867                 :            : #endif
   12868                 :       5244 : qbd=(qbd+(((phibswd*czbdsw)*(1.0-(arg*sarg)))/(1.0-mjswd)));
   12869                 :            : }
   12870         [ +  - ]:       5244 : if
   12871                 :            : (czbdswg>0.0)
   12872                 :            : {
   12873                 :            : #if defined(_DERIVATE)
   12874                 :       5244 : arg_Vdrainp_sourcep=(-(vbd_jct_Vdrainp_sourcep/phibswgd));
   12875                 :       5244 : arg_Vdrainb_sourcep=(-(vbd_jct_Vdrainb_sourcep/phibswgd));
   12876                 :       5244 : arg_Vbulkp_sourcep=(-(vbd_jct_Vbulkp_sourcep/phibswgd));
   12877                 :       5244 : arg_Vsourceb_sourcep=0.0;
   12878                 :            : #endif
   12879                 :       5244 : arg=(1.0-(vbd_jct/phibswgd));
   12880         [ -  + ]:       5244 : if
   12881                 :            : (mjswgd==0.5)
   12882                 :            : {
   12883                 :            : {
   12884                 :          0 : double m00_sqrt(d00_sqrt0,arg)
   12885                 :            : #if defined(_DERIVATE)
   12886                 :          0 : double m10_sqrt(d10_sqrt0,d00_sqrt0,arg)
   12887                 :            : #endif
   12888                 :            : #if defined(_DERIVATE)
   12889                 :          0 : sarg_Vdrainp_sourcep=(-arg_Vdrainp_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12890                 :          0 : sarg_Vdrainb_sourcep=(-arg_Vdrainb_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12891                 :          0 : sarg_Vbulkp_sourcep=(-arg_Vbulkp_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12892                 :          0 : sarg_Vsourceb_sourcep=(-arg_Vsourceb_sourcep*d10_sqrt0/d00_sqrt0/d00_sqrt0);
   12893                 :            : #endif
   12894                 :          0 : sarg=(1.0/d00_sqrt0);
   12895                 :            : }
   12896                 :            : }
   12897                 :            : else
   12898                 :            : {
   12899                 :            : {
   12900                 :       5244 : double m00_logE(d00_logE0,arg)
   12901                 :       5244 : double m00_exp(d00_exp1,((-mjswgd)*d00_logE0))
   12902                 :            : #if defined(_DERIVATE)
   12903                 :       5244 : double m10_logE(d10_logE0,d00_logE0,arg)
   12904                 :            : #define d10_exp1 d00_exp1
   12905                 :            : #endif
   12906                 :            : #if defined(_DERIVATE)
   12907                 :       5244 : sarg_Vdrainp_sourcep=((-mjswgd)*arg_Vdrainp_sourcep*d10_logE0)*d10_exp1;
   12908                 :       5244 : sarg_Vdrainb_sourcep=((-mjswgd)*arg_Vdrainb_sourcep*d10_logE0)*d10_exp1;
   12909                 :       5244 : sarg_Vbulkp_sourcep=((-mjswgd)*arg_Vbulkp_sourcep*d10_logE0)*d10_exp1;
   12910                 :       5244 : sarg_Vsourceb_sourcep=((-mjswgd)*arg_Vsourceb_sourcep*d10_logE0)*d10_exp1;
   12911                 :            : #endif
   12912                 :       5244 : sarg=d00_exp1;
   12913                 :            : }
   12914                 :            : }
   12915                 :            : #if defined(_DERIVATE)
   12916                 :       5244 : qbd_Vgatep_sourcep=0.0;
   12917                 :       5244 : qbd_Vdrainp_sourcep=(qbd_Vdrainp_sourcep+(((phibswgd*czbdswg)*(-((arg_Vdrainp_sourcep*sarg)+(arg*sarg_Vdrainp_sourcep))))/(1.0-mjswgd)));
   12918                 :       5244 : qbd_Vdrainb_sourcep=(qbd_Vdrainb_sourcep+(((phibswgd*czbdswg)*(-((arg_Vdrainb_sourcep*sarg)+(arg*sarg_Vdrainb_sourcep))))/(1.0-mjswgd)));
   12919                 :       5244 : qbd_Vbulkp_sourcep=(qbd_Vbulkp_sourcep+(((phibswgd*czbdswg)*(-((arg_Vbulkp_sourcep*sarg)+(arg*sarg_Vbulkp_sourcep))))/(1.0-mjswgd)));
   12920                 :       5244 : qbd_Vsourceb_sourcep=(qbd_Vsourceb_sourcep+(((phibswgd*czbdswg)*(-((arg_Vsourceb_sourcep*sarg)+(arg*sarg_Vsourceb_sourcep))))/(1.0-mjswgd)));
   12921                 :            : #endif
   12922                 :       5244 : qbd=(qbd+(((phibswgd*czbdswg)*(1.0-(arg*sarg)))/(1.0-mjswgd)));
   12923                 :            : }
   12924                 :            : }
   12925                 :            : else
   12926                 :            : {
   12927                 :            : #if defined(_DERIVATE)
   12928                 :          0 : t0_Vgatep_sourcep=0.0;
   12929                 :          0 : t0_Vdrainp_sourcep=0.0;
   12930                 :          0 : t0_Vdrainb_sourcep=0.0;
   12931                 :          0 : t0_Vbulkp_sourcep=0.0;
   12932                 :          0 : t0_Vsourceb_sourcep=0.0;
   12933                 :            : #endif
   12934                 :          0 : t0=((czbd+czbdsw)+czbdswg);
   12935                 :            : #if defined(_DERIVATE)
   12936                 :          0 : t1_Vgatep_sourcep=0.0;
   12937                 :          0 : t1_Vdrainp_sourcep=vbd_jct_Vdrainp_sourcep*((((czbd*mjd)/phibd)+((czbdsw*mjswd)/phibswd))+((czbdswg*mjswgd)/phibswgd));
   12938                 :          0 : t1_Vdrainb_sourcep=vbd_jct_Vdrainb_sourcep*((((czbd*mjd)/phibd)+((czbdsw*mjswd)/phibswd))+((czbdswg*mjswgd)/phibswgd));
   12939                 :          0 : t1_Vbulkp_sourcep=vbd_jct_Vbulkp_sourcep*((((czbd*mjd)/phibd)+((czbdsw*mjswd)/phibswd))+((czbdswg*mjswgd)/phibswgd));
   12940                 :          0 : t1_Vsourceb_sourcep=0.0;
   12941                 :            : #endif
   12942                 :          0 : t1=(vbd_jct*((((czbd*mjd)/phibd)+((czbdsw*mjswd)/phibswd))+((czbdswg*mjswgd)/phibswgd)));
   12943                 :            : #if defined(_DERIVATE)
   12944                 :          0 : qbd_Vgatep_sourcep=(vbd_jct*(t0_Vgatep_sourcep+(0.5*t1_Vgatep_sourcep)));
   12945                 :          0 : qbd_Vdrainp_sourcep=((vbd_jct_Vdrainp_sourcep*(t0+(0.5*t1)))+(vbd_jct*(t0_Vdrainp_sourcep+(0.5*t1_Vdrainp_sourcep))));
   12946                 :          0 : qbd_Vdrainb_sourcep=((vbd_jct_Vdrainb_sourcep*(t0+(0.5*t1)))+(vbd_jct*(t0_Vdrainb_sourcep+(0.5*t1_Vdrainb_sourcep))));
   12947                 :          0 : qbd_Vbulkp_sourcep=((vbd_jct_Vbulkp_sourcep*(t0+(0.5*t1)))+(vbd_jct*(t0_Vbulkp_sourcep+(0.5*t1_Vbulkp_sourcep))));
   12948                 :          0 : qbd_Vsourceb_sourcep=(vbd_jct*(t0_Vsourceb_sourcep+(0.5*t1_Vsourceb_sourcep)));
   12949                 :            : #endif
   12950                 :          0 : qbd=(vbd_jct*(t0+(0.5*t1)));
   12951                 :            : }
   12952                 :            : }
   12953                 :            : }
   12954         [ +  - ]:       7356 : if
   12955                 :            : (ccn==1)
   12956                 :            : {
   12957         [ -  + ]:       7356 : if
   12958                 :            : (capmod==0)
   12959                 :            : {
   12960                 :            : #if defined(_DYNAMIC)
   12961                 :          0 : cgdo=param_cgdo;
   12962                 :            : #endif
   12963                 :            : #if defined(_DYNAMIC)
   12964                 :          0 : cgso=param_cgso;
   12965                 :            : #endif
   12966                 :            : #if defined(_DERIVATE)
   12967                 :          0 : qgdo_Vdrainb_sourcep=0.0;
   12968                 :          0 : qgdo_Vbulkp_sourcep=0.0;
   12969                 :          0 : qgdo_Vsourceb_sourcep=0.0;
   12970                 :          0 : qgdo_Vgatep_sourcep=(param_cgdo*vgd_Vgatep_sourcep);
   12971                 :          0 : qgdo_Vdrainp_sourcep=(param_cgdo*vgd_Vdrainp_sourcep);
   12972                 :            : #endif
   12973                 :          0 : qgdo=(param_cgdo*vgd);
   12974                 :            : #if defined(_DERIVATE)
   12975                 :          0 : qgso_Vdrainp_sourcep=0.0;
   12976                 :          0 : qgso_Vdrainb_sourcep=0.0;
   12977                 :          0 : qgso_Vbulkp_sourcep=0.0;
   12978                 :          0 : qgso_Vsourceb_sourcep=0.0;
   12979                 :          0 : qgso_Vgatep_sourcep=(param_cgso*vgs_Vgatep_sourcep);
   12980                 :            : #endif
   12981                 :          0 : qgso=(param_cgso*vgs);
   12982                 :            : }
   12983                 :            : else
   12984                 :            : {
   12985                 :            : #if defined(_DERIVATE)
   12986                 :       7356 : t0_Vgatep_sourcep=vgd_Vgatep_sourcep;
   12987                 :       7356 : t0_Vdrainp_sourcep=vgd_Vdrainp_sourcep;
   12988                 :       7356 : t0_Vdrainb_sourcep=0.0;
   12989                 :       7356 : t0_Vbulkp_sourcep=0.0;
   12990                 :       7356 : t0_Vsourceb_sourcep=0.0;
   12991                 :            : #endif
   12992                 :       7356 : t0=(vgd+0.02);
   12993                 :            : {
   12994                 :       7356 : double m00_sqrt(d00_sqrt0,((t0*t0)+(4.0*0.02)))
   12995                 :            : #if defined(_DERIVATE)
   12996                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+(4.0*0.02)))
   12997                 :            : #endif
   12998                 :            : #if defined(_DERIVATE)
   12999                 :       7356 : t1_Vgatep_sourcep=((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))*d10_sqrt0;
   13000                 :       7356 : t1_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))*d10_sqrt0;
   13001                 :       7356 : t1_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))*d10_sqrt0;
   13002                 :       7356 : t1_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))*d10_sqrt0;
   13003                 :       7356 : t1_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))*d10_sqrt0;
   13004                 :            : #endif
   13005                 :       7356 : t1=d00_sqrt0;
   13006                 :            : }
   13007                 :            : #if defined(_DERIVATE)
   13008                 :       7356 : t2_Vgatep_sourcep=(0.5*(t0_Vgatep_sourcep-t1_Vgatep_sourcep));
   13009                 :       7356 : t2_Vdrainp_sourcep=(0.5*(t0_Vdrainp_sourcep-t1_Vdrainp_sourcep));
   13010                 :       7356 : t2_Vdrainb_sourcep=(0.5*(t0_Vdrainb_sourcep-t1_Vdrainb_sourcep));
   13011                 :       7356 : t2_Vbulkp_sourcep=(0.5*(t0_Vbulkp_sourcep-t1_Vbulkp_sourcep));
   13012                 :       7356 : t2_Vsourceb_sourcep=(0.5*(t0_Vsourceb_sourcep-t1_Vsourceb_sourcep));
   13013                 :            : #endif
   13014                 :       7356 : t2=(0.5*(t0-t1));
   13015                 :            : #if defined(_DERIVATE)
   13016                 :       7356 : t3_Vgatep_sourcep=0.0;
   13017                 :       7356 : t3_Vdrainp_sourcep=0.0;
   13018                 :       7356 : t3_Vdrainb_sourcep=0.0;
   13019                 :       7356 : t3_Vbulkp_sourcep=0.0;
   13020                 :       7356 : t3_Vsourceb_sourcep=0.0;
   13021                 :            : #endif
   13022                 :       7356 : t3=(weffcv*cgdl);
   13023                 :            : {
   13024                 :       7356 : double m00_sqrt(d00_sqrt0,(1.0-((4.0*t2)/ckappad)))
   13025                 :            : #if defined(_DERIVATE)
   13026                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,(1.0-((4.0*t2)/ckappad)))
   13027                 :            : #endif
   13028                 :            : #if defined(_DERIVATE)
   13029                 :       7356 : t4_Vgatep_sourcep=(-((4.0*t2_Vgatep_sourcep)/ckappad))*d10_sqrt0;
   13030                 :       7356 : t4_Vdrainp_sourcep=(-((4.0*t2_Vdrainp_sourcep)/ckappad))*d10_sqrt0;
   13031                 :       7356 : t4_Vdrainb_sourcep=(-((4.0*t2_Vdrainb_sourcep)/ckappad))*d10_sqrt0;
   13032                 :       7356 : t4_Vbulkp_sourcep=(-((4.0*t2_Vbulkp_sourcep)/ckappad))*d10_sqrt0;
   13033                 :       7356 : t4_Vsourceb_sourcep=(-((4.0*t2_Vsourceb_sourcep)/ckappad))*d10_sqrt0;
   13034                 :            : #endif
   13035                 :       7356 : t4=d00_sqrt0;
   13036                 :            : }
   13037                 :            : #if defined(_DYNAMIC)
   13038                 :       7356 : cgdo=((param_cgdo+t3)-((t3*(1.0-(1.0/t4)))*(0.5-((0.5*t0)/t1))));
   13039                 :            : #endif
   13040                 :            : #if defined(_DERIVATE)
   13041                 :       7356 : qgdo_Vdrainb_sourcep=(t3_Vdrainb_sourcep*vgd-((t3_Vdrainb_sourcep*(t2+((0.5*ckappad)*(t4-1.0))))+(t3*(t2_Vdrainb_sourcep+((0.5*ckappad)*t4_Vdrainb_sourcep)))));
   13042                 :       7356 : qgdo_Vbulkp_sourcep=(t3_Vbulkp_sourcep*vgd-((t3_Vbulkp_sourcep*(t2+((0.5*ckappad)*(t4-1.0))))+(t3*(t2_Vbulkp_sourcep+((0.5*ckappad)*t4_Vbulkp_sourcep)))));
   13043                 :       7356 : qgdo_Vsourceb_sourcep=(t3_Vsourceb_sourcep*vgd-((t3_Vsourceb_sourcep*(t2+((0.5*ckappad)*(t4-1.0))))+(t3*(t2_Vsourceb_sourcep+((0.5*ckappad)*t4_Vsourceb_sourcep)))));
   13044                 :       7356 : qgdo_Vgatep_sourcep=(((t3_Vgatep_sourcep*vgd)+((param_cgdo+t3)*vgd_Vgatep_sourcep))-((t3_Vgatep_sourcep*(t2+((0.5*ckappad)*(t4-1.0))))+(t3*(t2_Vgatep_sourcep+((0.5*ckappad)*t4_Vgatep_sourcep)))));
   13045                 :       7356 : qgdo_Vdrainp_sourcep=(((t3_Vdrainp_sourcep*vgd)+((param_cgdo+t3)*vgd_Vdrainp_sourcep))-((t3_Vdrainp_sourcep*(t2+((0.5*ckappad)*(t4-1.0))))+(t3*(t2_Vdrainp_sourcep+((0.5*ckappad)*t4_Vdrainp_sourcep)))));
   13046                 :            : #endif
   13047                 :       7356 : qgdo=(((param_cgdo+t3)*vgd)-(t3*(t2+((0.5*ckappad)*(t4-1.0)))));
   13048                 :            : #if defined(_DERIVATE)
   13049                 :       7356 : t0_Vgatep_sourcep=vgs_Vgatep_sourcep;
   13050                 :       7356 : t0_Vdrainp_sourcep=0.0;
   13051                 :       7356 : t0_Vdrainb_sourcep=0.0;
   13052                 :       7356 : t0_Vbulkp_sourcep=0.0;
   13053                 :       7356 : t0_Vsourceb_sourcep=0.0;
   13054                 :            : #endif
   13055                 :       7356 : t0=(vgs+0.02);
   13056                 :            : {
   13057                 :       7356 : double m00_sqrt(d00_sqrt0,((t0*t0)+(4.0*0.02)))
   13058                 :            : #if defined(_DERIVATE)
   13059                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,((t0*t0)+(4.0*0.02)))
   13060                 :            : #endif
   13061                 :            : #if defined(_DERIVATE)
   13062                 :       7356 : t1_Vgatep_sourcep=((t0_Vgatep_sourcep*t0)+(t0*t0_Vgatep_sourcep))*d10_sqrt0;
   13063                 :       7356 : t1_Vdrainp_sourcep=((t0_Vdrainp_sourcep*t0)+(t0*t0_Vdrainp_sourcep))*d10_sqrt0;
   13064                 :       7356 : t1_Vdrainb_sourcep=((t0_Vdrainb_sourcep*t0)+(t0*t0_Vdrainb_sourcep))*d10_sqrt0;
   13065                 :       7356 : t1_Vbulkp_sourcep=((t0_Vbulkp_sourcep*t0)+(t0*t0_Vbulkp_sourcep))*d10_sqrt0;
   13066                 :       7356 : t1_Vsourceb_sourcep=((t0_Vsourceb_sourcep*t0)+(t0*t0_Vsourceb_sourcep))*d10_sqrt0;
   13067                 :            : #endif
   13068                 :       7356 : t1=d00_sqrt0;
   13069                 :            : }
   13070                 :            : #if defined(_DERIVATE)
   13071                 :       7356 : t2_Vgatep_sourcep=(0.5*(t0_Vgatep_sourcep-t1_Vgatep_sourcep));
   13072                 :       7356 : t2_Vdrainp_sourcep=(0.5*(t0_Vdrainp_sourcep-t1_Vdrainp_sourcep));
   13073                 :       7356 : t2_Vdrainb_sourcep=(0.5*(t0_Vdrainb_sourcep-t1_Vdrainb_sourcep));
   13074                 :       7356 : t2_Vbulkp_sourcep=(0.5*(t0_Vbulkp_sourcep-t1_Vbulkp_sourcep));
   13075                 :       7356 : t2_Vsourceb_sourcep=(0.5*(t0_Vsourceb_sourcep-t1_Vsourceb_sourcep));
   13076                 :            : #endif
   13077                 :       7356 : t2=(0.5*(t0-t1));
   13078                 :            : #if defined(_DERIVATE)
   13079                 :       7356 : t3_Vgatep_sourcep=0.0;
   13080                 :       7356 : t3_Vdrainp_sourcep=0.0;
   13081                 :       7356 : t3_Vdrainb_sourcep=0.0;
   13082                 :       7356 : t3_Vbulkp_sourcep=0.0;
   13083                 :       7356 : t3_Vsourceb_sourcep=0.0;
   13084                 :            : #endif
   13085                 :       7356 : t3=(weffcv*cgsl);
   13086                 :            : {
   13087                 :       7356 : double m00_sqrt(d00_sqrt0,(1.0-((4.0*t2)/ckappas)))
   13088                 :            : #if defined(_DERIVATE)
   13089                 :       7356 : double m10_sqrt(d10_sqrt0,d00_sqrt0,(1.0-((4.0*t2)/ckappas)))
   13090                 :            : #endif
   13091                 :            : #if defined(_DERIVATE)
   13092                 :       7356 : t4_Vgatep_sourcep=(-((4.0*t2_Vgatep_sourcep)/ckappas))*d10_sqrt0;
   13093                 :       7356 : t4_Vdrainp_sourcep=(-((4.0*t2_Vdrainp_sourcep)/ckappas))*d10_sqrt0;
   13094                 :       7356 : t4_Vdrainb_sourcep=(-((4.0*t2_Vdrainb_sourcep)/ckappas))*d10_sqrt0;
   13095                 :       7356 : t4_Vbulkp_sourcep=(-((4.0*t2_Vbulkp_sourcep)/ckappas))*d10_sqrt0;
   13096                 :       7356 : t4_Vsourceb_sourcep=(-((4.0*t2_Vsourceb_sourcep)/ckappas))*d10_sqrt0;
   13097                 :            : #endif
   13098                 :       7356 : t4=d00_sqrt0;
   13099                 :            : }
   13100                 :            : #if defined(_DYNAMIC)
   13101                 :       7356 : cgso=((param_cgso+t3)-((t3*(1.0-(1.0/t4)))*(0.5-((0.5*t0)/t1))));
   13102                 :            : #endif
   13103                 :            : #if defined(_DERIVATE)
   13104                 :       7356 : qgso_Vdrainp_sourcep=(t3_Vdrainp_sourcep*vgs-((t3_Vdrainp_sourcep*(t2+((0.5*ckappas)*(t4-1.0))))+(t3*(t2_Vdrainp_sourcep+((0.5*ckappas)*t4_Vdrainp_sourcep)))));
   13105                 :       7356 : qgso_Vdrainb_sourcep=(t3_Vdrainb_sourcep*vgs-((t3_Vdrainb_sourcep*(t2+((0.5*ckappas)*(t4-1.0))))+(t3*(t2_Vdrainb_sourcep+((0.5*ckappas)*t4_Vdrainb_sourcep)))));
   13106                 :       7356 : qgso_Vbulkp_sourcep=(t3_Vbulkp_sourcep*vgs-((t3_Vbulkp_sourcep*(t2+((0.5*ckappas)*(t4-1.0))))+(t3*(t2_Vbulkp_sourcep+((0.5*ckappas)*t4_Vbulkp_sourcep)))));
   13107                 :       7356 : qgso_Vsourceb_sourcep=(t3_Vsourceb_sourcep*vgs-((t3_Vsourceb_sourcep*(t2+((0.5*ckappas)*(t4-1.0))))+(t3*(t2_Vsourceb_sourcep+((0.5*ckappas)*t4_Vsourceb_sourcep)))));
   13108                 :       7356 : qgso_Vgatep_sourcep=(((t3_Vgatep_sourcep*vgs)+((param_cgso+t3)*vgs_Vgatep_sourcep))-((t3_Vgatep_sourcep*(t2+((0.5*ckappas)*(t4-1.0))))+(t3*(t2_Vgatep_sourcep+((0.5*ckappas)*t4_Vgatep_sourcep)))));
   13109                 :            : #endif
   13110                 :       7356 : qgso=(((param_cgso+t3)*vgs)-(t3*(t2+((0.5*ckappas)*(t4-1.0)))));
   13111                 :            : }
   13112         [ -  + ]:       7356 : if
   13113                 :            : (nf!=1.0)
   13114                 :            : {
   13115                 :            : #if defined(_DYNAMIC)
   13116                 :          0 : cgdo=(cgdo*nf);
   13117                 :            : #endif
   13118                 :            : #if defined(_DYNAMIC)
   13119                 :          0 : cgso=(cgso*nf);
   13120                 :            : #endif
   13121                 :            : #if defined(_DERIVATE)
   13122                 :          0 : qgdo_Vdrainb_sourcep=qgdo_Vdrainb_sourcep*nf;
   13123                 :          0 : qgdo_Vbulkp_sourcep=qgdo_Vbulkp_sourcep*nf;
   13124                 :          0 : qgdo_Vsourceb_sourcep=qgdo_Vsourceb_sourcep*nf;
   13125                 :          0 : qgdo_Vgatep_sourcep=qgdo_Vgatep_sourcep*nf;
   13126                 :          0 : qgdo_Vdrainp_sourcep=qgdo_Vdrainp_sourcep*nf;
   13127                 :            : #endif
   13128                 :          0 : qgdo=(qgdo*nf);
   13129                 :            : #if defined(_DERIVATE)
   13130                 :          0 : qgso_Vdrainp_sourcep=qgso_Vdrainp_sourcep*nf;
   13131                 :          0 : qgso_Vdrainb_sourcep=qgso_Vdrainb_sourcep*nf;
   13132                 :          0 : qgso_Vbulkp_sourcep=qgso_Vbulkp_sourcep*nf;
   13133                 :          0 : qgso_Vsourceb_sourcep=qgso_Vsourceb_sourcep*nf;
   13134                 :          0 : qgso_Vgatep_sourcep=qgso_Vgatep_sourcep*nf;
   13135                 :            : #endif
   13136                 :          0 : qgso=(qgso*nf);
   13137                 :            : }
   13138         [ +  - ]:       7356 : if
   13139                 :            : (mode>0)
   13140                 :            : {
   13141                 :            : #if defined(_DERIVATE)
   13142                 :       7356 : qdrn_Vgatem_sourcep=0.0;
   13143                 :       7356 : qdrn_Vgatep_sourcep=(qdrn_Vgatep_sourcep-qgdo_Vgatep_sourcep);
   13144                 :       7356 : qdrn_Vdrainp_sourcep=(qdrn_Vdrainp_sourcep-qgdo_Vdrainp_sourcep);
   13145                 :       7356 : qdrn_Vdrainb_sourcep=(qdrn_Vdrainb_sourcep-qgdo_Vdrainb_sourcep);
   13146                 :       7356 : qdrn_Vbulkp_sourcep=(qdrn_Vbulkp_sourcep-qgdo_Vbulkp_sourcep);
   13147                 :       7356 : qdrn_Vsourceb_sourcep=(qdrn_Vsourceb_sourcep-qgdo_Vsourceb_sourcep);
   13148                 :            : #endif
   13149                 :       7356 : qdrn=(qdrn-qgdo);
   13150         [ -  + ]:       7356 : if
   13151                 :            : (rgatemod==3)
   13152                 :            : {
   13153                 :            : #if defined(_DERIVATE)
   13154                 :          0 : qgmb_Vgatem_sourcep=(cgbo*vgmb_Vgatem_sourcep);
   13155                 :          0 : qgmb_Vbulkp_sourcep=(cgbo*vgmb_Vbulkp_sourcep);
   13156                 :            : #endif
   13157                 :          0 : qgmb=(cgbo*vgmb);
   13158                 :            : #if defined(_DERIVATE)
   13159                 :          0 : qgmid_Vdrainb_sourcep=(qgdo_Vdrainb_sourcep+qgso_Vdrainb_sourcep);
   13160                 :          0 : qgmid_Vbulkp_sourcep=((qgdo_Vbulkp_sourcep+qgso_Vbulkp_sourcep)+qgmb_Vbulkp_sourcep);
   13161                 :          0 : qgmid_Vsourceb_sourcep=(qgdo_Vsourceb_sourcep+qgso_Vsourceb_sourcep);
   13162                 :          0 : qgmid_Vgatep_sourcep=(qgdo_Vgatep_sourcep+qgso_Vgatep_sourcep);
   13163                 :          0 : qgmid_Vdrainp_sourcep=(qgdo_Vdrainp_sourcep+qgso_Vdrainp_sourcep);
   13164                 :          0 : qgmid_Vgatem_sourcep=qgmb_Vgatem_sourcep;
   13165                 :            : #endif
   13166                 :          0 : qgmid=((qgdo+qgso)+qgmb);
   13167                 :            : #if defined(_DERIVATE)
   13168                 :          0 : qbulk_Vgatem_sourcep=(qbulk_Vgatem_sourcep-qgmb_Vgatem_sourcep);
   13169                 :          0 : qbulk_Vgatep_sourcep=qbulk_Vgatep_sourcep;
   13170                 :          0 : qbulk_Vdrainp_sourcep=qbulk_Vdrainp_sourcep;
   13171                 :          0 : qbulk_Vdrainb_sourcep=qbulk_Vdrainb_sourcep;
   13172                 :          0 : qbulk_Vbulkp_sourcep=(qbulk_Vbulkp_sourcep-qgmb_Vbulkp_sourcep);
   13173                 :          0 : qbulk_Vsourceb_sourcep=qbulk_Vsourceb_sourcep;
   13174                 :            : #endif
   13175                 :          0 : qbulk=(qbulk-qgmb);
   13176                 :            : #if defined(_DERIVATE)
   13177                 :          0 : qsrc_Vgatem_sourcep=(-((qgmid_Vgatem_sourcep+qbulk_Vgatem_sourcep)+qdrn_Vgatem_sourcep));
   13178                 :          0 : qsrc_Vgatep_sourcep=(-(((qgate_Vgatep_sourcep+qgmid_Vgatep_sourcep)+qbulk_Vgatep_sourcep)+qdrn_Vgatep_sourcep));
   13179                 :          0 : qsrc_Vdrainp_sourcep=(-(((qgate_Vdrainp_sourcep+qgmid_Vdrainp_sourcep)+qbulk_Vdrainp_sourcep)+qdrn_Vdrainp_sourcep));
   13180                 :          0 : qsrc_Vdrainb_sourcep=(-(((qgate_Vdrainb_sourcep+qgmid_Vdrainb_sourcep)+qbulk_Vdrainb_sourcep)+qdrn_Vdrainb_sourcep));
   13181                 :          0 : qsrc_Vbulkp_sourcep=(-(((qgate_Vbulkp_sourcep+qgmid_Vbulkp_sourcep)+qbulk_Vbulkp_sourcep)+qdrn_Vbulkp_sourcep));
   13182                 :          0 : qsrc_Vsourceb_sourcep=(-(((qgate_Vsourceb_sourcep+qgmid_Vsourceb_sourcep)+qbulk_Vsourceb_sourcep)+qdrn_Vsourceb_sourcep));
   13183                 :            : #endif
   13184                 :          0 : qsrc=(-(((qgate+qgmid)+qbulk)+qdrn));
   13185                 :            : }
   13186                 :            : else
   13187                 :            : {
   13188                 :            : #if defined(_DERIVATE)
   13189                 :       7356 : qgb_Vgatep_sourcep=(cgbo*vgb_Vgatep_sourcep);
   13190                 :       7356 : qgb_Vbulkp_sourcep=(cgbo*vgb_Vbulkp_sourcep);
   13191                 :            : #endif
   13192                 :       7356 : qgb=(cgbo*vgb);
   13193                 :            : #if defined(_DERIVATE)
   13194                 :       7356 : qgate_Vgatep_sourcep=(((qgate_Vgatep_sourcep+qgdo_Vgatep_sourcep)+qgso_Vgatep_sourcep)+qgb_Vgatep_sourcep);
   13195                 :       7356 : qgate_Vdrainp_sourcep=((qgate_Vdrainp_sourcep+qgdo_Vdrainp_sourcep)+qgso_Vdrainp_sourcep);
   13196                 :       7356 : qgate_Vdrainb_sourcep=((qgate_Vdrainb_sourcep+qgdo_Vdrainb_sourcep)+qgso_Vdrainb_sourcep);
   13197                 :       7356 : qgate_Vbulkp_sourcep=(((qgate_Vbulkp_sourcep+qgdo_Vbulkp_sourcep)+qgso_Vbulkp_sourcep)+qgb_Vbulkp_sourcep);
   13198                 :       7356 : qgate_Vsourceb_sourcep=((qgate_Vsourceb_sourcep+qgdo_Vsourceb_sourcep)+qgso_Vsourceb_sourcep);
   13199                 :            : #endif
   13200                 :       7356 : qgate=(((qgate+qgdo)+qgso)+qgb);
   13201                 :            : #if defined(_DERIVATE)
   13202                 :       7356 : qbulk_Vgatem_sourcep=qbulk_Vgatem_sourcep;
   13203                 :       7356 : qbulk_Vgatep_sourcep=(qbulk_Vgatep_sourcep-qgb_Vgatep_sourcep);
   13204                 :       7356 : qbulk_Vdrainp_sourcep=qbulk_Vdrainp_sourcep;
   13205                 :       7356 : qbulk_Vdrainb_sourcep=qbulk_Vdrainb_sourcep;
   13206                 :       7356 : qbulk_Vbulkp_sourcep=(qbulk_Vbulkp_sourcep-qgb_Vbulkp_sourcep);
   13207                 :       7356 : qbulk_Vsourceb_sourcep=qbulk_Vsourceb_sourcep;
   13208                 :            : #endif
   13209                 :       7356 : qbulk=(qbulk-qgb);
   13210                 :            : #if defined(_DERIVATE)
   13211                 :       7356 : qsrc_Vgatem_sourcep=(-(qbulk_Vgatem_sourcep+qdrn_Vgatem_sourcep));
   13212                 :       7356 : qsrc_Vgatep_sourcep=(-((qgate_Vgatep_sourcep+qbulk_Vgatep_sourcep)+qdrn_Vgatep_sourcep));
   13213                 :       7356 : qsrc_Vdrainp_sourcep=(-((qgate_Vdrainp_sourcep+qbulk_Vdrainp_sourcep)+qdrn_Vdrainp_sourcep));
   13214                 :       7356 : qsrc_Vdrainb_sourcep=(-((qgate_Vdrainb_sourcep+qbulk_Vdrainb_sourcep)+qdrn_Vdrainb_sourcep));
   13215                 :       7356 : qsrc_Vbulkp_sourcep=(-((qgate_Vbulkp_sourcep+qbulk_Vbulkp_sourcep)+qdrn_Vbulkp_sourcep));
   13216                 :       7356 : qsrc_Vsourceb_sourcep=(-((qgate_Vsourceb_sourcep+qbulk_Vsourceb_sourcep)+qdrn_Vsourceb_sourcep));
   13217                 :            : #endif
   13218                 :       7356 : qsrc=(-((qgate+qbulk)+qdrn));
   13219                 :            : }
   13220                 :            : }
   13221                 :            : else
   13222                 :            : {
   13223                 :            : #if defined(_DERIVATE)
   13224                 :          0 : qsrc_Vgatem_sourcep=0.0;
   13225                 :          0 : qsrc_Vgatep_sourcep=(qdrn_Vgatep_sourcep-qgso_Vgatep_sourcep);
   13226                 :          0 : qsrc_Vdrainp_sourcep=(qdrn_Vdrainp_sourcep-qgso_Vdrainp_sourcep);
   13227                 :          0 : qsrc_Vdrainb_sourcep=(qdrn_Vdrainb_sourcep-qgso_Vdrainb_sourcep);
   13228                 :          0 : qsrc_Vbulkp_sourcep=(qdrn_Vbulkp_sourcep-qgso_Vbulkp_sourcep);
   13229                 :          0 : qsrc_Vsourceb_sourcep=(qdrn_Vsourceb_sourcep-qgso_Vsourceb_sourcep);
   13230                 :            : #endif
   13231                 :          0 : qsrc=(qdrn-qgso);
   13232         [ #  # ]:          0 : if
   13233                 :            : (rgatemod==3)
   13234                 :            : {
   13235                 :            : #if defined(_DERIVATE)
   13236                 :          0 : qgmb_Vgatem_sourcep=(cgbo*vgmb_Vgatem_sourcep);
   13237                 :          0 : qgmb_Vbulkp_sourcep=(cgbo*vgmb_Vbulkp_sourcep);
   13238                 :            : #endif
   13239                 :          0 : qgmb=(cgbo*vgmb);
   13240                 :            : #if defined(_DERIVATE)
   13241                 :          0 : qgmid_Vdrainb_sourcep=(qgdo_Vdrainb_sourcep+qgso_Vdrainb_sourcep);
   13242                 :          0 : qgmid_Vbulkp_sourcep=((qgdo_Vbulkp_sourcep+qgso_Vbulkp_sourcep)+qgmb_Vbulkp_sourcep);
   13243                 :          0 : qgmid_Vsourceb_sourcep=(qgdo_Vsourceb_sourcep+qgso_Vsourceb_sourcep);
   13244                 :          0 : qgmid_Vgatep_sourcep=(qgdo_Vgatep_sourcep+qgso_Vgatep_sourcep);
   13245                 :          0 : qgmid_Vdrainp_sourcep=(qgdo_Vdrainp_sourcep+qgso_Vdrainp_sourcep);
   13246                 :          0 : qgmid_Vgatem_sourcep=qgmb_Vgatem_sourcep;
   13247                 :            : #endif
   13248                 :          0 : qgmid=((qgdo+qgso)+qgmb);
   13249                 :            : #if defined(_DERIVATE)
   13250                 :          0 : qbulk_Vgatem_sourcep=(qbulk_Vgatem_sourcep-qgmb_Vgatem_sourcep);
   13251                 :          0 : qbulk_Vgatep_sourcep=qbulk_Vgatep_sourcep;
   13252                 :          0 : qbulk_Vdrainp_sourcep=qbulk_Vdrainp_sourcep;
   13253                 :          0 : qbulk_Vdrainb_sourcep=qbulk_Vdrainb_sourcep;
   13254                 :          0 : qbulk_Vbulkp_sourcep=(qbulk_Vbulkp_sourcep-qgmb_Vbulkp_sourcep);
   13255                 :          0 : qbulk_Vsourceb_sourcep=qbulk_Vsourceb_sourcep;
   13256                 :            : #endif
   13257                 :          0 : qbulk=(qbulk-qgmb);
   13258                 :            : #if defined(_DERIVATE)
   13259                 :          0 : qdrn_Vgatem_sourcep=(-((qgmid_Vgatem_sourcep+qbulk_Vgatem_sourcep)+qsrc_Vgatem_sourcep));
   13260                 :          0 : qdrn_Vgatep_sourcep=(-(((qgate_Vgatep_sourcep+qgmid_Vgatep_sourcep)+qbulk_Vgatep_sourcep)+qsrc_Vgatep_sourcep));
   13261                 :          0 : qdrn_Vdrainp_sourcep=(-(((qgate_Vdrainp_sourcep+qgmid_Vdrainp_sourcep)+qbulk_Vdrainp_sourcep)+qsrc_Vdrainp_sourcep));
   13262                 :          0 : qdrn_Vdrainb_sourcep=(-(((qgate_Vdrainb_sourcep+qgmid_Vdrainb_sourcep)+qbulk_Vdrainb_sourcep)+qsrc_Vdrainb_sourcep));
   13263                 :          0 : qdrn_Vbulkp_sourcep=(-(((qgate_Vbulkp_sourcep+qgmid_Vbulkp_sourcep)+qbulk_Vbulkp_sourcep)+qsrc_Vbulkp_sourcep));
   13264                 :          0 : qdrn_Vsourceb_sourcep=(-(((qgate_Vsourceb_sourcep+qgmid_Vsourceb_sourcep)+qbulk_Vsourceb_sourcep)+qsrc_Vsourceb_sourcep));
   13265                 :            : #endif
   13266                 :          0 : qdrn=(-(((qgate+qgmid)+qbulk)+qsrc));
   13267                 :            : }
   13268                 :            : else
   13269                 :            : {
   13270                 :            : #if defined(_DERIVATE)
   13271                 :          0 : qgb_Vgatep_sourcep=(cgbo*vgb_Vgatep_sourcep);
   13272                 :          0 : qgb_Vbulkp_sourcep=(cgbo*vgb_Vbulkp_sourcep);
   13273                 :            : #endif
   13274                 :          0 : qgb=(cgbo*vgb);
   13275                 :            : #if defined(_DERIVATE)
   13276                 :          0 : qgate_Vgatep_sourcep=(((qgate_Vgatep_sourcep+qgdo_Vgatep_sourcep)+qgso_Vgatep_sourcep)+qgb_Vgatep_sourcep);
   13277                 :          0 : qgate_Vdrainp_sourcep=((qgate_Vdrainp_sourcep+qgdo_Vdrainp_sourcep)+qgso_Vdrainp_sourcep);
   13278                 :          0 : qgate_Vdrainb_sourcep=((qgate_Vdrainb_sourcep+qgdo_Vdrainb_sourcep)+qgso_Vdrainb_sourcep);
   13279                 :          0 : qgate_Vbulkp_sourcep=(((qgate_Vbulkp_sourcep+qgdo_Vbulkp_sourcep)+qgso_Vbulkp_sourcep)+qgb_Vbulkp_sourcep);
   13280                 :          0 : qgate_Vsourceb_sourcep=((qgate_Vsourceb_sourcep+qgdo_Vsourceb_sourcep)+qgso_Vsourceb_sourcep);
   13281                 :            : #endif
   13282                 :          0 : qgate=(((qgate+qgdo)+qgso)+qgb);
   13283                 :            : #if defined(_DERIVATE)
   13284                 :          0 : qbulk_Vgatem_sourcep=qbulk_Vgatem_sourcep;
   13285                 :          0 : qbulk_Vgatep_sourcep=(qbulk_Vgatep_sourcep-qgb_Vgatep_sourcep);
   13286                 :          0 : qbulk_Vdrainp_sourcep=qbulk_Vdrainp_sourcep;
   13287                 :          0 : qbulk_Vdrainb_sourcep=qbulk_Vdrainb_sourcep;
   13288                 :          0 : qbulk_Vbulkp_sourcep=(qbulk_Vbulkp_sourcep-qgb_Vbulkp_sourcep);
   13289                 :          0 : qbulk_Vsourceb_sourcep=qbulk_Vsourceb_sourcep;
   13290                 :            : #endif
   13291                 :          0 : qbulk=(qbulk-qgb);
   13292                 :            : #if defined(_DERIVATE)
   13293                 :          0 : qdrn_Vgatem_sourcep=(-(qbulk_Vgatem_sourcep+qsrc_Vgatem_sourcep));
   13294                 :          0 : qdrn_Vgatep_sourcep=(-((qgate_Vgatep_sourcep+qbulk_Vgatep_sourcep)+qsrc_Vgatep_sourcep));
   13295                 :          0 : qdrn_Vdrainp_sourcep=(-((qgate_Vdrainp_sourcep+qbulk_Vdrainp_sourcep)+qsrc_Vdrainp_sourcep));
   13296                 :          0 : qdrn_Vdrainb_sourcep=(-((qgate_Vdrainb_sourcep+qbulk_Vdrainb_sourcep)+qsrc_Vdrainb_sourcep));
   13297                 :          0 : qdrn_Vbulkp_sourcep=(-((qgate_Vbulkp_sourcep+qbulk_Vbulkp_sourcep)+qsrc_Vbulkp_sourcep));
   13298                 :          0 : qdrn_Vsourceb_sourcep=(-((qgate_Vsourceb_sourcep+qbulk_Vsourceb_sourcep)+qsrc_Vsourceb_sourcep));
   13299                 :            : #endif
   13300                 :          0 : qdrn=(-((qgate+qbulk)+qsrc));
   13301                 :            : }
   13302                 :            : }
   13303                 :            : #if defined(_DERIVATE)
   13304                 :       7356 : qd_Vgatem_sourcep=qdrn_Vgatem_sourcep;
   13305                 :       7356 : qd_Vgatep_sourcep=(qdrn_Vgatep_sourcep-qbd_Vgatep_sourcep);
   13306                 :       7356 : qd_Vdrainp_sourcep=(qdrn_Vdrainp_sourcep-qbd_Vdrainp_sourcep);
   13307                 :       7356 : qd_Vdrainb_sourcep=(qdrn_Vdrainb_sourcep-qbd_Vdrainb_sourcep);
   13308                 :       7356 : qd_Vbulkp_sourcep=(qdrn_Vbulkp_sourcep-qbd_Vbulkp_sourcep);
   13309                 :       7356 : qd_Vsourceb_sourcep=(qdrn_Vsourceb_sourcep-qbd_Vsourceb_sourcep);
   13310                 :            : #endif
   13311                 :       7356 : qd=(qdrn-qbd);
   13312                 :            : #if defined(_DERIVATE)
   13313                 :       7356 : qs_Vgatem_sourcep=qsrc_Vgatem_sourcep;
   13314                 :       7356 : qs_Vgatep_sourcep=(qsrc_Vgatep_sourcep-qbs_Vgatep_sourcep);
   13315                 :       7356 : qs_Vdrainp_sourcep=(qsrc_Vdrainp_sourcep-qbs_Vdrainp_sourcep);
   13316                 :       7356 : qs_Vdrainb_sourcep=(qsrc_Vdrainb_sourcep-qbs_Vdrainb_sourcep);
   13317                 :       7356 : qs_Vbulkp_sourcep=(qsrc_Vbulkp_sourcep-qbs_Vbulkp_sourcep);
   13318                 :       7356 : qs_Vsourceb_sourcep=(qsrc_Vsourceb_sourcep-qbs_Vsourceb_sourcep);
   13319                 :            : #endif
   13320                 :       7356 : qs=(qsrc-qbs);
   13321                 :            : #ifdef _DYNAMIC
   13322         [ +  - ]:       7356 : if
   13323                 :            : (rbodymod==0)
   13324                 :            : {
   13325                 :            : #if defined(_DYNAMIC)
   13326                 :            : #if defined(_DERIVATE)
   13327                 :       7356 : qb_Vgatem_sourcep=qbulk_Vgatem_sourcep;
   13328                 :       7356 : qb_Vgatep_sourcep=((qbulk_Vgatep_sourcep+qbd_Vgatep_sourcep)+qbs_Vgatep_sourcep);
   13329                 :       7356 : qb_Vdrainp_sourcep=((qbulk_Vdrainp_sourcep+qbd_Vdrainp_sourcep)+qbs_Vdrainp_sourcep);
   13330                 :       7356 : qb_Vdrainb_sourcep=((qbulk_Vdrainb_sourcep+qbd_Vdrainb_sourcep)+qbs_Vdrainb_sourcep);
   13331                 :       7356 : qb_Vbulkp_sourcep=((qbulk_Vbulkp_sourcep+qbd_Vbulkp_sourcep)+qbs_Vbulkp_sourcep);
   13332                 :       7356 : qb_Vsourceb_sourcep=((qbulk_Vsourceb_sourcep+qbd_Vsourceb_sourcep)+qbs_Vsourceb_sourcep);
   13333                 :            : #endif
   13334                 :       7356 : qb=((qbulk+qbd)+qbs);
   13335                 :            : #endif
   13336                 :            : }
   13337                 :            : else
   13338                 :            : {
   13339                 :            : #if defined(_DYNAMIC)
   13340                 :            : #if defined(_DERIVATE)
   13341                 :          0 : qb_Vgatem_sourcep=qbulk_Vgatem_sourcep;
   13342                 :          0 : qb_Vgatep_sourcep=qbulk_Vgatep_sourcep;
   13343                 :          0 : qb_Vdrainp_sourcep=qbulk_Vdrainp_sourcep;
   13344                 :          0 : qb_Vdrainb_sourcep=qbulk_Vdrainb_sourcep;
   13345                 :          0 : qb_Vbulkp_sourcep=qbulk_Vbulkp_sourcep;
   13346                 :          0 : qb_Vsourceb_sourcep=qbulk_Vsourceb_sourcep;
   13347                 :            : #endif
   13348                 :          0 : qb=qbulk;
   13349                 :            : #endif
   13350                 :            : }
   13351                 :            : #endif /* if (...) */
   13352                 :            : }
   13353                 :       7356 : _load_static_residual2(sourceb,sourcep,(type*cbs));
   13354                 :            : #if defined(_DERIVATE)
   13355 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(sourceb,sourcep,sourceb,sourcep,(type*cbs_Vsourceb_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13356 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(sourceb,sourcep,bulkp,sourcep,(type*cbs_Vbulkp_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13357                 :            : #endif
   13358                 :       7356 : _load_static_residual2(drainb,drainp,(type*cbd));
   13359                 :            : #if defined(_DERIVATE)
   13360 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainb,drainp,drainb,sourcep,(type*cbd_Vdrainb_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13361 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainb,drainp,drainp,sourcep,(type*cbd_Vdrainp_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13362 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainb,drainp,bulkp,sourcep,(type*cbd_Vbulkp_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13363 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainb,drainp,sourceb,sourcep,(type*cbd_Vsourceb_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13364                 :            : #endif
   13365         [ -  + ]:       7356 : if
   13366                 :            : (igbmod==1)
   13367                 :            : {
   13368                 :          0 : _load_static_residual2(bulk,gatep,((-type)*igb));
   13369                 :            : #if defined(_DERIVATE)
   13370 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,gatep,sourceb,sourcep,((-type)*igb_Vsourceb_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13371 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,gatep,bulkp,sourcep,((-type)*igb_Vbulkp_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13372 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,gatep,drainb,sourcep,((-type)*igb_Vdrainb_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13373 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,gatep,drainp,sourcep,((-type)*igb_Vdrainp_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13374 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,gatep,gatep,sourcep,((-type)*igb_Vgatep_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13375                 :            : #endif
   13376                 :            : }
   13377         [ -  + ]:       7356 : if
   13378                 :            : (igcmod==1)
   13379                 :            : {
   13380                 :          0 : _load_static_residual2(source,gatep,((-type)*(igs+igcs)));
   13381                 :            : #if defined(_DERIVATE)
   13382 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,gatep,sourceb,sourcep,((-type)*(igs_Vsourceb_sourcep+igcs_Vsourceb_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13383 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,gatep,bulkp,sourcep,((-type)*(igs_Vbulkp_sourcep+igcs_Vbulkp_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13384 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,gatep,drainb,sourcep,((-type)*(igs_Vdrainb_sourcep+igcs_Vdrainb_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13385 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,gatep,drainp,sourcep,((-type)*(igs_Vdrainp_sourcep+igcs_Vdrainp_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13386 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,gatep,gatep,sourcep,((-type)*(igs_Vgatep_sourcep+igcs_Vgatep_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13387                 :            : #endif
   13388                 :          0 : _load_static_residual2(drain,gatep,((-type)*(igd+igcd)));
   13389                 :            : #if defined(_DERIVATE)
   13390 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,gatep,sourceb,sourcep,((-type)*(igd_Vsourceb_sourcep+igcd_Vsourceb_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13391 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,gatep,bulkp,sourcep,((-type)*(igd_Vbulkp_sourcep+igcd_Vbulkp_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13392 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,gatep,drainb,sourcep,((-type)*(igd_Vdrainb_sourcep+igcd_Vdrainb_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13393 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,gatep,drainp,sourcep,((-type)*(igd_Vdrainp_sourcep+igcd_Vdrainp_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13394 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,gatep,gatep,sourcep,((-type)*(igd_Vgatep_sourcep+igcd_Vgatep_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13395                 :            : #endif
   13396                 :            : }
   13397         [ +  - ]:       7356 : if
   13398                 :            : (mode==1)
   13399                 :            : {
   13400                 :       7356 : _load_static_residual2(drainp,sourcep,(type*cdrain));
   13401                 :            : #if defined(_DERIVATE)
   13402 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,sourcep,sourceb,sourcep,(type*cdrain_Vsourceb_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13403 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,sourcep,bulkp,sourcep,(type*cdrain_Vbulkp_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13404 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,sourcep,drainb,sourcep,(type*cdrain_Vdrainb_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13405 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,sourcep,drainp,sourcep,(type*cdrain_Vdrainp_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13406 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,sourcep,gatep,sourcep,(type*cdrain_Vgatep_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13407                 :            : #endif
   13408                 :       7356 : _load_static_residual2(drainp,bulkp,(type*(csub+igidl)));
   13409                 :            : #if defined(_DERIVATE)
   13410 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,bulkp,sourceb,sourcep,(type*(csub_Vsourceb_sourcep+igidl_Vsourceb_sourcep)));
         [ #  # ][ +  - ]
                 [ +  - ]
   13411 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,bulkp,bulkp,sourcep,(type*(csub_Vbulkp_sourcep+igidl_Vbulkp_sourcep)));
         [ #  # ][ +  - ]
                 [ +  - ]
   13412 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,bulkp,drainb,sourcep,(type*(csub_Vdrainb_sourcep+igidl_Vdrainb_sourcep)));
         [ #  # ][ +  - ]
                 [ +  - ]
   13413 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,bulkp,drainp,sourcep,(type*(csub_Vdrainp_sourcep+igidl_Vdrainp_sourcep)));
         [ #  # ][ +  - ]
                 [ +  - ]
   13414 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,bulkp,gatep,sourcep,(type*(csub_Vgatep_sourcep+igidl_Vgatep_sourcep)));
         [ #  # ][ +  - ]
                 [ +  - ]
   13415                 :            : #endif
   13416                 :       7356 : _load_static_residual2(sourcep,bulkp,(type*igisl));
   13417                 :            : #if defined(_DERIVATE)
   13418 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(sourcep,bulkp,sourceb,sourcep,(type*igisl_Vsourceb_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13419 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(sourcep,bulkp,bulkp,sourcep,(type*igisl_Vbulkp_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13420 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(sourcep,bulkp,drainb,sourcep,(type*igisl_Vdrainb_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13421 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(sourcep,bulkp,drainp,sourcep,(type*igisl_Vdrainp_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13422 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(sourcep,bulkp,gatep,sourcep,(type*igisl_Vgatep_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13423                 :            : #endif
   13424                 :            : }
   13425                 :            : else
   13426                 :            : {
   13427                 :          0 : _load_static_residual2(drainp,sourcep,((-type)*cdrain));
   13428                 :            : #if defined(_DERIVATE)
   13429 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainp,sourcep,sourceb,sourcep,((-type)*cdrain_Vsourceb_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13430 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainp,sourcep,bulkp,sourcep,((-type)*cdrain_Vbulkp_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13431 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainp,sourcep,drainb,sourcep,((-type)*cdrain_Vdrainb_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13432 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainp,sourcep,drainp,sourcep,((-type)*cdrain_Vdrainp_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13433 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainp,sourcep,gatep,sourcep,((-type)*cdrain_Vgatep_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13434                 :            : #endif
   13435                 :          0 : _load_static_residual2(drainp,bulkp,(type*(csub+igisl)));
   13436                 :            : #if defined(_DERIVATE)
   13437 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainp,bulkp,sourceb,sourcep,(type*(csub_Vsourceb_sourcep+igisl_Vsourceb_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13438 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainp,bulkp,bulkp,sourcep,(type*(csub_Vbulkp_sourcep+igisl_Vbulkp_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13439 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainp,bulkp,drainb,sourcep,(type*(csub_Vdrainb_sourcep+igisl_Vdrainb_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13440 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainp,bulkp,drainp,sourcep,(type*(csub_Vdrainp_sourcep+igisl_Vdrainp_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13441 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainp,bulkp,gatep,sourcep,(type*(csub_Vgatep_sourcep+igisl_Vgatep_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13442                 :            : #endif
   13443                 :          0 : _load_static_residual2(sourcep,bulkp,(type*igidl));
   13444                 :            : #if defined(_DERIVATE)
   13445 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(sourcep,bulkp,sourceb,sourcep,(type*igidl_Vsourceb_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13446 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(sourcep,bulkp,bulkp,sourcep,(type*igidl_Vbulkp_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13447 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(sourcep,bulkp,drainb,sourcep,(type*igidl_Vdrainb_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13448 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(sourcep,bulkp,drainp,sourcep,(type*igidl_Vdrainp_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13449 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(sourcep,bulkp,gatep,sourcep,(type*igidl_Vgatep_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13450                 :            : #endif
   13451                 :            : }
   13452         [ +  - ]:       7356 : if
   13453                 :            : (rdsmod==0)
   13454                 :            : {
   13455 [ +  - ][ +  - ]:       7356 : _load_static_residual2(source,sourcep,(BP(source,sourcep)*1e3));
   13456                 :            : #if defined(_DERIVATE)
   13457 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(source,sourcep,source,sourcep,(1e3));
         [ #  # ][ +  - ]
                 [ +  - ]
   13458                 :            : #endif
   13459 [ +  - ][ +  - ]:       7356 : _load_static_residual2(drainp,drain,(BP(drainp,drain)*1e3));
   13460                 :            : #if defined(_DERIVATE)
   13461 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(drainp,drain,drainp,drain,(1e3));
         [ #  # ][ +  - ]
                 [ +  - ]
   13462                 :            : #endif
   13463                 :            : }
   13464                 :            : else
   13465                 :            : {
   13466                 :          0 : _load_static_residual2(drain,drainp,((type*gdtot)*vded));
   13467                 :            : #if defined(_DERIVATE)
   13468 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,drainp,drain,sourcep,((type*gdtot)*vded_Vdrain_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13469 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,drainp,sourceb,sourcep,(type*gdtot_Vsourceb_sourcep)*vded);
         [ #  # ][ #  # ]
                 [ #  # ]
   13470 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,drainp,bulkp,sourcep,(type*gdtot_Vbulkp_sourcep)*vded);
         [ #  # ][ #  # ]
                 [ #  # ]
   13471 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,drainp,drainb,sourcep,(type*gdtot_Vdrainb_sourcep)*vded);
         [ #  # ][ #  # ]
                 [ #  # ]
   13472 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,drainp,drainp,sourcep,(((type*gdtot_Vdrainp_sourcep)*vded)+((type*gdtot)*vded_Vdrainp_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13473 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drain,drainp,gatep,sourcep,(type*gdtot_Vgatep_sourcep)*vded);
         [ #  # ][ #  # ]
                 [ #  # ]
   13474                 :            : #endif
   13475                 :          0 : _load_static_residual2(source,sourcep,((type*gstot)*vses));
   13476                 :            : #if defined(_DERIVATE)
   13477 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,sourcep,source,sourcep,((type*gstot)*vses_Vsource_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13478 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,sourcep,sourceb,sourcep,(type*gstot_Vsourceb_sourcep)*vses);
         [ #  # ][ #  # ]
                 [ #  # ]
   13479 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,sourcep,bulkp,sourcep,(type*gstot_Vbulkp_sourcep)*vses);
         [ #  # ][ #  # ]
                 [ #  # ]
   13480 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,sourcep,drainb,sourcep,(type*gstot_Vdrainb_sourcep)*vses);
         [ #  # ][ #  # ]
                 [ #  # ]
   13481 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,sourcep,drainp,sourcep,(type*gstot_Vdrainp_sourcep)*vses);
         [ #  # ][ #  # ]
                 [ #  # ]
   13482 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(source,sourcep,gatep,sourcep,(type*gstot_Vgatep_sourcep)*vses);
         [ #  # ][ #  # ]
                 [ #  # ]
   13483                 :            : #endif
   13484                 :            : }
   13485         [ -  + ]:       7356 : if
   13486                 :            : (rgatemod==0)
   13487                 :            : {
   13488 [ #  # ][ #  # ]:          0 : _load_static_residual2(gate,gatem,(BP(gate,gatem)*1e3));
   13489                 :            : #if defined(_DERIVATE)
   13490 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gate,gatem,gate,gatem,(1e3));
         [ #  # ][ #  # ]
                 [ #  # ]
   13491                 :            : #endif
   13492 [ #  # ][ #  # ]:          0 : _load_static_residual2(gatem,gatep,(BP(gatem,gatep)*1e3));
   13493                 :            : #if defined(_DERIVATE)
   13494 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gatem,gatep,gatem,gatep,(1e3));
         [ #  # ][ #  # ]
                 [ #  # ]
   13495                 :            : #endif
   13496                 :            : }
   13497                 :            : else
   13498                 :            : {
   13499         [ -  + ]:       7356 : if
   13500                 :            : (rgatemod==1)
   13501                 :            : {
   13502 [ #  # ][ #  # ]:          0 : _load_static_residual2(gatep,gatem,(BP(gatep,gatem)*1e3));
   13503                 :            : #if defined(_DERIVATE)
   13504 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gatep,gatem,gatep,gatem,(1e3));
         [ #  # ][ #  # ]
                 [ #  # ]
   13505                 :            : #endif
   13506                 :          0 : _load_static_residual2(gate,gatem,((type*grgeltd)*vgeg));
   13507                 :            : #if defined(_DERIVATE)
   13508 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gate,gatem,gatep,sourcep,((type*grgeltd)*vgeg_Vgatep_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13509 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gate,gatem,gate,sourcep,((type*grgeltd)*vgeg_Vgate_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13510                 :            : #endif
   13511                 :            : }
   13512                 :            : else
   13513                 :            : {
   13514         [ +  - ]:       7356 : if
   13515                 :            : (rgatemod==2)
   13516                 :            : {
   13517 [ +  - ][ +  - ]:       7356 : _load_static_residual2(gatep,gatem,(BP(gatep,gatem)*1e3));
   13518                 :            : #if defined(_DERIVATE)
   13519 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(gatep,gatem,gatep,gatem,(1e3));
         [ #  # ][ +  - ]
                 [ +  - ]
   13520                 :            : #endif
   13521                 :       7356 : _load_static_residual2(gate,gatem,((type*gcrg)*vgeg));
   13522                 :            : #if defined(_DERIVATE)
   13523 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(gate,gatem,gate,sourcep,((type*gcrg)*vgeg_Vgate_sourcep));
         [ #  # ][ +  - ]
                 [ +  - ]
   13524 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(gate,gatem,sourceb,sourcep,(type*gcrg_Vsourceb_sourcep)*vgeg);
         [ #  # ][ +  - ]
                 [ +  - ]
   13525 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(gate,gatem,bulkp,sourcep,(type*gcrg_Vbulkp_sourcep)*vgeg);
         [ #  # ][ +  - ]
                 [ +  - ]
   13526 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(gate,gatem,drainb,sourcep,(type*gcrg_Vdrainb_sourcep)*vgeg);
         [ #  # ][ +  - ]
                 [ +  - ]
   13527 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(gate,gatem,drainp,sourcep,(type*gcrg_Vdrainp_sourcep)*vgeg);
         [ #  # ][ +  - ]
                 [ +  - ]
   13528 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(gate,gatem,gatep,sourcep,(((type*gcrg_Vgatep_sourcep)*vgeg)+((type*gcrg)*vgeg_Vgatep_sourcep)));
         [ #  # ][ +  - ]
                 [ +  - ]
   13529                 :            : #endif
   13530                 :            : }
   13531                 :            : else
   13532                 :            : {
   13533                 :          0 : _load_static_residual2(gatem,gatep,((type*gcrg)*vgmg));
   13534                 :            : #if defined(_DERIVATE)
   13535 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gatem,gatep,gatem,sourcep,((type*gcrg)*vgmg_Vgatem_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13536 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gatem,gatep,sourceb,sourcep,(type*gcrg_Vsourceb_sourcep)*vgmg);
         [ #  # ][ #  # ]
                 [ #  # ]
   13537 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gatem,gatep,bulkp,sourcep,(type*gcrg_Vbulkp_sourcep)*vgmg);
         [ #  # ][ #  # ]
                 [ #  # ]
   13538 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gatem,gatep,drainb,sourcep,(type*gcrg_Vdrainb_sourcep)*vgmg);
         [ #  # ][ #  # ]
                 [ #  # ]
   13539 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gatem,gatep,drainp,sourcep,(type*gcrg_Vdrainp_sourcep)*vgmg);
         [ #  # ][ #  # ]
                 [ #  # ]
   13540 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gatem,gatep,gatep,sourcep,(((type*gcrg_Vgatep_sourcep)*vgmg)+((type*gcrg)*vgmg_Vgatep_sourcep)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13541                 :            : #endif
   13542                 :          0 : _load_static_residual2(gate,gatem,((type*grgeltd)*vgegm));
   13543                 :            : #if defined(_DERIVATE)
   13544 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gate,gatem,gatem,sourcep,((type*grgeltd)*vgegm_Vgatem_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13545 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gate,gatem,gatep,sourcep,((type*grgeltd)*vgegm_Vgatep_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13546 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(gate,gatem,gate,sourcep,((type*grgeltd)*vgegm_Vgate_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13547                 :            : #endif
   13548                 :            : }
   13549                 :            : }
   13550                 :            : }
   13551         [ +  - ]:       7356 : if
   13552                 :            : (rbodymod==0)
   13553                 :            : {
   13554 [ +  - ][ +  - ]:       7356 : _load_static_residual2(bulk,bulkp,(BP(bulk,bulkp)*1e3));
   13555                 :            : #if defined(_DERIVATE)
   13556 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(bulk,bulkp,bulk,bulkp,(1e3));
         [ #  # ][ +  - ]
                 [ +  - ]
   13557                 :            : #endif
   13558 [ +  - ][ +  - ]:       7356 : _load_static_residual2(bulkp,sourceb,(BP(bulkp,sourceb)*1e3));
   13559                 :            : #if defined(_DERIVATE)
   13560 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(bulkp,sourceb,bulkp,sourceb,(1e3));
         [ #  # ][ +  - ]
                 [ +  - ]
   13561                 :            : #endif
   13562 [ +  - ][ +  - ]:       7356 : _load_static_residual2(bulkp,drainb,(BP(bulkp,drainb)*1e3));
   13563                 :            : #if defined(_DERIVATE)
   13564 [ -  + ][ #  # ]:       7356 : _load_static_jacobian4(bulkp,drainb,bulkp,drainb,(1e3));
         [ #  # ][ +  - ]
                 [ +  - ]
   13565                 :            : #endif
   13566                 :            : }
   13567                 :            : else
   13568                 :            : {
   13569                 :          0 : _load_static_residual2(sourceb,bulkp,(((-type)*grbps)*vbsb));
   13570                 :            : #if defined(_DERIVATE)
   13571 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(sourceb,bulkp,sourceb,sourcep,(((-type)*grbps)*vbsb_Vsourceb_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13572 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(sourceb,bulkp,bulkp,sourcep,(((-type)*grbps)*vbsb_Vbulkp_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13573                 :            : #endif
   13574                 :          0 : _load_static_residual2(drainb,bulkp,(((-type)*grbpd)*vbdb));
   13575                 :            : #if defined(_DERIVATE)
   13576 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainb,bulkp,drainb,sourcep,(((-type)*grbpd)*vbdb_Vdrainb_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13577 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(drainb,bulkp,bulkp,sourcep,(((-type)*grbpd)*vbdb_Vbulkp_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13578                 :            : #endif
   13579                 :          0 : _load_static_residual2(bulk,bulkp,((type*grbpb)*vbeb));
   13580                 :            : #if defined(_DERIVATE)
   13581 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,bulkp,bulkp,sourcep,((type*grbpb)*vbeb_Vbulkp_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13582 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,bulkp,bulk,sourcep,((type*grbpb)*vbeb_Vbulk_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13583                 :            : #endif
   13584                 :          0 : _load_static_residual2(bulk,sourceb,((type*grbsb)*vbesb));
   13585                 :            : #if defined(_DERIVATE)
   13586 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,sourceb,sourceb,sourcep,((type*grbsb)*vbesb_Vsourceb_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13587 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,sourceb,bulk,sourcep,((type*grbsb)*vbesb_Vbulk_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13588                 :            : #endif
   13589                 :          0 : _load_static_residual2(bulk,drainb,((type*grbdb)*vbedb));
   13590                 :            : #if defined(_DERIVATE)
   13591 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,drainb,drainb,sourcep,((type*grbdb)*vbedb_Vdrainb_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13592 [ #  # ][ #  # ]:          0 : _load_static_jacobian4(bulk,drainb,bulk,sourcep,((type*grbdb)*vbedb_Vbulk_sourcep));
         [ #  # ][ #  # ]
                 [ #  # ]
   13593                 :            : #endif
   13594                 :            : }
   13595                 :            : #if defined(_DYNAMIC)
   13596 [ -  + ][ -  + ]:       7356 : _load_dynamic_residual2(gatep,sourcep,(type*_DDT(qgate)));
   13597                 :            : #if defined(_DERIVATE)
   13598 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(gatep,sourcep,sourceb,sourcep,(type*qgate_Vsourceb_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13599 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(gatep,sourcep,bulkp,sourcep,(type*qgate_Vbulkp_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13600 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(gatep,sourcep,drainb,sourcep,(type*qgate_Vdrainb_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13601 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(gatep,sourcep,drainp,sourcep,(type*qgate_Vdrainp_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13602 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(gatep,sourcep,gatep,sourcep,(type*qgate_Vgatep_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13603                 :            : #endif
   13604                 :            : #endif
   13605                 :            : #if defined(_DYNAMIC)
   13606 [ -  + ][ -  + ]:       7356 : _load_dynamic_residual2(drainp,sourcep,(type*_DDT(qd)));
   13607                 :            : #if defined(_DERIVATE)
   13608 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(drainp,sourcep,sourceb,sourcep,(type*qd_Vsourceb_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13609 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(drainp,sourcep,bulkp,sourcep,(type*qd_Vbulkp_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13610 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(drainp,sourcep,drainb,sourcep,(type*qd_Vdrainb_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13611 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(drainp,sourcep,drainp,sourcep,(type*qd_Vdrainp_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13612 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(drainp,sourcep,gatep,sourcep,(type*qd_Vgatep_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13613 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(drainp,sourcep,gatem,sourcep,(type*qd_Vgatem_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13614                 :            : #endif
   13615                 :            : #endif
   13616                 :            : #if defined(_DYNAMIC)
   13617 [ -  + ][ -  + ]:       7356 : _load_dynamic_residual2(bulkp,sourcep,(type*_DDT(qb)));
   13618                 :            : #if defined(_DERIVATE)
   13619 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(bulkp,sourcep,sourceb,sourcep,(type*qb_Vsourceb_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13620 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(bulkp,sourcep,bulkp,sourcep,(type*qb_Vbulkp_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13621 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(bulkp,sourcep,drainb,sourcep,(type*qb_Vdrainb_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13622 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(bulkp,sourcep,drainp,sourcep,(type*qb_Vdrainp_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13623 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(bulkp,sourcep,gatep,sourcep,(type*qb_Vgatep_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13624 [ +  - ][ -  + ]:       7356 : _load_dynamic_jacobian4(bulkp,sourcep,gatem,sourcep,(type*qb_Vgatem_sourcep));
         [ -  + ][ #  # ]
                 [ #  # ]
   13625                 :            : #endif
   13626                 :            : #endif
   13627         [ +  - ]:       7356 : if
   13628                 :            : (TNOIMOD==0)
   13629                 :            : {
   13630                 :       7356 : fourkt=(5.5226012e-23*Temp);
   13631                 :       7356 : leffx2=(leff*leff);
   13632                 :       7356 : _save_whitenoise2(drainp,sourcep,((((fourkt*NTNOI)*ueff)*abs((qd+qs)))/leffx2),"channel");
   13633                 :            : }
   13634         [ +  - ]:       7356 : if
   13635                 :            : (FNOIMOD==0)
   13636                 :            : {
   13637                 :       7356 : leffx2=(leff*leff);
   13638                 :       7356 : _save_flickernoise2(drainp,sourcep,((KF*pow(abs(cdrain),AF))/(cox*leffx2)),EF,"flicker");
   13639                 :            : }
   13640                 :       7356 : _save_whitenoise2(drain,drainp,abs((fourkt*gdtot)),"thermal");
   13641                 :       7356 : _save_whitenoise2(sourcep,source,abs((fourkt*gstot)),"thermal");
   13642                 :            : 
   13643                 :            : /* ------------------ end of verilog analog equations --------------------- */
   13644                 :            : 
   13645                 :            : /* ------------------ evaluate verilog noise equations -------------------- */
   13646                 :            : 
   13647                 :            : /* ------------------- end of verilog noise equations --------------------- */
   13648                 :       7356 : }
   13649                 :            : 
   13650                 :            : /* Perform DC iteration. */
   13651                 :       7356 : void bsim4v30nMOS::calcDC (void)
   13652                 :            : {
   13653                 :            :   // evaluate Verilog code
   13654                 :       7356 :   initVerilog ();
   13655                 :       7356 :   calcVerilog ();
   13656                 :            : 
   13657                 :            :   // fill right hand side and static jacobian
   13658         [ +  + ]:      88272 :   for (int i1 = 0; i1 < 11; i1++) {
   13659         [ +  - ]:      80916 :     setI (i1, _rhs[i1]);
   13660         [ +  + ]:     970992 :     for (int i2 = 0; i2 < 11; i2++) {
   13661         [ +  - ]:     890076 :       setY (i1, i2, _jstat[i1][i2]);
   13662                 :            :     }
   13663                 :            :   }
   13664                 :       7356 : }
   13665                 :            : 
   13666                 :            : /* Save operating points. */
   13667                 :       2000 : void bsim4v30nMOS::saveOperatingPoints (void)
   13668                 :            : {
   13669                 :            :   // save global instance operating points
   13670                 :       2000 : }
   13671                 :            : 
   13672                 :            : /* Load operating points. */
   13673                 :          0 : void bsim4v30nMOS::loadOperatingPoints (void)
   13674                 :            : {
   13675                 :          0 : }
   13676                 :            : 
   13677                 :            : /* Calculate operating points. */
   13678                 :          0 : void bsim4v30nMOS::calcOperatingPoints (void)
   13679                 :            : {
   13680                 :          0 : }
   13681                 :            : 
   13682                 :            : /* Initialization of AC analysis. */
   13683                 :          0 : void bsim4v30nMOS::initAC (void)
   13684                 :            : {
   13685                 :          0 :   allocMatrixMNA ();
   13686                 :          0 : }
   13687                 :            : 
   13688                 :            : /* Perform AC calculations. */
   13689                 :          0 : void bsim4v30nMOS::calcAC (nr_double_t frequency)
   13690                 :            : {
   13691         [ #  # ]:          0 :   setMatrixY (calcMatrixY (frequency));
   13692                 :          0 : }
   13693                 :            : 
   13694                 :            : /* Compute Y-matrix for AC analysis. */
   13695                 :          0 : matrix bsim4v30nMOS::calcMatrixY (nr_double_t frequency)
   13696                 :            : {
   13697                 :          0 :   _freq = frequency;
   13698                 :          0 :   saveOperatingPoints ();
   13699                 :          0 :   matrix y (11);
   13700                 :            : 
   13701         [ #  # ]:          0 :   for (int i1 = 0; i1 < 11; i1++) {
   13702         [ #  # ]:          0 :     for (int i2 = 0; i2 < 11; i2++) {
   13703                 :          0 :       y (i1,i2) = nr_complex_t (_jstat[i1][i2], _jdyna[i1][i2] * 2 * M_PI * _freq);
   13704                 :            :     }
   13705                 :            :   }
   13706                 :            : 
   13707                 :          0 :   return y;
   13708                 :            : }
   13709                 :            : 
   13710                 :            : /* Initialization of S-parameter analysis. */
   13711                 :          0 : void bsim4v30nMOS::initSP (void)
   13712                 :            : {
   13713                 :          0 :   allocMatrixS ();
   13714                 :          0 : }
   13715                 :            : 
   13716                 :            : /* Perform S-parameter calculations. */
   13717                 :          0 : void bsim4v30nMOS::calcSP (nr_double_t frequency)
   13718                 :            : {
   13719 [ #  # ][ #  # ]:          0 :   setMatrixS (ytos (calcMatrixY (frequency)));
         [ #  # ][ #  # ]
                 [ #  # ]
   13720                 :          0 : }
   13721                 :            : 
   13722                 :            : /* Initialization of transient analysis. */
   13723                 :          0 : void bsim4v30nMOS::initTR (void)
   13724                 :            : {
   13725                 :          0 :   setStates (2 * 11 * 11);
   13726                 :          0 :   initDC ();
   13727                 :          0 : }
   13728                 :            : 
   13729                 :            : /* Perform transient analysis iteration step. */
   13730                 :          0 : void bsim4v30nMOS::calcTR (nr_double_t)
   13731                 :            : {
   13732                 :          0 :   doHB = 0;
   13733                 :          0 :   doAC = 1;
   13734                 :          0 :   doTR = 1;
   13735                 :          0 :   calcDC ();
   13736                 :            : 
   13737                 :            :   int i1, i2, i3, i4, state;
   13738                 :            : 
   13739                 :            :   // 2-node charge integrations
   13740         [ #  # ]:          0 :   for (i1 = 0; i1 < 11; i1++) {
   13741         [ #  # ]:          0 :   for (i2 = 0; i2 < 11; i2++) {
   13742                 :          0 :     state = 2 * (i2 + 11 * i1);
   13743         [ #  # ]:          0 :     if (i1 != i2)
   13744         [ #  # ]:          0 :     if (_charges[i1][i2] != 0.0)
   13745                 :          0 :       transientCapacitanceQ (state, i1, i2, _charges[i1][i2]);
   13746                 :            :   } }
   13747                 :            : 
   13748                 :            :   // 1-node charge integrations
   13749         [ #  # ]:          0 :   for (i1 = 0; i1 < 11; i1++) {
   13750                 :          0 :     state = 2 * (i1 + 11 * i1);
   13751         [ #  # ]:          0 :     if (_charges[i1][i1] != 0.0)
   13752                 :          0 :       transientCapacitanceQ (state, i1, _charges[i1][i1]);
   13753                 :            :   }
   13754                 :            : 
   13755                 :            :   // charge: 2-node, voltage: 2-node
   13756         [ #  # ]:          0 :   for (i1 = 0; i1 < 11; i1++) {
   13757         [ #  # ]:          0 :   for (i2 = 0; i2 < 11; i2++) {
   13758         [ #  # ]:          0 :   if (i1 != i2)
   13759         [ #  # ]:          0 :   for (i3 = 0; i3 < 11; i3++) {
   13760         [ #  # ]:          0 :   for (i4 = 0; i4 < 11; i4++) {
   13761         [ #  # ]:          0 :     if (i3 != i4)
   13762         [ #  # ]:          0 :     if (_caps[i1][i2][i3][i4] != 0.0)
   13763 [ #  # ][ #  # ]:          0 :       transientCapacitanceC (i1, i2, i3, i4, _caps[i1][i2][i3][i4], BP(i3,i4));
   13764                 :            :   } } } }
   13765                 :            : 
   13766                 :            :   // charge: 2-node, voltage: 1-node
   13767         [ #  # ]:          0 :   for (i1 = 0; i1 < 11; i1++) {
   13768         [ #  # ]:          0 :   for (i2 = 0; i2 < 11; i2++) {
   13769         [ #  # ]:          0 :   if (i1 != i2)
   13770         [ #  # ]:          0 :   for (i3 = 0; i3 < 11; i3++) {
   13771         [ #  # ]:          0 :     if (_caps[i1][i2][i3][i3] != 0.0)
   13772         [ #  # ]:          0 :       transientCapacitanceC2Q (i1, i2, i3, _caps[i1][i2][i3][i3], NP(i3));
   13773                 :            :   } } }
   13774                 :            : 
   13775                 :            :   // charge: 1-node, voltage: 2-node
   13776         [ #  # ]:          0 :   for (i1 = 0; i1 < 11; i1++) {
   13777         [ #  # ]:          0 :   for (i3 = 0; i3 < 11; i3++) {
   13778         [ #  # ]:          0 :   for (i4 = 0; i4 < 11; i4++) {
   13779         [ #  # ]:          0 :     if (i3 != i4)
   13780         [ #  # ]:          0 :     if (_caps[i1][i1][i3][i4] != 0.0)
   13781 [ #  # ][ #  # ]:          0 :       transientCapacitanceC2V (i1, i3, i4, _caps[i1][i1][i3][i4], BP(i3,i4));
   13782                 :            :   } } }
   13783                 :            : 
   13784                 :            :   // charge: 1-node, voltage: 1-node
   13785         [ #  # ]:          0 :   for (i1 = 0; i1 < 11; i1++) {
   13786         [ #  # ]:          0 :   for (i3 = 0; i3 < 11; i3++) {
   13787         [ #  # ]:          0 :     if (_caps[i1][i1][i3][i3] != 0.0)
   13788         [ #  # ]:          0 :       transientCapacitanceC (i1, i3, _caps[i1][i1][i3][i3], NP(i3));
   13789                 :            :   } }
   13790                 :          0 : }
   13791                 :            : 
   13792                 :            : /* Compute Cy-matrix for AC noise analysis. */
   13793                 :          0 : matrix bsim4v30nMOS::calcMatrixCy (nr_double_t frequency) 
   13794                 :            : {
   13795                 :          0 :   _freq = frequency;
   13796                 :          0 :   matrix cy (11);
   13797                 :            : 
   13798                 :          0 :   _load_flickernoise2 (drainp,sourcep,_flicker_pwr[drainp][sourcep],_flicker_exp[drainp][sourcep]);
   13799                 :          0 :   _load_whitenoise2 (sourcep,source,_white_pwr[sourcep][source]);
   13800                 :          0 :   _load_whitenoise2 (drain,drainp,_white_pwr[drain][drainp]);
   13801                 :          0 :   _load_whitenoise2 (drainp,sourcep,_white_pwr[drainp][sourcep]);
   13802                 :            : 
   13803                 :          0 :   return cy;
   13804                 :            : }
   13805                 :            : 
   13806                 :            : /* Perform AC noise computations. */
   13807                 :          0 : void bsim4v30nMOS::calcNoiseAC (nr_double_t frequency) 
   13808                 :            : {
   13809         [ #  # ]:          0 :   setMatrixN (calcMatrixCy (frequency));
   13810                 :          0 : }
   13811                 :            : 
   13812                 :            : /* Perform S-parameter noise computations. */
   13813                 :          0 : void bsim4v30nMOS::calcNoiseSP (nr_double_t frequency) 
   13814                 :            : {
   13815 [ #  # ][ #  # ]:          0 :   setMatrixN (cytocs (calcMatrixCy (frequency) * z0, getMatrixS ()));
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
                 [ #  # ]
   13816                 :          0 : }
   13817                 :            : 
   13818                 :            : /* Initialization of HB analysis. */
   13819                 :          0 : void bsim4v30nMOS::initHB (int)
   13820                 :            : {
   13821                 :          0 :   initDC ();
   13822                 :          0 :   allocMatrixHB ();
   13823                 :          0 : }
   13824                 :            : 
   13825                 :            : /* Perform HB analysis. */
   13826                 :          0 : void bsim4v30nMOS::calcHB (int)
   13827                 :            : {
   13828                 :          0 :   doHB = 1;
   13829                 :          0 :   doAC = 1;
   13830                 :          0 :   doTR = 0;
   13831                 :            : 
   13832                 :            :   // jacobian dI/dV and currents get filled
   13833                 :          0 :   calcDC ();
   13834                 :          0 :   saveOperatingPoints ();
   13835                 :            : 
   13836                 :            :   // fill in HB matrices
   13837         [ #  # ]:          0 :   for (int i1 = 0; i1 < 11; i1++) {
   13838         [ #  # ]:          0 :     setQ  (i1, _qhs[i1]); // charges
   13839         [ #  # ]:          0 :     setCV (i1, _chs[i1]); // jacobian dQ/dV * V
   13840         [ #  # ]:          0 :     setGV (i1, _ghs[i1]); // jacobian dI/dV * V
   13841         [ #  # ]:          0 :     for (int i2 = 0; i2 < 11; i2++) {
   13842         [ #  # ]:          0 :       setQV (i1, i2, _jdyna[i1][i2]); // jacobian dQ/dV
   13843                 :            :     }
   13844                 :            :   }
   13845                 :          0 : }
   13846                 :            : 
   13847                 :            : #include "bsim4v30nMOS.defs.h"
   13848                 :            : 

Generated by: LCOV version 1.11