Top
Back: bubblesort
Forward: Cornacchia
FastBack:
FastForward:
Up: atkins_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.12.2.3 disc

Procedure from library atkins.lib (see atkins_lib).

Usage:
disc(N,k);

Return:
list L of negative discriminants D, sorted in decreasing order

Assume:
D<0, D kongruent 0 or 1 modulo 4 and |D|<4N

Note:
D=b^2-4*a, where 0<=b<=k and intPart((b^2)/4)+1<=a<=k for each b

Example:
 
LIB "atkins.lib";
disc(2003,50);
==> [1]:
==>    -3
==> [2]:
==>    -4
==> [3]:
==>    -7
==> [4]:
==>    -8
==> [5]:
==>    -11
==> [6]:
==>    -12
==> [7]:
==>    -15
==> [8]:
==>    -16
==> [9]:
==>    -19
==> [10]:
==>    -20
==> [11]:
==>    -23
==> [12]:
==>    -24
==> [13]:
==>    -27
==> [14]:
==>    -28
==> [15]:
==>    -31
==> [16]:
==>    -32
==> [17]:
==>    -35
==> [18]:
==>    -36
==> [19]:
==>    -39
==> [20]:
==>    -40
==> [21]:
==>    -43
==> [22]:
==>    -44
==> [23]:
==>    -47
==> [24]:
==>    -48
==> [25]:
==>    -51
==> [26]:
==>    -52
==> [27]:
==>    -55
==> [28]:
==>    -56
==> [29]:
==>    -59
==> [30]:
==>    -60
==> [31]:
==>    -63
==> [32]:
==>    -64
==> [33]:
==>    -67
==> [34]:
==>    -68
==> [35]:
==>    -71
==> [36]:
==>    -72
==> [37]:
==>    -75
==> [38]:
==>    -76
==> [39]:
==>    -79
==> [40]:
==>    -80
==> [41]:
==>    -83
==> [42]:
==>    -84
==> [43]:
==>    -87
==> [44]:
==>    -88
==> [45]:
==>    -91
==> [46]:
==>    -92
==> [47]:
==>    -95
==> [48]:
==>    -96
==> [49]:
==>    -99
==> [50]:
==>    -100
==> [51]:
==>    -103
==> [52]:
==>    -104
==> [53]:
==>    -107
==> [54]:
==>    -108
==> [55]:
==>    -111
==> [56]:
==>    -112
==> [57]:
==>    -115
==> [58]:
==>    -116
==> [59]:
==>    -119
==> [60]:
==>    -120
==> [61]:
==>    -123
==> [62]:
==>    -124
==> [63]:
==>    -127
==> [64]:
==>    -128
==> [65]:
==>    -131
==> [66]:
==>    -132
==> [67]:
==>    -135
==> [68]:
==>    -136
==> [69]:
==>    -139
==> [70]:
==>    -140
==> [71]:
==>    -143
==> [72]:
==>    -144
==> [73]:
==>    -147
==> [74]:
==>    -148
==> [75]:
==>    -151
==> [76]:
==>    -152
==> [77]:
==>    -155
==> [78]:
==>    -156
==> [79]:
==>    -159
==> [80]:
==>    -160
==> [81]:
==>    -163
==> [82]:
==>    -164
==> [83]:
==>    -167
==> [84]:
==>    -168
==> [85]:
==>    -171
==> [86]:
==>    -172
==> [87]:
==>    -175
==> [88]:
==>    -176
==> [89]:
==>    -179
==> [90]:
==>    -180
==> [91]:
==>    -183
==> [92]:
==>    -184
==> [93]:
==>    -187
==> [94]:
==>    -188
==> [95]:
==>    -191
==> [96]:
==>    -192
==> [97]:
==>    -195
==> [98]:
==>    -196
==> [99]:
==>    -199
==> [100]:
==>    -200


Top Back: bubblesort Forward: Cornacchia FastBack: FastForward: Up: atkins_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4-0-3, 2016, generated by texi2html.