<jupyter_start><jupyter_text>How to do it...<jupyter_code>print(tf.math.divide(3, 4))
print(tf.math.truediv(3, 4))
print(tf.math.floordiv(3.0, 4.0))
print(tf.math.mod(22.0, 5.0))
print(tf.linalg.cross([1., 0., 0.], [0., 1., 0.]))<jupyter_output>tf.Tensor([0. 0. 1.], shape=(3,), dtype=float32)<jupyter_text>How it works...<jupyter_code># Tangent function (tan(pi/4)=1)
def pi_tan(x):
    return tf.tan(3.14159/x)

print(pi_tan(4))<jupyter_output>tf.Tensor(0.99999875, shape=(), dtype=float32)<jupyter_text>We can also create a custom polynomial function...<jupyter_code>def custom_polynomial(value):
    return tf.math.subtract(3 * tf.math.square(value), value) + 10
print(custom_polynomial(11))<jupyter_output>tf.Tensor(362, shape=(), dtype=int32)
{'fraction_non_alphanumeric': 0.20454545454545456, 'fraction_numerical': 0.07352941176470588, 'mean_word_length': 6.201923076923077, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '178790', 'license': 'MIT', 'n_tokens_mistral': 359, 'n_tokens_neox': 328, 'n_words': 49, 'path': 'Chapter 1 - Getting Started with TensorFlow 2.x/Declaring operations.ipynb', 'repo_name': 'Young-Picasso/TensorFlow2.x_Cookbook', 'size': '748'}